Unity MCP

Drive the Unity Editor from an agent through RQL queries, C# scripts, tests and screenshots

By Ivan Murzak (individual) C# Remote (hosted) · Streamable HTTPLocal · stdio Developer toolsMedia

82 popularity score ★ 4.6k ↓ 2.9k/wk

Connect your client

Remote (hosted)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add --transport http unity https://ai-game.dev/mcp
Claude (desktop and web)Settings → Connectors → Add custom connector
https://ai-game.dev/mcp
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "unity": {
      "url": "https://ai-game.dev/mcp"
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.unity]
url = "https://ai-game.dev/mcp"
VS Code.vscode/mcp.json
{
  "servers": {
    "unity": {
      "type": "http",
      "url": "https://ai-game.dev/mcp"
    }
  }
}
Local (Docker)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add unity -- docker run -i --rm -e MCP_PLUGIN_CLIENT_TRANSPORT=stdio -p 8080:8080 ivanmurzakdev/unity-mcp-server:latest
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "unity": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "MCP_PLUGIN_CLIENT_TRANSPORT=stdio",
        "-p",
        "8080:8080",
        "ivanmurzakdev/unity-mcp-server:latest"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "unity": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "MCP_PLUGIN_CLIENT_TRANSPORT=stdio",
        "-p",
        "8080:8080",
        "ivanmurzakdev/unity-mcp-server:latest"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "unity": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "MCP_PLUGIN_CLIENT_TRANSPORT=stdio",
        "-p",
        "8080:8080",
        "ivanmurzakdev/unity-mcp-server:latest"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.unity]
command = "docker"
args = ["run", "-i", "--rm", "-e", "MCP_PLUGIN_CLIENT_TRANSPORT=stdio", "-p", "8080:8080", "ivanmurzakdev/unity-mcp-server:latest"]
Gemini CLITerminal
gemini mcp add --scope user unity docker -- run -i --rm -e MCP_PLUGIN_CLIENT_TRANSPORT=stdio -p 8080:8080 ivanmurzakdev/unity-mcp-server:latest
Local (from source)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

Claude CodeTerminal
claude mcp add unity -- '<UNITY_PROJECT_PATH>/Library/mcp-server/<PLATFORM>/gamedev-mcp-server' --port=8080 --client-transport=stdio
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "unity": {
      "command": "<UNITY_PROJECT_PATH>/Library/mcp-server/<PLATFORM>/gamedev-mcp-server",
      "args": [
        "--port=8080",
        "--client-transport=stdio"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "unity": {
      "command": "<UNITY_PROJECT_PATH>/Library/mcp-server/<PLATFORM>/gamedev-mcp-server",
      "args": [
        "--port=8080",
        "--client-transport=stdio"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "unity": {
      "type": "stdio",
      "command": "<UNITY_PROJECT_PATH>/Library/mcp-server/<PLATFORM>/gamedev-mcp-server",
      "args": [
        "--port=8080",
        "--client-transport=stdio"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.unity]
command = "<UNITY_PROJECT_PATH>/Library/mcp-server/<PLATFORM>/gamedev-mcp-server"
args = ["--port=8080", "--client-transport=stdio"]
Gemini CLITerminal
gemini mcp add --scope user unity '<UNITY_PROJECT_PATH>/Library/mcp-server/<PLATFORM>/gamedev-mcp-server' -- --port=8080 --client-transport=stdio

Settings 8

MCP_PLUGIN_CLIENT_TRANSPORT Optional: How clients connect: stdio or streamableHttp. Default streamableHttp.
MCP_PLUGIN_PORT Optional: Port for the plugin and HTTP clients; must match the port set in the plugin. Default 8080.
MCP_PLUGIN_CLIENT_TIMEOUT Optional: Milliseconds to wait for the plugin to answer. Default 10000.
MCP_PLUGIN_TOOL_TIMEOUT Optional: Milliseconds a single tool call may run. A tool call is never sent twice. Default 300000.
MCP_BIND Optional: Where the HTTP listener binds: loopback when unset, any or 0.0.0.0 to expose it.
MCP_PLUGIN_IDLE_TIMEOUT_SECONDS Optional: Seconds with no connections before the server exits. Default 600.
Set together: auth
MCP_AUTH Optional: Client auth mode: none, token or oauth. It wins over the older MCP_AUTHORIZATION, where required means token. Default none.
MCP_PLUGIN_TOKEN secret Optional: Shared bearer token checked on client and plugin connections in token mode.

In a container, a setting goes in with -e NAME=value after docker run.

What it does

Unity MCP, which its maker also brands AI Game Developer, comes in two parts. A plugin installed in a Unity project exposes the Editor as MCP tools. A separate server program relays between the MCP client and that plugin on a local port, 8080 unless changed, and talks to the client over stdio or streamable HTTP. The plugin drops a prebuilt copy of that server under the project's Library folder. A Docker image is published as well.

Version 1.5.0 reworked the tool set. Most of the old per-area tools for scenes, GameObjects and the Profiler are gone. In their place sits a small query language called RQL. rql-query reads from sources like objects, prefabs, the console, test results or the profiler, and rql-mutate changes them in one checked batch that the Editor can undo and that is saved to disk. rql-schema tells the agent what each type holds.

Around that core sit tools to compile and run C# inside the Editor and to run EditMode or PlayMode tests. Another renders a single GameObject to an image so the agent can see its work. Script file editing and package management exist too, but they ship switched off, along with most screenshot tools. A user turns them on in the plugin's window, or an agent does it with tool-set-enabled-state once that tool is enabled. Project code can add its own tools with attributes.

A Node.js CLI, unity-mcp-cli, installs the plugin, opens projects and writes client configs for 14 agents. By default it signs in to the author's ai-game.dev service and points agents at a hosted endpoint there rather than at a local server.

What it needs

To run it yourselfA prebuilt binaryNode.js 20+Docker
Runs onmacOS, Windows, Linux
ai-game.devOnly for the CLI's default hosted route. The local binary and Docker server need no account
Also
  • Unity Editor open with the AI Game Developer plugin installed
  • An AI client that supports skills or dynamic tool updates

The plugin goes into the Unity project from the .unitypackage installer or OpenUPM, or with unity-mcp-cli install-plugin <UNITY_PROJECT_PATH>. Once the project is opened in the Editor, the prebuilt server sits under <project>/Library/mcp-server/<platform>/. Node.js is only needed for the CLI, which asks for ^20.19.0 or 22.12.0 and later. Docker is only needed for the container route.

Limits

  • Platform Project paths that contain spaces are not supported
  • Not covered Nothing works unless a Unity Editor with the plugin is open and connected on the same port as the server
  • Not covered Many tools ship turned off, among them script editing, package management and most screenshots
  • Size cap rql-mutate changes at most 20 targets per call, and long query results are cut short
  • Limit The server exits after 600 seconds with no connections unless MCP_PLUGIN_IDLE_TIMEOUT_SECONDS says otherwise
  • Limit The README and the default tools page still list tools that 1.5.0 removed, such as gameobject-create and profiler-start
  • Limit The Docker docs start the container with -t, but a stdio client needs -i, as given here
  • Not covered In a built game no tools exist until the developer writes them

Tools act only through a running Unity Editor with the plugin connected; the server alone does nothing. Project paths with spaces are not supported. In a built game no tools exist until the developer writes them. The plugin port and the server port must match. The server shuts itself down after 600 seconds with no connections by default.

Who it suits

Fits Unity developers who want an agent working inside the Editor on scenes, scripts and tests, and who are happy for it to go through one query language rather than dozens of narrow tools. It is a community project, not Unity's own. script-execute runs any C# the agent writes, so keep the project under version control. Those who want no third-party account should run the local binary or the Docker image instead of the CLI's default ai-game.dev endpoint. coplaydev/unity-mcp, which we also list, is a separate Unity bridge by another maker with its own tool set.

Tools 22 of 71

12 only read, 7 change things, 3 can delete or overwrite. A ? marks an optional parameter.

rql-query
Reads Editor state with an RQL query over objects, scenes, assets, the console, the profiler and morequery: string
rql-mutate changes
Changes scenes, objects and assets with an RQL statement, checked in full before anything is writtenquery: stringdry_run?: boolean
rql-schema
Describes the RQL sources and the fields of a given typetype?: string
script-execute changes
Compiles and runs a C# snippet or method inside the EditorcsharpCode: stringclassName?: stringmethodName?: stringparameters?: objectisMethodBody?: booleanusings?: arrayinclude?: array
script-read
Reads lines from a script file in the projectfilePath: stringlineFrom?: integerlineTo?: integer
script-update-or-create deletes
Writes a script file, replacing its content if it existsfilePath: stringcontent: string
script-delete deletes
Deletes script files from the projectfiles: array
tests-run
Runs EditMode or PlayMode tests with filters and returns the resultstestMode?: enumtestAssembly?: stringtestNamespace?: stringtestClass?: stringtestMethod?: stringquery?: stringresult?: stringincludePassingTests?: booleanincludeMessages?: booleanincludeStacktrace?: booleanincludeLogs?: booleanlogType?: enumincludeLogsStacktrace?: boolean
screenshot-isolated
Renders one GameObject on its own from a chosen angle and returns the imagegameObjectRef: objectincludeChildren?: booleanisolated?: booleanbackgroundMode?: enumbackgroundColor?: stringcameraView?: enumfieldOfView?: numbernearClipPlane?: numberfarClipPlane?: numberpadding?: numberlights?: stringresolution?: integer
screenshot-camera
Captures what a camera in the scene seescameraRef?: objectwidth?: integerheight?: integer
screenshot-game-view
Captures the Game view
screenshot-scene-view
Captures the Scene viewwidth?: integerheight?: integer
package-list
Lists the packages installed in the projectsourceFilter?: enumnameFilter?: stringdirectDependenciesOnly?: boolean
package-search
Searches the Unity package registryquery: stringmaxResults?: integerofflineMode?: boolean
package-add changes
Installs a package into the projectpackageId: string
package-remove deletes
Removes a package from the projectpackageId: string
unity-tool-list
Lists the tools the plugin offers, optionally filtered by a regexregexSearch?: stringincludeDescription?: booleanincludeInputs?: enum
tool-set-enabled-state changes
Turns plugin tools on or offtools: arrayincludeLogs?: boolean
ping
Checks the connection, echoing a message backmessage?: string
editor-session-quit changes
Saves and closes an Editor that a CLI session opened, given that session's noncenonce: string
unity-skill-create changes
Writes a new C# tool into the project for the plugin to load
unity-skill-generate changes
Generates skill files for every enabled toolpath?: string

Similar servers