An MCP server for the Unity Editor · v1.0.0

Your AI assistant, inside the Unity Editor

An MIT-licensed MCP server that lets Claude Code, Cursor, Codex and any other MCP client operate directly inside your running Unity project.

https://github.com/kitwright/unity-mcp.git
Region 01 · The relay1 / 4

execute_code first

One in-memory C# execution tool instead of fifty narrow ones. Roslyn compiles the snippet, it runs on the editor thread, and the agent gets the full Editor and runtime API surface — no .cs files written under Assets/, no domain reload.

  • execute_code
Region 02 · The course2 / 4

Play mode automation

Enter play mode, simulate keyboard and mouse input, capture the game view, read the console, and validate behavior — all from the same MCP session.

  • enter_play_mode
  • simulate_key_press
  • capture_game_view
  • get_console_logs
Region 03 · The ledger3 / 4

Auto-Undo and structured logs

Implement IKitWrightCommand and every created, modified or destroyed object joins editor Undo. The response carries logs, created, modified, destroyed and returnValue, so the agent verifies changes without re-querying the scene.

  • logs
  • created
  • modified
  • destroyed
  • returnValue
Region 04 · The orbit4 / 4

Focused by default

The core profile exposes 35 high-signal tools to keep the client's tool list clean. Switch to full for all 258 when you need them, and edit exactly which tools each profile exposes.

  • core · 35
  • full · 258
  • set_tool_profile

The whole planet, in numbers

258

built-in tools

55

modules

35

tools in core profile

MIT

license

KitWright running inside the Unity Editor

Details

Built for daily use.

Structured returns

Every tool returns {success, message, data} with stable instanceId fields, so agents chain by_id calls instead of re-resolving by name.

Safety guards on by default

The filesystem guard blocks destructive snippets, broad System.IO writes and traversal paths. Not a full sandbox — clients can override per call.

Resources and prompts

Live project context, scene and selection state, compile errors, interaction history, plus workflow prompts like fix_compile_errors.

One-click client config

Generate MCP config entries for Claude Code, Cursor, LM Studio, VS Code, Codex and more, straight from the Unity window.

Editor-only

No runtime components are added to your built game. The server listens on 127.0.0.1:8765 and nothing leaves your machine.

Built-in updating

KitWright > Check for Updates refreshes Git installs in place or imports the latest unitypackage automatically.

Works with

Claude CodeCursorLM StudioWindsurfCodexVS Code CopilotKiroTraeClaude CodeCursorLM StudioWindsurfCodexVS Code CopilotKiroTrae

Against the built-in assistant

Made for Unity developers.

AreaKitWright MCPUnity AI Assistant
Minimum Unity version2022.36000.3 (Unity 6 only)
LicenseMIT, open sourceProprietary, Unity ToS
DeploymentLocal HTTP server in EditorEditor + relay + Unity Cloud
BillingFree, bring your own clientCredits via Unity Dashboard
Tool exposure258 tools, core (35) / full~15 MCP tools
Play mode validationEnter, input, capture, logs, exitEnter and exit only
Offline tool callsYesNo
Compare all four Unity MCP servers →

FAQ

Questions.

Is it really free?

Yes. MIT licensed, no credits, no account. You bring your own MCP client and your own model.

Which Unity versions work?

Unity 2022.3 and newer, including Unity 6. The package is Editor-only and adds nothing to your build.

Does my project code leave my machine?

The MCP server itself is local, on 127.0.0.1:8765. Whatever your AI client sends to its own model provider is governed by that client.

Do I need Python?

No. The Unity-side plugin is a single Unity package with no external daemon and no Python requirement.

Is execute_code sandboxed?

There are default-on safety checks and a stricter filesystem guard, but it is not a complete sandbox. Treat it as you would any code your agent runs locally.

Can I add my own tools?

Yes. Tools are discovered by attribute, so a custom tool is a class and an attribute away.

One Git URL and you are connected.

No account, no credits, no Python. Add the package and start the server.

https://github.com/kitwright/unity-mcp.git
Install guide