Skip to content
Skillpedia
● Free and open sourceπŸ’» LocalπŸ”“ No API keyProgramming

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

NameWhat it isRequired
UNITY_MCP_STATE_DIRWhere the Editor writes its descriptors. Set this only when the default location cannot be reached, such as from WSL.No
UNITY_MCP_HOSTReplaces 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_run and test_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

Unity Editor 2022.3 or newer, a Git client 2.14 or newer for the git URL install, and the Newtonsoft JSON package, which resolves automatically.

Skills that pair well

⭐ Skillpedia MCP Β· freeYour agent finds the right skill on its ownInstall our MCP and your agent searches 15,000+ skills whenever it needs one.Install for free β†’

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.