Unity-MCP bridges LLMs (Claude, Cursor, Copilot, etc.) with Unity Editor and Runtime via the Model Context Protocol. It consists of these sub-projects:
| Sub-project | Location | Description |
|---|---|---|
| MCP Server | Unity-MCP-Server/ | C# ASP.NET Core server — bridges MCP clients and Unity Plugin via SignalR |
| MCP Plugin | Unity-MCP-Plugin/ | Unity Editor/Runtime plugin — executes MCP tools and manages connection |
| CLI | cli/ | Command-line interface for Unity-MCP |
| Installer | Installer/ | Unity package that installs the plugin and its dependencies |
| Unity-Tests | Unity-Tests/ | Test project for Unity-MCP |
MCP Client (Claude/Cursor/etc.)
↕ stdio or streamableHttp
Unity-MCP-Server (ASP.NET Core + MCP SDK)
↕ SignalR
Unity-MCP-Plugin (Unity Editor/Runtime)
↕ Unity API (main thread)
Unity Engine
- The MCP Server is a standalone binary downloaded automatically by the plugin to
Library/mcp-server/{platform}/. It is also published to Docker Hub and NuGet. - The MCP Plugin auto-starts the server binary on Unity Editor load (
[InitializeOnLoad]). Port is deterministic: SHA256 hash of project path, mapped to 20000–29999. - Communication inside Unity always runs on the main thread via
MainThread.Instance.Run().
Version is sourced from Unity-MCP-Plugin/Packages/com.ivanmurzak.unity.mcp/package.json. Bump with .\commands\bump-version.ps1 <version>.
See .github/workflows/ for all pipelines. PRs from untrusted contributors require a ci-ok label from a maintainer before CI runs.
These apply across both C# sub-projects:
#nullable enableat the top of every file- Copyright box comment header in every file
- MCP tool classes are
partial— one operation per file (e.g.,Tool_GameObject.Create.cs) - MCP tools MUST return structured types (data models,
List<T>,void, orTask) — avoid raw string returns - All Unity API calls must use
MainThread.Instance.Run(() => ...)orRunAsync() - Tool/prompt names use kebab-case with category prefix (e.g.,
gameobject-create,assets-find) - Namespace pattern:
com.IvanMurzak.Unity.MCP.[Tier].[Component] - No Reflection for private access — C# Reflection (
System.Reflection) MUST NOT be used to access private, internal, or non-public members. Exception:ReflectorNetlibrary usage is allowed.
Non-negotiable principles and architecture constraints: .specify/memory/constitution.md
Code review: You MUST read the constitution before performing any code review. It contains critical rules for code quality, safety, and project governance that all reviews must verify against.
README.md ← Root project documentation
Unity-MCP-Plugin/Packages/com.ivanmurzak.unity.mcp/README.md ← Copy of root README.md *
Installer/Assets/com.IvanMurzak/AI Game Dev Installer/README.md ← Copy of root README.md *
docs/
├── README.es.md ← Spanish translation of root README *
├── README.ja.md ← Japanese translation *
└── README.zh-CN.md ← Simplified Chinese translation *
Unity-MCP-Server/README.md ← MCP Server documentation
Unity-MCP-Server/MCP-Test-Client/README.md ← Test client documentation
cli/README.md ← CLI documentation
cli/docs/
├── README.es.md ← Spanish translation of CLI README
├── README.ja.md ← Japanese translation
└── README.zh-CN.md ← Simplified Chinese translation
Files marked with * MUST be kept in sync with README.md when it changes.