Unity MCP: How to Connect an AI Assistant to Unity on Windows and Mac
By Shah Rukh, software developer · · 7 min read
Unity MCP (the project now calls itself AI Game Developer) is an open-source plugin that lets an AI assistant such as Claude Code, Cursor or GitHub Copilot work directly inside the Unity game engine. This guide covers what you need, how to install it on Windows and Mac, how to connect your AI assistant, and the precautions to take before you let it touch a project.
Read this first. Unity MCP does not include an AI model. It is only the bridge. You still need the Unity Editor and a separate AI assistant, and that assistant may need its own paid plan or API credit. Once connected, the AI can create, change and delete assets and scripts and run C# code in your project, so back up your project first.
What Unity MCP is
MCP stands for Model Context Protocol. It is a standard way for an AI assistant to use outside tools. The README calls it “USB Type-C for AI”.
Unity MCP has three parts that talk to each other:
| Part | What it does | Where it comes from |
|---|---|---|
| AI agent | The chat window where you type requests | You install it yourself (Claude Code, Cursor and others) |
| MCP server | Passes messages between the AI agent and Unity | The plugin downloads and runs it for you |
| Unity plugin | Carries out the actions inside the Unity Editor | This project |
The project says the plugin ships with more than 70 built-in tools in four groups: project and assets, scene and hierarchy, scripting and editor, and profiling. Examples from the README are gameobject-create, scene-save, script-update-or-create, tests-run and screenshot-game-view. It also says the plugin can run inside a finished game, not only in the editor, but no tools exist there by default. You have to write your own.
The code is published under the Apache 2.0 licence. It is an independent project by Ivan Murzak. It is not made by Unity or by any AI company.
What you need
- The Unity Editor. The plugin’s package file lists Unity
2022.3as the minimum version. - A Unity project in a folder path with no spaces. The README marks this as a requirement:
C:/MyProjects/MyProjectworks,C:/My Projects/MyProjectdoes not. - One AI agent. The README recommends Claude Code and also lists Claude Desktop, GitHub Copilot in VS Code, Antigravity, Cursor and Windsurf. You only need one. The project says the agent must support Skills or dynamic MCP tool updates.
- Node.js, only if you use the command-line method. The CLI needs version
^20.19.0or>=22.12.0. - An ai-game.dev account, only if you use the project’s cloud connection. The CLI signs you in through your browser.
Costs: the plugin and CLI are free and open source. The repository does not list any prices for the ai-game.dev cloud service, so check that site yourself. Your AI agent and Unity have their own pricing and licence terms, which this project does not control.
Precautions before you install
- Back up the project. Tools such as
assets-delete,script-deleteandgameobject-destroyremove things. Put the project in Git or make a copy, and try the plugin on a test project first. - The AI can run code.
script-executecompiles and runs C# on the spot, andreflection-method-callcan call any C# method, even private ones. Read each permission prompt in your AI agent before you approve it. - Your project data leaves your computer. Scene contents, scripts, logs and screenshots that the AI reads are sent to the company behind your AI agent. Don’t use it on client or company work without permission.
- Know which connection you use. The plugin has two connection modes,
CloudandCustom. Cloud goes through the project’s ai-game.dev service. Custom uses a server you run yourself, for example on your own computer. - Protect the saved credentials.
unity-mcp-cli loginsaves a credential in~/.ai-game-dev/credentials.json, and project keys go in~/.ai-game-dev/project-keys.json. Connection settings and tokens are inUserSettings/AI-Game-Developer-Config.jsoninside the project. Don’t share or commit these files. - Turn on a token if you host the server. The standalone server’s authorization setting defaults to
none. If the server can be reached from other machines, setMCP_AUTHORIZATIONtotokenand choose a long randomMCP_PLUGIN_TOKEN. - Only use the real repository: github.com/IvanMurzak/Unity-MCP. On Windows the CLI may install Unity Hub silently if it is missing, which can ask for administrator rights.
How to install Unity MCP with the installer (Windows and Mac)
This method is the same on both systems and needs no terminal.
- Download AI-Game-Dev-Installer.unitypackage from the project’s releases page.
- Open your project in the Unity Editor.
- Double-click the downloaded file, or in Unity choose Assets, then Import Package, then Custom Package, and pick the file.
- Wait for Unity to finish importing and compiling.
How to install Unity MCP with the CLI on Windows and Mac
The README recommends this method. The commands are the same on Windows (PowerShell) and Mac (Terminal). Install Node.js first, then change ./MyUnityProject to your own project path.
- Install the CLI:
npm install -g unity-mcp-cli
- Add the plugin to your project. This edits
Packages/manifest.jsonand adds the OpenUPM package registry:unity-mcp-cli install-plugin ./MyUnityProject
- Sign in to ai-game.dev. It opens your browser and shows a short code to approve:
unity-mcp-cli login
- Open the project in Unity:
unity-mcp-cli open ./MyUnityProject
- Wait until Unity and the server are ready:
unity-mcp-cli wait-for-ready ./MyUnityProject
If you don’t have Unity or a project yet, the CLI has two optional commands: unity-mcp-cli install-unity and unity-mcp-cli create-project ./MyUnityProject.
Mac note: the open command tries to dismiss Unity’s “compile errors at launch” dialog for you. On macOS this needs Accessibility permission for your terminal, under System Settings, Privacy & Security, Accessibility. To skip the feature, add --no-auto-dismiss-launch-errors.
Connect your AI agent
- In Unity, open Window, then AI Game Developer.
- Click Auto-generate skills (the recommended option), or click Configure to set up MCP for your agent.
- If your agent is not in the list, copy the raw JSON shown in the window into your agent’s MCP settings.
You can do the same from the command line. This example is for Claude Code:
unity-mcp-cli setup-skills claude-code ./MyUnityProject unity-mcp-cli setup-mcp claude-code ./MyUnityProject
Run unity-mcp-cli setup-mcp --list to see all 14 supported agent names. By default setup-mcp writes a config that points to the ai-game.dev cloud. To have your agent start the local server instead, add --transport stdio.
First use
Keep Unity open, start your AI agent in the project folder and type a small request. The README suggests these:
- Explain my scene hierarchy
- Create 3 spheres on top of each other
- Create metallic golden material and attach it to a new sphere gameObject
In VS Code with Copilot, make sure Agent mode is on. Results depend heavily on the model your agent uses, so check what it built.
Useful settings and features
| Task | Command or setting |
|---|---|
| See which tools are enabled | unity-mcp-cli configure ./MyGame --list |
| Turn off risky tools | unity-mcp-cli configure ./MyGame --disable-tools script-execute,assets-delete |
| Check the connection | unity-mcp-cli status ./MyGame |
| Add an extension pack (Tilemap, Terrain, Animation and others) | unity-mcp-cli install-extension --list |
| Run the server in Docker | docker run -p 8080:8080 aigamedeveloper/mcp-server |
| Hide update popups for a whole team | Edit, Project Settings, AI Game Developer |
The standalone server uses port 8080 by default and shuts down after 600 seconds with no connections. When the CLI and plugin run a local server, they pick a fixed port for each project in the range 20000–29999, based on the project path.
How to uninstall Unity MCP
- In Unity, open Window, then Package Manager, select AI Game Developer — MCP and click Remove.
- Close Unity and delete the
Assets/Plugins/NuGetfolder and itsAssets/Plugins/NuGet.metafile.
From the command line, unity-mcp-cli remove-plugin ./MyUnityProject removes the plugin from the manifest and leaves the package registry entry in place. The project does not document a separate update command. The plugin shows a popup in the editor when a newer version is available.
Common problems
| Problem | What to try |
|---|---|
| Plugin fails or the server won’t start | Check the project path for spaces. Move the project to a path without them. |
unity-mcp-cli won’t install or run | Check your Node.js version. It must be ^20.19.0 or >=22.12.0. |
| The agent can’t see Unity | Run unity-mcp-cli status with your project path. Unity must be open with the plugin installed. |
| Your agent is missing from the window | Copy the raw JSON from the AI Game Developer window into the agent’s MCP config. |
| Copilot answers but does nothing in Unity | Switch VS Code Copilot to Agent mode. |
| Self-hosted server and Unity don’t connect | Make sure the server and the plugin use the same port. |
| On Mac, Unity hangs on a launch dialog | Give your terminal Accessibility permission, or click the dialog yourself. |
| Something else | Add --verbose to any CLI command for more detail. |
For anything else, report the problem on GitHub.
This guide is based on the project’s repository as it was on October 2, 2026. The project changes often, so if a step looks different, follow the README on GitHub. ToolsCloset is not connected to the project, to Unity Technologies or to any AI provider. Unity is a trademark of Unity Technologies.
Frequently asked questions
Is Unity MCP free?
The plugin and its command-line tool are open source under the Apache 2.0 licence and free to install. You still need the Unity Editor and an AI assistant, which have their own pricing. The repository does not list prices for the ai-game.dev cloud service.
Does Unity MCP include an AI model?
No. It only connects an AI assistant you already have, such as Claude Code, Cursor or GitHub Copilot, to the Unity Editor. The answers come from that assistant’s model.
Which Unity version does Unity MCP need?
The plugin’s package file lists Unity 2022.3 as the minimum version. The project path must not contain spaces.
Does Unity MCP work on Windows and Mac?
Yes. The installer package works inside the Unity Editor on both, and the command-line tool is described as cross-platform for Windows, macOS and Linux.
Is Unity MCP safe to use on a real project?
It can delete assets and scripts and run C# code, so treat it with care. Back up the project or use Git, review what your AI assistant asks to do, and disable tools you do not want with the configure command.
Do I need an ai-game.dev account?
Only for the cloud connection, where the CLI login command signs you in through the browser. The plugin also has a Custom mode for a server you run yourself, and the server can run locally or in Docker.
How do I remove Unity MCP?
Remove the AI Game Developer — MCP package in Unity’s Package Manager, close Unity, then delete the Assets/Plugins/NuGet folder and its .meta file.
More AI tips
EmailOSINT Review and Guide
See which accounts, data breaches and stolen-password logs are tied to your email, and what to do about each result.
Free Claude Code Setup Guide
Run the Claude Code app with free AI models on Windows or Mac. Full steps, plus the precautions most guides skip.
OpenHands Agent Canvas Guide
Set up the OpenHands control centre for AI coding agents on Windows or Mac, with the safety steps to take first.
Dify Self-Hosting Guide
Run the Dify AI app builder on your own computer with Docker Compose, and know the costs and licence limits first.
LibreChat Docker Setup Guide
Run your own ChatGPT-style chat app on your computer with Docker. Full steps, real costs and safety checks.
sprite-gen Setup Guide
Turn one character drawing into a transparent game sprite sheet. Setup steps, real costs and precautions.
Logo Design Skill Setup Guide
Add a free logo-design skill to Claude or another AI agent on Windows or Mac, with the precautions to take first.
Openvid Screen Demo Guide
Record your screen and turn it into a polished demo in the browser, or run Openvid yourself on Windows or Mac.
ReelMimic Setup Guide
Set up ReelMimic to make an original 2D animation in the style of a reference video, with the copyright checks to do first.