Unity MCP
Lets your AI agent drive the Unity Editor: read the console, edit scenes and prefabs, run tests and build.
340 stars on GitHubby isuzu-shiranuiLicense MITUpdated 2 months ago
How to install
This MCP is local: it runs on your computer.
It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Codeβ¦). Choose your app:
Paste in the terminal:
claude mcp add unity-mcp-2 -- dnx IsuzuUnityCli --yes -- mcp-stdio
What to fill in
| Name | What it is | Required |
|---|---|---|
UNITY_MCP_STATE_DIR | Where the Editor writes its descriptors. Set this only when the default location cannot be reached, such as from WSL. | No |
UNITY_MCP_HOST | Replaces 127.0.0.1 in the descriptor endpoint, for reaching an Editor on the Windows host from WSL. | No |
Ready! Now test it
Restart the app and paste one of these requests in the chat:
Recompile my scripts and show me any errors in the console.
Create a prefab with a cube and a rigidbody, then add it to the scene.
What it is
This package makes the Unity Editor serve MCP itself over HTTP, so there is no second server process to run. Agents can inspect the project, create and change objects and assets, run tests and builds. The same tools are available from the isuzu-unity-cli command, which needs no Node or .NET runtime.
What it can do
- Diagnostics: console, Editor.log, compile state, scene hierarchy
- Authoring: GameObjects, components, assets, scenes, prefabs, Animator Controllers
test_runandtest_results: run and read tests- Timeline and Recorder tools
- Build tools
- Run C# snippets
input_pointer,input_key,input_record,input_replay: synthesize Editor input
When to use
- βΊWhen you want an agent to edit scenes and prefabs in an open Unity project.
- βΊWhen you want it to recompile, find errors and run tests after editing scripts.
- βΊWhen you want to add your own Unity tools by writing one C# method.
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
cli-anything-sboxLets your agent edit s&box game projects, including scenes, prefabs, materials, and C# components, and check projects for errors.game-developmentHelps your agent organize game development projects. It picks the right tools based on platform, game type, and engine, like Godot or Unity.unity-ai-game-creatorHelps your agent create complete Unity games from ideas. It generates visual elements, scene structures, and sounds, guiding development step-by-step.Frequently asked questions
Is it free?
Yes. It is MIT licensed.
Which AI tools work with it?
The readme says it has been checked with Claude Code, Cursor, Codex, Gemini CLI, VS Code and Claude Desktop.
Is the server safe to leave on?
It binds only to 127.0.0.1 and needs a bearer token on every request except OPTIONS. It is not included in player builds.
How do I install the package?
In Unity's Package Manager choose Add package from git URL with the URL in the readme, or add the VPM repository in VCC or ALCOM.
Can I add my own tools?
Yes. Add a C# static method with the McpTool attribute, or define tools in a JSON file.
Which tools appear?
Timeline, Recorder and test tools only appear when the matching Unity packages are installed.
If it does not work
- βΊOpen the project in the Unity Editor first; the server starts when the project opens.
- βΊRun isuzu-unity-cli projects to see running Editors, and pass --project when more than one is open.
- βΊClaude Code registers the server by project path, so launch it from the Unity project folder.
5 new skills a week. 1 minute to read.