How coplaydev/unity-mcp works
Project type and purpose
• Unity MCP is a two‐component, local “bridge” system that lets LLM-based MCP Clients (e.g. Claude Desktop, Cursor, VSCode Copilot) drive the Unity Editor.
• It consists of:
• UnityMcpBridge – a Unity Package (C#) loaded into the Editor (Editor + Runtime code)
• UnityMcpServer – a Python 3.12 microservice (uv-driven) that relays MCP calls
File structure
• Top-level directories:
• UnityMcpBridge/ – contains the Unity Package, split into:
– Editor/ (Data, Helpers, Models, Tools, Windows, asmdef files)
– Runtime/ (Serialization converters, asmdef)
• UnityMcpServer/src/ – Python service, with server.py, port_discovery.py, config.py, pyproject.toml, uv.lock, plus a tools/ subpackage that mirrors the Bridge’s tool commands
• Other files: Dockerfile (server containerization), deploy-dev.bat & restore-dev.bat (deployment scripts)
README for additional insights
[Your LLM via MCP Client] ↔ [Unity MCP Server (Python)] ↔ [Unity MCP Bridge (Unity Editor)]
• Lists supported tools (manage_asset, manage_scene, manage_script, etc.) and setup steps (auto-configure vs manual)
• Emphasizes JSON-RPC over a local port, uv CLI invocation, and asmdef based plugin
Elements
• Python server (green gears)
• Unity Bridge (blue cube)
• External client (yellow cloud or terminal)
• Unity Editor (gray application window)
Detail to capture
• The Editor vs Runtime boundary within the Bridge package
• Port discovery and server startup flow (port_discovery.py → server.py)
• How “Auto-Configure” writes to the MCP Client’s config file vs Manual Configuration snippets
• The round-trip of commands: MCP Client → Python Server → Bridge → UnityEditor API → Bridge → Server → Client