Connect Claude Code to Unity 6 MCP Server

Intermediate7m readFull-stack developers

Unity 6's open-beta MCP Server lets AI coding assistants like Claude Code and Cursor see and change your live game scene — not just your source files. This guide explains what it is, how to enable it in Project Settings, the tools it exposes, how to connect each client, and how to use it to fix a real scene-level bug.

Primary Focus

ai &-machine-learning

AI Tools Covered

unityunity-mcpclaude-code

What You'll Learn

  • What Unity MCP Is and Why It Matters
  • Enable Unity MCP in Project Settings
  • The Tools Unity Exposes
  • Connect Claude Code, Cursor, Copilot, and Windsurf
  • Worked Example — Diagnosing a Scene Bug with Claude Code
  • Tune the Tool Set Per Task Type

Guide Curriculum

Foundation

Learn key concepts

2 lessons
  • What Unity MCP Is and Why It Matters1m
  • Enable Unity MCP in Project Settings1m

Implementation

Learn key concepts

2 lessons
  • The Tools Unity Exposes1m
  • Connect Claude Code, Cursor, Copilot, and Windsurf1m

Mastery

Learn key concepts

3 lessons
  • Worked Example — Diagnosing a Scene Bug with Claude Code1m
  • Tune the Tool Set Per Task Type1m
  • Next Steps1m

Preview: First Lesson

Foundation

What Unity MCP Is and Why It Matters

Objectives: understand what Unity MCP changes about AI-assisted game work, and turn it on.

Before Unity MCP, an AI assistant working on a Unity project could only read what every other text tool reads: your C# scripts. It could not tell you why a prefab spawns in the wrong place, because the answer is not in the code — it is in a serialized component value, a physics layer, or a scene-hierarchy mistake the code never mentions.

Unity MCP closes that gap. It is built on the Model Context Protocol (MCP), the open standard for letting AI agents call external tools through a structured, permissioned interface. Unity runs a local MCP Server that exposes the editor's own capabilities — scene management, GameObject and component inspection, asset operations, script editing, and console access — as MCP tools. The assistant now sees the project state, not just the project's text.

Why this matters in practice: bugs that used to require you to be the translator between the editor and the AI ("the enemy prefab has its Rigidbody set to kinematic, here's a screenshot…") can now be investigated by the assistant directly.

Free Access

Start learning with this comprehensive guide

This guide includes:

3 modules with 7 lessons
7m estimated reading time

About the Author

H
✨ Vibe Coder
@hiram-clark

Hiram Clark is the founder of vybecoding.ai and editor of every guide and news article published on the site. He reviews all AI-drafted content for accuracy before publication and is personally accountable for factual errors. He works hands-on with the AI development tools, workflows, and infrastructure covered here.

Full Guide Content

Complete lesson text — start the interactive course above for exercises and progress tracking.

Module 1Foundation

1.1What Unity MCP Is and Why It Matters

Objectives: understand what Unity MCP changes about AI-assisted game work, and turn it on.

Before Unity MCP, an AI assistant working on a Unity project could only read what every other text tool reads: your C# scripts. It could not tell you why a prefab spawns in the wrong place, because the answer is not in the code — it is in a serialized component value, a physics layer, or a scene-hierarchy mistake the code never mentions.

Unity MCP closes that gap. It is built on the Model Context Protocol (MCP), the open standard for letting AI agents call external tools through a structured, permissioned interface. Unity runs a local MCP Server that exposes the editor's own capabilities — scene management, GameObject and component inspection, asset operations, script editing, and console access — as MCP tools. The assistant now sees the project state, not just the project's text.

Why this matters in practice: bugs that used to require you to be the translator between the editor and the AI ("the enemy prefab has its Rigidbody set to kinematic, here's a screenshot…") can now be investigated by the assistant directly.

1.2Enable Unity MCP in Project Settings

Unity MCP ships in the com.unity.ai.assistant package and requires Unity 6 (6000.0) or later.

  1. Open Edit > Project Settings > AI > Unity MCP.
  2. Confirm the Unity Bridge shows a green Running indicator. Unity launches the relay binary automatically at editor startup and installs it under ~/.unity/relay/. No manual server process is needed.
  3. Leave this panel open — you will return to it to approve clients in Module 2.

Pricing note: Unity AI runs on a credit model during the open beta, and credit allotments differ by plan tier (Personal, Pro, Enterprise, Industry). Because beta pricing changes, check Unity's official Unity AI / pricing page for the current credit allotment and MCP Server access for your plan rather than relying on a figure quoted here.

Module 2Implementation

2.1The Tools Unity Exposes

Objectives: know what the server exposes, and connect each AI client to it.

Your MCP client lists Unity's tools under a Unity_ prefix. Unity discovers and registers them automatically when the editor starts; each tool declares a name, description, input parameters, and an optional output schema so the client knows how to call it. The documented built-in categories are scene management, asset operations, script editing, and console access, and the official docs name tools such as:

  • Unity_ManageScene — open, save, and inspect scenes and the scene hierarchy.
  • Unity_ManageGameObject — create, find, modify, and read GameObjects and their components.
  • Unity_ReadConsole — read editor console output, including errors and warnings.

Rather than a fixed list, the Unity MCP settings panel shows every available tool with an individual enable/disable toggle. That toggle list — not a static "default vs optional" table — is the source of truth for which tools an agent can call, and you can also register custom tools of your own. Multiple MCP clients can connect to one Unity instance at the same time.

2.2Connect Claude Code, Cursor, Copilot, and Windsurf

Unity's official one-click setup lives in the same settings page:

  1. In Edit > Project Settings > AI > Unity MCP, open the Integrations section.
  2. Find your client and select Configure. Unity's documentation explicitly supports Claude Code, Cursor, Windsurf, and Claude Desktop here, writing the client config for you. Any MCP-capable client (this is how VS Code's Copilot MCP support connects too) can instead be pointed manually at the relay executable with the --mcp flag — for example on Windows:
%USERPROFILE%\.unity\relay\relay_win.exe --mcp
  1. Back in the Unity MCP panel, find your client under Pending Connections and select Accept.
  2. Confirm it now appears under Connected Clients with tools like Unity_ReadConsole available.

Module 3Mastery

3.1Worked Example — Diagnosing a Scene Bug with Claude Code

Objectives: use the connection to solve a real problem, and keep the tool set focused.

Symptom: an enemy prefab spawns but never falls or collides.

With Unity MCP connected, ask Claude Code in plain language: "The Enemy object in the current scene isn't affected by gravity or collisions — inspect it and tell me why." Claude Code can now:

  1. Call Unity_ManageScene to load the active scene and locate the Enemy GameObject.
  2. Call Unity_ManageGameObject to read its components and discover the Rigidbody has Is Kinematic enabled and the collider is on a physics layer the floor ignores.
  3. Call Unity_ReadConsole to confirm no exceptions are masking the issue.
  4. Use Unity_ManageGameObject again to disable Is Kinematic and move the collider to the correct layer — then verify the fix.

None of that information lived in your C# files, which is exactly why a code-only assistant could never have found it.

3.2Tune the Tool Set Per Task Type

More tools is not better. Every enabled tool is described to the model on each request, so an overstuffed tool list adds noise and dilutes the agent's focus. Use the per-tool toggles in the Unity MCP panel to match the task:

  • Debugging a scene: enable scene, GameObject, and console tools; disable asset and script-editing tools.
  • Asset/import cleanup: enable asset-operation tools; disable scene and console tools.
  • Script generation: enable script-editing and console tools; disable scene-management tools.

Turn tools back on as the task changes. Treating the toggle panel as a per-task focus control is the single highest-leverage habit for getting reliable results from Unity MCP.

3.3Next Steps

Connect one client, enable only scene + console tools, and reproduce the worked example on a real bug in your own project. Then read Unity's "Register custom MCP tools" documentation to expose a project-specific automation as its own Unity_ tool.

Sources

  • Unity MCP overview — docs.unity3d.com/Packages/[email protected]/manual/unity-mcp-overview.html
  • Get started with Unity MCP — docs.unity3d.com/Packages/[email protected]/manual/unity-mcp-get-started.html
  • Unity AI open beta announcement — discussions.unity.com/t/unity-ai-s-open-beta-now-live-for-unity-6/1718560
  • Unity AI Open Beta: Get started with MCP (source video) — youtube.com/watch?v=2sswkdV1y3c