β¨ Unity-MCP Pro is a high-performance Model Context Protocol (MCP) server for the Unity Editor that gives AI assistants and custom tools a reliable way to automate scenes, GameObjects, components, physics, and project workflows.
Created, maintained, and actively expanded by NishantJLU.
This repository is the primary home for the current Unity-MCP implementation, including the bridge workflow, automation surface, tooling, and ongoing product improvements.
- List and load scenes within the project
- Inspect scene settings and global configurations
- Open/save projects and manage asset database items
- Create GameObjects, Prefabs, Cameras, and Lights
- Reorder, rename, delete, parent, and toggle active states
- Manage Tags, Layers, and static flags for complex scene organization
- Add or remove components in real-time
- Read/write property values via C# Reflection (Deep Property Access)
- Inspect component metadata and state in the Inspector-equivalent view
- Capture live screenshots from the Editor/Game view
- Adjust camera properties, FOV, and post-processing for visual reasoning
- Automated scene auditing through visual feedback
- Main-Thread Dispatcher: Safely execute commands without crashing Unity
- Scene Graph Analytics: Structured JSON map of the entire object hierarchy
- Batch operations to minimize overhead and maximize execution speed
- Unity Editor (2021.3 LTS or later)
- Node.js (18+ recommended)
- npm or yarn package manager
-
Clone the repository
git clone https://github.com/NishantJLU/Unity-MCP.git cd Unity-MCP -
Install dependencies
npm install
-
Build the project
npm run build
-
Install the Unity Bridge
- Copy the
UnityScriptsfolder into your Unity project'sAssetsdirectory. - This adds the custom Editor Window and bridge listener to your project.
- Copy the
Point your MCP client to the built server entry (unity-mcp-server/index.js):
Windows:
{
"mcpServers": {
"UnityMCPPro": {
"command": "node",
"args": ["C:\\\\path\\\\to\\\\Unity-MCP\\\\unity-mcp-server\\\\index.js"]
}
}
}- Primary author and maintainer of Unity-MCP Pro: NishantJLU
- This repository reflects original work across the MCP server, C# bridge dispatcher, documentation, and automation capabilities.
-
Start the MCP server
npm start
-
Open Unity
-
Open the Unity MCP Pro Panel
- In Unity, go to Window > AI > Unity MCP Pro
- Click the ESTABLISH LINK button
- The status should change to
LINK_ESTABLISHED - The bridge communicates via a local high-performance HTTP listener.
Once the server is running and the Unity MCP panel is active, AI assistants can send structured commands directly into your Unity Editor workflow.
You can create new objects with custom settings such as:
- Name
- Primitive Type (Cube, Sphere, etc.)
- Position, Rotation, Scale
- Tag and Layer Example MCP tool usage:
create-gameobject({
name: "AI_Controlled_Cube",
primitiveType: "Cube",
position: { x: 0, y: 5, z: 0 },
tag: "Untagged"
});You can modify any component property via Reflection:
Transform & Physics:
- Adjust Rigidbody mass and drag
- Modify Transform properties precisely
- Toggle Gravity and Colliders
Lights & Rendering:
- Change Light intensity, color, and range
- Modify MeshRenderer materials and shaders
You can automate visual workflows with:
Screenshot Capture:
- Take a high-resolution snapshot of the current view
- Allow the AI to "see" the scene layout for aesthetic adjustments
- Audit UI placement and visual bugs
get-scene-graph,list-project-assetsestablish-link,bridge-statusexecute-batch-commands
create-gameobject,instantiate-prefab,delete-objectset-object-parent,rename-object,set-active-stateset-object-tag,set-object-layer
add-component,get-component-dataset-component-property(Reflection-based deep access)get-property-metadata
take-unity-screenshot(Visual reasoning tool)get-camera-info,set-camera-properties
find-objects-by-tag,find-objects-by-nameget-scene-analytics
unity-mcp-server/index.js: MCP server implementation (Node.js)UnityScripts/: C# bridge and Editor dispatcher logicsetup.bat: Windows automation helper for installation
npm run buildnpm testContributions are welcome. If you want to improve Unity-MCP Pro, open an issue or submit a pull request with a focused change.
Developed by NishantJLU