Unity MCP
Unity MCP connects Claude Code, Cursor, Copilot and other AI agents to the Unity Editor. Start here for installation, setup, tools, extensions and the CLI.
Unity MCP is the Unity plugin of AI Game Developer. It puts AI in the Unity Editor: an agent such as Claude Code, Cursor, GitHub Copilot, Codex or Gemini can read and change your scenes, GameObjects, components, prefabs and assets, write C# scripts, run C# snippets, run your EditMode and PlayMode tests, read the Console and take screenshots it can look at. This wiki explains how to install the plugin, connect an AI client and use it day to day.
What Unity MCP is
Unity MCP is a Unity package, com.ivanmurzak.unity.mcp, shown in the Package Manager as AI Game Developer — MCP. It runs inside the Unity Editor (and, if you choose, inside your built game). It exposes a set of tools through the Model Context Protocol (MCP), the open standard AI clients use to call external tools. The agent you chat with sees those tools and calls them to do the work you ask for.
The plugin is open source under the Apache-2.0 license and lives in the Unity-MCP repository. It shares its MCP and reflection libraries with Unreal MCP and Godot MCP, so the three engine plugins work the same way and use the same ai-game.dev account.
Since version 1.0.0 most Editor work goes through RQL, a query language over the Editor's data: one rql-query tool reads, one rql-mutate tool changes, and rql-schema describes what is available. A small set of focused tools covers screenshots, scripts, tests and packages. See Tools and RQL.
How the pieces fit together
| Piece | What it does |
|---|---|
| Unity MCP plugin | Runs in the Unity Editor, exposes the AI tools and connects to an MCP server. |
| MCP server | The hosted server at ai-game.dev (Cloud mode, the default), or a local gamedev-mcp-server the plugin downloads and starts for you (Custom mode). |
| AI client | Claude Code, Claude Desktop, Cursor, VS Code Copilot, Codex, Gemini, Rider and others. It connects to the same server. |
unity-mcp-cli | The npm command-line tool that installs the plugin, signs you in, writes AI client configs, opens Unity and calls tools from a terminal. |
| AI Game Dev app | The desktop app that installs the plugin, opens the Editor and runs the AI agent for you. |
In Cloud mode the Editor and your AI client both connect to https://ai-game.dev/mcp, and you sign in once with your ai-game.dev account. In Custom mode the plugin runs a local MCP server on your machine, so everything stays on your computer. Configuration explains both.
Requirements at a glance
- Unity 2022.3 or newer, including Unity 6.
- A project path without spaces (the plugin logs an error at startup if the path contains one).
- Internet access on first use: the plugin downloads its .NET dependencies from NuGet and, in Custom mode, its MCP server binary.
- An AI client that speaks MCP, or the AI Game Dev app.
Quick start
The easiest path is the desktop app: download it, sign in and open your Unity project. It installs the plugin and connects it for you. The app wiki covers that flow.
If you prefer a terminal and your own AI client, these commands take a Unity project to a connected agent:
npm install -g unity-mcp-cli
unity-mcp-cli install-plugin ./MyUnityProject
unity-mcp-cli login
unity-mcp-cli setup-mcp claude-code ./MyUnityProject
unity-mcp-cli open ./MyUnityProjectThen ask your agent something like "Create 3 cubes in a circle with radius 2". Getting started walks through the same steps with explanations.
Pages in this section
- Installation: every way to install the plugin (the app,
unity-mcp-cli, OpenUPM, the.unitypackageinstaller) and how to uninstall it. - Getting started: your first connection and first prompts.
- Connecting AI clients: Cloud vs local endpoints, sign-in, pinned URLs and the configurator for each agent.
- Configuration: the AI Game Developer window, connection modes, ports, the config file, environment overrides and builds.
- Tools and RQL: what the agent can do in the Editor.
- Custom tools: turn your own C# methods into AI tools, prompts and skills, including in a running game.
- Extensions: optional packages for Animation, Cinemachine, Input System, Navigation, ProBuilder, Terrain, Tilemap, Timeline and more.
- unity-mcp-cli reference: every command and flag.
- Troubleshooting: fixes for common problems.
- FAQ: short answers to common questions.
More on the site
- Unity tool catalog and the RQL reference.
- Unity extensions catalog.
- Unity best practices for prompting and project setup.
- MCP endpoint with config snippets for every supported client.
- Authentication, the quickstart and the Unity engine page.
- The other engines: Unreal MCP and Godot MCP.
- InstallationInstall Unity MCP (AI Game Developer) in a Unity project with the desktop app, unity-mcp-cli, OpenUPM or the .unitypackage installer.
- Getting startedConnect your first AI agent to the Unity Editor with Unity MCP, check the connection and try your first prompts in Claude Code, Cursor or Copilot.
- Connecting AI clientsConnect Claude Code, Cursor, Copilot, Codex, Gemini and other MCP clients to Unity MCP through the ai-game.dev cloud endpoint or a local server.
- ConfigurationConfigure Unity MCP in the AI Game Developer window - Cloud and Custom modes, local server, port, transport, authorization, tools, overrides and CI.
- Tools and RQLWhat an AI agent can do in the Unity Editor with Unity MCP - RQL queries and mutations, screenshots, C# scripts, tests, packages and profiling.
- Custom toolsWrite your own Unity MCP tools, prompts, resources and skills in C# with the AiTool attributes, run them on the main thread and use them in a built game.
- ExtensionsUnity MCP extensions add AI support for Animation, Cinemachine, Input System, Navigation, ProBuilder, Splines, Terrain, Tilemap, Timeline and particles.
- unity-mcp-cli referenceCommand reference for unity-mcp-cli - install Unity MCP, sign in, write AI agent configs, open Unity headless, run tools and C# from the terminal.
- TroubleshootingFix common Unity MCP problems - no tools in the AI client, sign-in and connection errors, server download failures, NuGet DLL errors and port conflicts.
- FAQAnswers to common questions about Unity MCP - supported Unity versions and AI clients, Cloud vs local mode, cost, privacy, builds, CI and RQL.