explainx.ainewsletter3.5k
TrendingNewsPathwaysSkills
Pricing
explainx.ai

Upskill in AI — 16 free pathways, live workshops & bootcamps, and 50+ courses from practitioners. Plus the skills, tools, and MCP servers to practice on.

follow us

corporate training

support@explainx.ai

get started

Find your pathTake Free Evaluation

learn

pathways — start freeworkshopsbootcampscoursescertificationsmock testsexplainx universitycorporate traininglearn skills & mcp

discover

skillsmcp serversexplainx mcptoolsagentsllmsdesignsdictionaryagi trackerranks

company

aboutvisionmissionteaminstructorscommunityhackathonscareers

content

daily AI newsstate of AI — live resultsblogreleasespromptsgeneratorsresource libraryfor LLMsexplainx.ai kids

solutions

all solutionsdeveloper upskillingmarketing upskillingproduct manager upskillingleadership upskilling

newsletter · weekly

Get AI news, tools, and insights in your inbox.

supportcontactprivacytermsdata rightshow we create contentsubmission guidelines

© 2026 AISOLO Technologies Pvt Ltd

On this page

  • Quick reference
  • What Unity MCP actually is
  • Step 1: Confirm the Unity CLI is installed
  • Step 2: Start the MCP server
  • Step 3: Configure Claude Code as a client
  • Step 4: Verify the connection
  • Step 5: Use it inside Claude Code
  • Useful Claude Code commands while you work
  • Workflow tips
  • Related reading
← Back to blog

explainx / blog

How to Connect Claude Code to Unity With Unity MCP

Connect Claude Code to Unity using Unity's official CLI-based MCP server — install, run `unity mcp configure claude-code`, verify the connection, and drive the Unity Editor with natural language prompts.

Aug 20, 2026·7 min read·Yash Thakker
MCPClaude CodeUnityGame DevelopmentDeveloper Tools
go deep
How to Connect Claude Code to Unity With Unity MCP

Unity added an official Model Context Protocol (MCP) server to its CLI in June 2026, which means Claude Code can now inspect and drive a live Unity Editor session the same way it reads and edits files in a repo — through plain-language prompts instead of manual Inspector clicks. If you've already set up MCP servers for other tools, the pattern here is identical: one CLI command starts a server, one command registers Claude Code as a client, and then you're prompting against a real running application instead of a mocked API.

This guide covers the exact commands: installing/checking the Unity CLI, starting the MCP server with unity mcp, wiring up Claude Code with unity mcp configure claude-code, verifying the connection, and the first prompts worth running before you trust it with real Editor changes.

Claude Code connected to Unity Editor through an MCP server, terminal and viewport linked by a glowing line

Quick reference

table · 3 cols
StepCommandWhat it does
Check Unity CLI is installedunity --versionConfirms the unity command is on your PATH
See MCP subcommandsunity mcp --helpLists configure and other MCP options
Start the MCP server manuallyunity mcpRuns a stdio MCP server, waits for a client
List every supported clientunity mcp configure --listShows client names Unity's CLI recognizes
Configure Claude Codeunity mcp configure claude-codeRegisters unity-editor-mcp in Claude Code's user config
Verify Claude Code sees itclaude mcp listConfirms unity-editor-mcp is registered
Start promptingclaude (inside the project folder)Launches Claude Code's interactive session

What Unity MCP actually is

MCP is the open standard that lets an AI client — Claude Code, Cursor, Claude Desktop — talk to external systems through a common protocol instead of a bespoke integration per tool. Unity's MCP server exposes the currently open Unity Editor as an MCP server: scene name, GameObject hierarchy, and component data become things a connected client can read and, with permission, modify.

That's a meaningfully different shape from most MCP servers, which wrap a remote API (a database, a SaaS product, a search index). Unity MCP wraps a local desktop application that has to already be running — the server doesn't simulate a Unity project, it talks to your actual open Editor instance. If Unity isn't open, there's nothing for the MCP server to inspect.

Unity ships this server directly through its CLI rather than as a separate community package, and documents unity mcp configure <client> with explicit support for Claude, Claude Code, Cursor, and VS Code.

Step 1: Confirm the Unity CLI is installed

When you create a new Unity project, recent project templates include a "Use Unity CLI" option. If you left it checked, unity should already be on your PATH:

bash
unity --version

If that returns a version number, you're set. If your terminal says command not found, the Unity CLI isn't installed or enabled for that machine yet — that's the case if "Use Unity CLI" was left unchecked during project creation, and you'll need to install it via Unity Hub before continuing.

Once unity --version works, check the MCP subcommands specifically:

bash
unity mcp --help

You should see configure listed as a subcommand, along with usage examples like:

snippet
Commands:
  configure [options] [client]  Write MCP server config for an AI agent client

Examples:
  unity mcp                                   Start the MCP stdio server
  unity mcp --project-path /path/to/MyProject Start server for a specific project
  unity mcp configure claude                  Configure Claude Desktop
  unity mcp configure --list                  Show all supported clients

Step 2: Start the MCP server

From inside your Unity project directory, with the project open in the Editor:

bash
unity mcp

This starts a stdio MCP server and blocks, waiting for a client to connect:

snippet
unity mcp: MCP server started (stdio). Waiting for a client to connect.
  Connect via Claude Desktop, Cursor, VS Code, or the MCP Inspector.
  Press Ctrl-C to stop.

You generally won't run this manually in day-to-day use — Claude Code will launch unity mcp itself once it's configured as a client, the same way any stdio MCP server gets spawned on demand. Running it by hand once is a useful sanity check that the CLI and your Editor version are compatible before you wire up a client.

Step 3: Configure Claude Code as a client

Stop the manual server (Ctrl-C) and run the configure command from your project folder:

bash
unity mcp configure claude-code

Under the hood, this runs Claude Code's own MCP registration command for you:

snippet
Running: claude mcp add --scope user --transport stdio unity-editor-mcp unity mcp
Added stdio MCP server unity-editor-mcp with command: unity mcp to user config
File modified: /path/to/.claude.json

That --scope user matters: the server is registered once per machine, not per project. If you run unity mcp configure claude-code again from a different project folder, you'll see:

snippet
MCP server unity-editor-mcp already exists in user config
Error: claude exited with status 1.

That's not a failure — it means the configuration already succeeded on an earlier run. Claude Code will launch unity mcp from wherever you start claude, and Unity MCP auto-discovers whichever Editor instance currently has that project open, so there's no need to reconfigure per project.

Weekly digest3.5k readers

Catch up on AI

Curated AI updates on agents, skills, and MCP — delivered to your inbox. Unsubscribe anytime.

Step 4: Verify the connection

Before touching real work, confirm Claude Code actually sees the server:

bash
claude mcp list

You should see unity-editor-mcp in the output. If it's missing, re-run unity mcp configure claude-code and check the File modified path it reports actually matches your Claude Code config location.

Step 5: Use it inside Claude Code

Keep your Unity project open in the Editor, then from the project folder:

bash
cd ~/path/to/MyGame
claude

Claude Code launches its interactive session. Don't hand it a build task first — start with something read-only and easy to verify:

snippet
Use the Unity MCP tools to inspect my currently open Unity project.

Tell me:
1. What scene is currently open
2. What GameObjects are in the hierarchy
3. Whether you can successfully communicate with the Unity Editor

Don't modify anything yet.

If the scene name and hierarchy Claude Code reports match what's actually open in the Editor, the full chain — Claude Code → Unity MCP → Unity Editor — is confirmed working.

First write test

Once the read-only check passes, try a small, easily-reversible write:

snippet
Using Unity MCP, create a 2D Sprite GameObject called Collectible at (0,0,0).
Make it a simple colored circle and save the current scene.

If Collectible shows up in the Unity hierarchy, Claude Code successfully modified the live Editor state through MCP — not just generated code you'd have to paste in yourself.

Initialize project instructions

Once the connection is confirmed, run /init inside Claude Code. This is the same /init command used in any Claude Code project — it generates a CLAUDE.md that Claude Code automatically reads in future sessions, so you don't re-explain your project's conventions every time.

For a Unity project, a useful first CLAUDE.md addition is telling Claude Code to prefer MCP over asking you to manually manipulate the Editor:

snippet
We're building a 2D top-down arena game.

Use Unity MCP tools whenever possible rather than asking me to manually
manipulate the editor.

For the first prototype:
- Create a simple arena
- Add a player GameObject that moves with WASD
- Add placeholder enemy GameObjects that move toward the player
- If an enemy touches the player, reduce a health value
- Add a simple health UI

Use placeholder shapes only — no art, no polish yet.
Work incrementally and check the Unity console for errors as you go.

Claude Code will read files, write scripts, run commands, and — through Unity MCP — interact with the Editor directly, typically asking permission before Editor-modifying actions unless your permission settings say otherwise.

Useful Claude Code commands while you work

A handful of core commands cover most of a Unity + Claude Code session:

table · 2 cols
CommandWhat it does
/helpShows available commands
/initGenerates or refreshes CLAUDE.md for the project
/clearStarts a fresh context, useful between unrelated features
/resumeResumes a previous conversation in this project
claude -cResumes the most recent conversation directly from the terminal
claude "prompt"Starts Claude Code and runs one prompt immediately

For Unity specifically, claude "Use Unity MCP to inspect this project and tell me its current state." is a fast way to re-sync context at the start of a new session, since Claude Code doesn't retain memory of the live Editor state between sessions — only MCP gives it that.

Workflow tips

  • Keep Unity open the whole time. Unity MCP talks to a running Editor instance; if you close the project, MCP calls will fail until it's reopened.
  • Split screen it. Put Unity on one side and the terminal running Claude Code on the other, so you can watch changes land in the hierarchy in real time — that visibility is the fastest way to catch when a prompt did something unexpected.
  • Start every session with a read-only inspect prompt before asking for changes, the same way you'd git status before a risky command — it confirms the connection is live and catches stale state.
  • Use placeholder shapes for prototyping. Ask for primitive cubes, spheres, and colored sprites rather than final art. Iterate on mechanics with Claude Code first, then swap in real assets once the design is validated.
  • Watch the Unity console. Ask Claude Code to check for compiler errors after each incremental change rather than batching a large feature and debugging blind afterward — this mirrors how Claude Code's own coding workflow recommends testing after each step rather than at the end.

Related reading

  • UEFN Unreal MCP — Fortnite Verse and devices via agents (Aug 20, 2026)
  • What is MCP? Model Context Protocol Complete Architecture Guide
  • Claude Code Commands: Complete Slash Command Reference
  • Build Your First MCP Server: Step-by-Step Guide
  • How to Use Claude Connectors & MCP Servers: Complete Guide
  • MCP Security Guide
  • How to Build a Hop.Earth-Style AI Driving Game
  • What Are Agent Skills? Complete Guide
  • Official docs: Unity CLI and Anthropic's Claude Code documentation

Explore more official MCP servers and AI agent skills on explainx.ai, or check the workshops page if you'd rather learn Claude Code and MCP setup live.

Commands and CLI output in this guide reflect Unity's CLI and Claude Code as of August 2026 — check the official Unity and Anthropic documentation for the latest flag names and behavior, since MCP tooling is still evolving quickly.

Spotted something out of date? Let us know.
Yash Thakker

Written by

Yash Thakker

Yash is an AI expert with over 300K learners. Join his workshops →

Related posts

Aug 20, 2026

UEFN Unreal MCP: Connect Claude Code and Cursor to Fortnite Verse

Fortnite's UEFN editor now ships the same Unreal MCP bridge that landed in UE 5.8 — so agentic coding tools can write and compile Verse, place Creative devices, edit Scene Graph entities, and inspect play-session logs from a terminal beside the editor. No separate plugin install; enable the UEFN MCP Toolset under Beta Access and connect your harness.

Jul 16, 2026

Claude Code Artifacts + MCP: Live Dashboards With Viewer-Scoped Auth

Anthropic's ClaudeDevs account announced artifact MCP connectors: build a dashboard once, and each viewer pulls live data through their own connectors. explainx.ai explains viewer-scoped auth, plan limits, admin toggles, and how this extends Thariq's thick-artifacts framework.

Jun 28, 2026

CLAUDE.md vs SKILL.md vs MCP: The Modern Agent Stack Explained

Most developers stuff everything into CLAUDE.md and wonder why their agent context feels bloated. There is a three-layer system — rules, skills, and live connectors — and most people only know one layer. This guide breaks down each layer, when to use it, and how to wire them together for a production-grade Claude Code setup.