Labsco
MCP SERVER

Unity3d Game Engine

by CoderGamester

Drive the Unity Editor from a coding agent — create and modify GameObjects, add components, build materials, run the Test Runner, and read the console back.

3D, CAD & Game Engines
Summary
An agent can build the scene, not just write the script that would.

The whole Editor surface is reachable — hierarchy, components, materials, prefabs, scenes, play mode and the Test Runner — and `batch_execute` turns a repetitive twenty-object setup into a single request that rolls back if it fails halfway.

What it is

A Unity Editor package plus a Node.js server that speaks MCP. The package runs inside the Editor and the server bridges your AI client to it, so operations happen in the project you have open.

What you get
  • Scene and hierarchy work: `select_gameobject`, `get_gameobject`, `update_gameobject`, `duplicate_gameobject`, `delete_gameobject`, `reparent_gameobject`, `move_gameobject`, `rotate_gameobject`, `scale_gameobject` and `set_transform` for position, rotation and scale in one call
  • Scenes as files: `create_scene`, `load_scene` with optional additive loading, `save_scene`, `unload_scene`, `delete_scene` and `get_scene_info`
  • Components and assets: `update_component` adds a component if the object does not have it, `add_asset_to_scene` pulls from the AssetDatabase, `create_prefab` builds one with serialized field values, and `add_package` installs through the Package Manager
  • Materials: `create_material`, `assign_material`, `modify_material` and `get_material_info`
  • Editor control: `execute_menu_item` runs any MenuItem-tagged function, `recompile_scripts` rebuilds, `run_tests` drives the Test Runner, and `send_console_log` / `get_console_logs` write and read the console with pagination
  • `batch_execute` runs several operations as one request, with optional rollback on failure
  • Play mode: `get_play_mode_status` and `set_play_mode_status` with `play`, `pause`, `stop` and `step`, plus `show_unity_dashboard` for the VS Code app
  • Resources rather than tools where a listing is the point: `unity://menu-items`, `unity://scenes-hierarchy`, `unity://gameobject/{id}`, `unity://logs`, `unity://packages`, `unity://assets` and `unity://tests/{testMode}`
Requirements

Unity 6 or later, Node.js 18 or later, and npm 9 or later for debugging the server. Install the package through the Unity Package Manager with `Add package from git URL...` pointing at the repository. Project paths containing spaces are supported, though moving the project to a path without spaces is the first thing to try if the connection misbehaves. The package also adds Unity's `Library/PackedCache` folder to VSCode-like workspaces so autocompletion and type information cover Unity packages.

Setup effort

One command — npx -y com.gamelovers.mcp-unity