
Your AI assistant, inside the Unity EditorAn MCP server for 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.gitDesigned for power, speed & precision.
Everything you need to orchestrate Unity directly from your favorite LLM.
Run Roslyn C# code in-memory on Unity main thread without domain reload.
public class CommandScript : IKitWrightCommand
{
public void Execute(ExecutionContext ctx)
{
var go = GameObject.CreatePrimitive(PrimitiveType.Cube);
ctx.RegisterObjectCreation(go); // Auto-Undo tracked
ctx.Log("Created {0} in active scene", go.name);
}
}Works with any MCP client
Connect Cursor, Claude Code, Windsurf, LM Studio or custom API pipelines instantly.
Built-in Safety & Fast Iteration
Filesystem guards block destructive paths while local 127.0.0.1 HTTP server keeps your code private.
Describe the change. It happens in the Editor.
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.
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.
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.
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.
Key features that make daily usage effortless.
Every tool returns {success, message, data} with stable instanceId fields, so agents chain by_id calls instead of re-resolving by name.
The filesystem guard blocks destructive snippets, broad System.IO writes and traversal paths. Not a full sandbox — clients can override per call.
Live project context, scene and selection state, compile errors, interaction history, plus workflow prompts like fix_compile_errors.
Generate MCP config entries for Claude Code, Cursor, LM Studio, VS Code, Codex and more, straight from the Unity window.
No runtime components are added to your built game. The server listens on 127.0.0.1:8765 and nothing leaves your machine.
KitWright > Check for Updates refreshes Git installs in place or imports the latest unitypackage automatically.
Built specifically for Unity developers.
Compare KitWright MCP features against Unity's built-in AI Assistant.
KitWright MCP
Open-source, zero subscription, full Editor capability.
Unity AI Assistant
May 2026 documented state (v2.7.0-pre.2).
Frequently asked 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.
