Data as of

MCP for Unity for Claude Code: Setup & Config

MCP for Unity links Claude Code to the Unity Editor for scene work, asset management, script editing, testing, and builds.

What you can do with MCP for Unity in Claude Code

Connect AI-assisted coding with direct Unity scene, asset, testing, and build operations.

  • Create scenes and GameObjects from natural-language instructions.
  • Run tests, profile a project, and initiate builds.

Before you start: MCP for Unity in Claude Code

  • Unity 2021.3 LTS through 6.x
  • Python 3.10 or later via uv
  • An MCP-compatible client
  • OpenUPM when using this installation command

This command installs the Unity package, not a standalone MCP launch process. Alternatively, add https://github.com/CoplayDev/unity-mcp.git?path=/MCPForUnity#main in Package Manager, then use Window > MCP for Unity > Configure All Detected Clients. Individual tool names and a standalone server launch command are not stated in the README.

MCP for Unity Claude Code configuration

  1. Choose Claude Code configuration scope

    For MCP for Unity, open Project scope: .mcp.json at the repository root. Project JSON: merge into mcpServers; user scope: use the CLI.

  2. Add MCP for Unity to Claude Code

    Use the unity-mcp entry below in mcpServers. Keep MCP for Unity's documented stdio connection fields and your other Claude Code entries.

  3. Check MCP for Unity in Claude Code

    MCP for Unity: Inspect claude mcp list and /mcp status.

Config file · Project scope: .mcp.json at the repository root

JSON
{
  "mcpServers": {
    "unity-mcp": {
      "type": "stdio",
      "command": "openupm",
      "args": [
        "add",
        "com.coplaydev.unity-mcp"
      ],
      "env": {}
    }
  }
}

CLI (POSIX shell)
claude mcp add-json --scope project 'unity-mcp' '{"type":"stdio","command":"openupm","args":["add","com.coplaydev.unity-mcp"],"env":{}}'

Troubleshooting MCP for Unity in Claude Code

  • MCP for Unity's openupm add command installs a Unity package. Follow the upstream editor setup before expecting a stdio connection in Claude Code.
  • If MCP for Unity fails to start, check openupm, the working directory, and Claude Code's selected scope; inspect claude mcp list and /mcp.
  • Known limitation: Requires a supported Unity installation and Python through uv.
  • Known limitation: Individual tool identifiers are not stated in the supplied README.
  • Known limitation: Advanced routing and remote authentication require separate documentation.
  • General Claude Code troubleshooting lives in the /clients/claude-code guide.

MCP for Unity — details. Claude Code guide

Frequently asked questions

Register MCP for Unity with the displayed claude mcp add-json --scope project command, or merge the JSON into .mcp.json at the repository root.