Unity MCP (ykh09242)
Connect your AI assistant to the Unity Editor with the Model Context Protocol. Manage assets, scenes, scripts, and tests.
https://github.com/ykh09242/unity-mcp.git?path=/MCPForUnity#ykh09242-v2.6.0- MCP tool surface
- 133tools
- read-only state
- 39resources
- auto-configured
- 24clients
- Unity version range
- 2021.3 → 6.xlts
How it works
Your MCP client connects to the Python server over stdio or HTTP. The server routes each request to the selected Unity Editor through the C# 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
Registers Python tools and routes request-scoped Editor targets. Optional session defaults require a stateful legacy connection.
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. 133 tools across 17 groups expose Unity's editing surface to your MCP client.
Browse toolsMultiple Editors, explicit targets.
Target an Editor on each request, including from sessionless clients. Optional active-instance defaults are available only on stateful legacy connections.
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.
Local Editor toggles and server defaults control discovery; legacy sessions can also select groups. Tool visibility does not grant Unity consent for high-impact operations.
Tool groupsSource-generated API reference.
Tool reference pages are generated from registered Python tools. Authored guides and preserved examples are maintained alongside them.
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.
Git-based installation. No telemetry by default. Open source under MIT.
Using MCP for Unity in research? Please cite the original 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}
}