How to Install Unity-MCP and Let AI Build and Test Your Unity Game
Unity-MCP connects AI agents to the Unity Engine, turning any C# function into a tool with one line. This guide covers what it does and how to install it.
What is Unity-MCP?
Unity-MCP is an AI skill, MCP tool and command-line tool for the Unity Engine, published on GitHub by IvanMurzak. It connects an AI agent to your Unity project so the agent can write gameplay code, test it, and debug it for you. Its headline idea is simple: any C# function can become an AI tool with a single line of code, which opens a fast loop of building and testing driven by AI.
It works with agents from Anthropic, OpenAI, Microsoft and other providers, with no lock-in to one vendor. The skill also adapts itself to your operating system, Unity version and project plugins.
What can you do with Unity-MCP?
- Let an AI agent develop game mechanics and test them automatically
- Have the AI debug problems and fix issues in your project
- Run a language model directly inside a compiled game, for dynamic NPC behaviour or in-game debugging
- Talk to the AI in plain language about your project, the way you would talk to a teammate
How to install Unity-MCP
Install the command-line tool with one command. On Windows, open CMD (press Start, type cmd and press Enter). Do not use PowerShell, because it blocks the installer script and the install will fail. On macOS or Linux, open a terminal. Then run:
npm install -g unity-mcp-cliAfter that, add the MCP server to your AI agent. In Claude Code, for example, use the MCP add command and point it at the installed tool. The README in the GitHub repo lists the setup for each supported agent.
First steps after installing
Open your Unity project and ask the agent a small question first, such as explaining the scene hierarchy. Then give it a small job: add one gameplay mechanic or fix one bug, and let it run the game to check the result. When that loop works, hand it bigger tasks and let it test each change as it goes.
Frequently asked questions
Is Unity-MCP free? Yes. It is an open-source project on GitHub, and you can download and use it free of charge.
Do I need anything else? Yes. Unity-MCP itself is free, but the AI agent you pair it with needs its own subscription or API access, and you need Unity installed.
How do I uninstall it? The project README does not give uninstall steps, so check the README on the project's GitHub page for the exact removal instructions.
Comments (0)