AI Game Developer (Unity MCP)
Lets your AI agent work inside the Unity Editor and in running games: create objects, edit scripts, run tests and debug.
4.6k stars on GitHubby Ivan MurzakLicense Apache-2.0Updated 18 days ago
How to install
This MCP has two ways to run: local or remote.
Pick one below. Local runs on your computer; remote runs in the cloud and needs nothing installed.
Paste in the terminal:
claude mcp add unity -- dnx com.IvanMurzak.GameDev.MCP.Server --yes
What to fill in
| Name | What it is | Required |
|---|---|---|
MCP_PLUGIN_PORT | Client -> Server <- Plugin connection port (default: 8080) | No |
MCP_PLUGIN_CLIENT_TIMEOUT | Plugin -> Server connection timeout (ms) (default: 10000). Tool calls use MCP_PLUGIN_TOOL_TIMEOUT instead. | No |
MCP_PLUGIN_TOOL_TIMEOUT | How long one tool call may run in the plugin (ms). A tool call is sent once and never re-sent (default: 300000, or MCP_PLUGIN_CLIENT_TIMEOUT if larger) | No |
MCP_PLUGIN_CLIENT_TRANSPORT | Client -> Server transport type: stdio or streamableHttp (default: stdio) | No |
MCP_AUTH | Authentication mode: none or oauth. Default depends on transport: stdio -> none (offline/local/CI), streamableHttp -> oauth when MCP_AUTH_ISSUER + MCP_PUBLIC_URL are set, otherwise none. oauth validates ES256 JWTs (via cached JWKS) issued by MCP_AUTH_ISSUER, audienced to MCP_PUBLIC_URL. | No |
MCP_AUTH_ISSUER | OAuth authorization-server URL (e.g. https://ai-game.dev). Required when MCP_AUTH=oauth. | No |
MCP_PUBLIC_URL | This server's canonical public resource URL (its token audience, e.g. https://ai-game.dev/mcp). Required when MCP_AUTH=oauth; also seeds the Origin allow-list. | No |
MCP_BIND | Network bind address: loopback (default), any (0.0.0.0), or a specific IP. Hosted deploys reachable by a reverse proxy set MCP_BIND=0.0.0.0. | No |
MCP_ALLOWED_ORIGINS | Comma/semicolon-separated additional allowed Origins for browser clients (in addition to loopback + the MCP_PUBLIC_URL origin). Avoids a blanket wildcard on credentialed paths. | No |
Ready! Now test it
Restart the app and paste one of these requests in the chat:
Create 3 cubes in a circle with radius 2.
Write a script for a simple player controller and run the tests.
What it is
Unity MCP connects AI agents to the Unity Editor, and it can also work inside a compiled game. Most Editor work goes through RQL, a small query language that reads and changes scenes, objects, assets and settings. Agents can write and run C# code, take screenshots, run tests and fix problems. You can add your own tools with a single line of C#.
What it can do
rql-query: read Editor data such as scenes, objects and console logsrql-mutate: change Editor data or call Editor operationsrql-schema: describe what RQL can usescreenshot-isolated: render a GameObject from a chosen anglescript-execute: compile and run C# with Roslyntests-run: run EditMode and PlayMode testsunity-tool-list: list tools and which ones the agent sees
When to use
- βΊWhen you want to build scene content by describing it, such as cubes in a circle.
- βΊWhen you want an agent to write game code and run the tests.
- βΊWhen you want an agent to debug a problem in your project.
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
unity-developerLets your agent develop Unity games with optimized C# code. It efficiently manages assets and prepares the game for different platforms.unity-ai-game-creatorHelps your agent create complete Unity games from ideas. It generates visual elements, scene structures, and sounds, guiding development step-by-step.game-developerHelps your agent build game systems in Unity or Unreal Engine, covering entity design, physics, multiplayer networking, and frame rate tuning.Frequently asked questions
Is it free and open source?
The readme says it works with the listed agents for free, and it shows a license file.
Which agents does it work with?
Claude, Codex, Cursor, GitHub Copilot, Gemini, Antigravity, OpenCode, Cline, Kilo Code and others, with no vendor lock-in.
Can it work inside a built game?
Yes. The readme says it works inside your compiled game for real-time AI debugging and player-AI interaction.
Does it run locally?
It works locally over stdio and remotely over http, set by configuration. A Docker image of the server is also published.
Why do I see only a few tools?
Only seven are shown to the agent by default. Others are hidden but still run by name. Show them with tool-set-visibility.
Can I add my own tools?
Yes. Any C# method can be turned into a tool with a single line, and extensions add Animation, Cinemachine, Terrain and more.
If it does not work
- βΊIn Unity, open Window/AI Game Dev and click Auto-generate skills or Configure MCP for your agent.
- βΊWith the CLI route, run unity-mcp-cli login to sign in to ai-game.dev, then open the project with unity-mcp-cli open.
- βΊIf a tool seems missing, it may be hidden by default. Check unity-tool-list and show it with tool-set-visibility.
5 new skills a week. 1 minute to read.