MCP for Unity connects AI assistants to the Unity Editor over the Model Context Protocol. From any MCP client, including Claude Desktop and Claude Code, Codex, Cursor, VS Code, Windsurf, Cline, Gemini CLI, and local LLMs, you control the editor in natural language: create scenes and GameObjects, edit C# scripts, manage assets, run tests, profile, and build. A prompt such as "create a cube at the origin and add a Rigidbody" produces the object in the open project.
The system has three layers. The MCP client speaks the protocol over stdio or HTTP. A Python server built on FastMCP and a WebSocket hub auto-discovers tool registrations, routes requests per session and active Unity instance, and hot-reloads. A C# editor package installed through the Unity Package Manager receives the commands inside the editor. Version 10 exposes 47 tool entry points and 25 read-only resources, auto-configures 22 clients from a menu item, and supports Unity 2021.3 LTS through 6.x with Python 3.10+.
Features
- Scene and object control: create and modify scenes, GameObjects, and components from a prompt
- Script editing: edit C# scripts with optional Roslyn validation
- Asset management: manage project assets, with asset generation added in v10
- Testing, profiling, builds: run test suites, profile, and trigger builds from the assistant
- Tool groups: enable subsets such as vfx, animation, ui, and testing
- Multi-instance routing: route requests to a chosen Unity instance when several editors are open
- Client auto-configuration: one menu action configures detected MCP clients
- Remote server: host the Python server remotely with authentication
Built with this
Integrates with
Claude Code
Terminal-based agentic coding tool that reads your codebase and runs tasks through natural-language commands
Cline
Open-source coding agent with one engine behind VS Code, JetBrains, a headless CLI, an SDK, and a parallel Kanban board
Codex
Lightweight coding agent that runs in your terminal
