Run the Unity Editor
with your AI assistant.
MCP for Unity bridges AI assistants — Claude, Codex, VS Code, local LLMs, and more — with the Unity Editor via the Model Context Protocol. Manage assets, control scenes, edit scripts, run tests, automate workflows.
https://github.com/CoplayDev/unity-mcp.git?path=/MCPForUnity#mainhttps://github.com/CoplayDev/unity-mcp.git?path=/MCPForUnity#beta- MCP tool surface
- 43tools
- read-only state
- 25resources
- auto-configured
- 21clients
- Unity version range
- 2021.3 → 6.xlts
How it works
Three layers, two transports, one Unity Editor. Your MCP client never talks to Unity directly — the Python server in the middle handles routing, session isolation, and the chatter with the C# Editor plugin.
MCP Client
Claude · Codex · VS Code · Cursor · local LLMs
Speaks the Model Context Protocol. Discovers tools and resources, sends prompts, renders results.
Python Server
FastMCP + WebSocket hub
Auto-discovers @mcp_for_unity_tool registrations. Routes per-session via client_id and active instance. Hot-reloadable.
Unity Editor Plugin
C# package · MCPForUnity
Receives commands on the Unity main thread. Executes via Unity Editor APIs. Returns structured payloads.
What you can do
Talk to the Editor.
Drive scenes, GameObjects, scripts, assets, prefabs, and materials with natural language. 43 tools across 9 groups expose Unity’s editing surface to your MCP client.
Browse toolsMultiple Editors, one session.
Open several Unity Editors at once and aim a single MCP session at any of them. Per-call routing for cross-project prompts; session isolation across MCP clients.
How routing worksHTTP or stdio. Your call.
HTTP for multi-agent, remote-hosted, and shared workflows. Stdio for single-client setups like Claude Desktop. Auto-detected and auto-configured.
HTTP vs stdioYour tools, on demand.
Per-session visibility. Activate animation, vfx, ui, testing, or probuilder tools only when needed. Smaller prompt, sharper routing, lower cost.
Tool groupsGenerated, never stale.
Every tool and resource page is generated from the Python @mcp_for_unity_tool registry. CI fails if the docs drift. Examples you write are preserved across regenerations.
Docs workflowPlug in custom tools.
Write a C# attribute, register a new domain. The MCP client picks it up automatically. Project-scoped or global. Full reflection-based dispatch.
Custom toolsGet the editor speaking your AI's language.
Install in under a minute. No account, no telemetry by default, no lock-in. Open source under MIT.
Using MCP for Unity in research? Please cite our paper — MCP-Unity: Protocol-Driven Framework for Interactive 3D Authoring (Wu & Barnett, 2025).
@inproceedings{10.1145/3757376.3771417,
author = {Wu, Shutong and Barnett, Justin P.},
title = {MCP-Unity: Protocol-Driven Framework for Interactive 3D Authoring},
year = {2025},
isbn = {9798400721366},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3757376.3771417},
doi = {10.1145/3757376.3771417},
series = {SA Technical Communications '25}
}