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:

PartWhat it doesWhere it comes from
AI agentThe chat window where you type requestsYou install it yourself (Claude Code, Cursor and others)
MCP serverPasses messages between the AI agent and UnityThe plugin downloads and runs it for you
Unity pluginCarries out the actions inside the Unity EditorThis 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

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

  1. Back up the project. Tools such as assets-delete, script-delete and gameobject-destroy remove things. Put the project in Git or make a copy, and try the plugin on a test project first.
  2. The AI can run code. script-execute compiles and runs C# on the spot, and reflection-method-call can call any C# method, even private ones. Read each permission prompt in your AI agent before you approve it.
  3. 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.
  4. Know which connection you use. The plugin has two connection modes, Cloud and Custom. Cloud goes through the project’s ai-game.dev service. Custom uses a server you run yourself, for example on your own computer.
  5. Protect the saved credentials. unity-mcp-cli login saves a credential in ~/.ai-game-dev/credentials.json, and project keys go in ~/.ai-game-dev/project-keys.json. Connection settings and tokens are in UserSettings/AI-Game-Developer-Config.json inside the project. Don’t share or commit these files.
  6. 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, set MCP_AUTHORIZATION to token and choose a long random MCP_PLUGIN_TOKEN.
  7. 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.

  1. Download AI-Game-Dev-Installer.unitypackage from the project’s releases page.
  2. Open your project in the Unity Editor.
  3. Double-click the downloaded file, or in Unity choose Assets, then Import Package, then Custom Package, and pick the file.
  4. 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.

  1. Install the CLI:
    npm install -g unity-mcp-cli
  2. Add the plugin to your project. This edits Packages/manifest.json and adds the OpenUPM package registry:
    unity-mcp-cli install-plugin ./MyUnityProject
  3. Sign in to ai-game.dev. It opens your browser and shows a short code to approve:
    unity-mcp-cli login
  4. Open the project in Unity:
    unity-mcp-cli open ./MyUnityProject
  5. 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

  1. In Unity, open Window, then AI Game Developer.
  2. Click Auto-generate skills (the recommended option), or click Configure to set up MCP for your agent.
  3. 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:

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

TaskCommand or setting
See which tools are enabledunity-mcp-cli configure ./MyGame --list
Turn off risky toolsunity-mcp-cli configure ./MyGame --disable-tools script-execute,assets-delete
Check the connectionunity-mcp-cli status ./MyGame
Add an extension pack (Tilemap, Terrain, Animation and others)unity-mcp-cli install-extension --list
Run the server in Dockerdocker run -p 8080:8080 aigamedeveloper/mcp-server
Hide update popups for a whole teamEdit, 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

  1. In Unity, open Window, then Package Manager, select AI Game Developer — MCP and click Remove.
  2. Close Unity and delete the Assets/Plugins/NuGet folder and its Assets/Plugins/NuGet.meta file.

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

ProblemWhat to try
Plugin fails or the server won’t startCheck the project path for spaces. Move the project to a path without them.
unity-mcp-cli won’t install or runCheck your Node.js version. It must be ^20.19.0 or >=22.12.0.
The agent can’t see UnityRun unity-mcp-cli status with your project path. Unity must be open with the plugin installed.
Your agent is missing from the windowCopy the raw JSON from the AI Game Developer window into the agent’s MCP config.
Copilot answers but does nothing in UnitySwitch VS Code Copilot to Agent mode.
Self-hosted server and Unity don’t connectMake sure the server and the plugin use the same port.
On Mac, Unity hangs on a launch dialogGive your terminal Accessibility permission, or click the dialog yourself.
Something elseAdd --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.

Related tools

🧾

CSV to JSON

Convert CSV or spreadsheet data to JSON.

⬇️

Markdown to HTML

Convert Markdown to clean HTML with live preview.

🔑

Password Generator

Strong random passwords with a strength meter.