MCP server by Sttrevens
Unity MCP + Claude Code Setup Guide
Let Claude Code control your Unity Editor directly via MCP
Prerequisites
- macOS (Apple Silicon)
- Unity 2022.3+ project
- Claude Code CLI (running
claudein terminal should launch it) - Homebrew (optional, for installing .NET)
Step 1: Install the Unity MCP Plugin
- Open your Unity project
- Menu bar → Window → Package Manager
- Click + (top left) → Add package from git URL...
- Enter:
https://github.com/IvanMurzak/Unity-MCP.git - Wait for installation and compilation to finish (no red errors in Console = OK)
Step 2: Configure the MCP Connection in Unity
- After installation, a new AI Game Developer window appears (find it under the Window menu)
- Open the AI Game Developer window and configure:
| Setting | Value | |---|---| | Connection | Custom | | Transport | stdio | | Authorization Token | none | | AI agent | Claude Code |
- Click Connect (green status = connected)
Note: In stdio mode, the MCP server doesn't need to be started manually — Claude Code launches the server instance automatically.
Step 3: Generate Configuration Files
At the bottom of the AI Game Developer window:
- Click Enable Skills — generates the
.claude/skills/directory - Click Configure (next to the MCP section) — generates the
.mcp.jsonconfig file
The generated .mcp.json looks roughly like this:
{
"mcpServers": {
"ai-game-developer": {
"args": [
"port=22398",
"plugin-timeout=10000",
"client-transport=stdio",
"authorization=none"
],
"command": "<your-project-path>/Library/mcp-server/osx-arm64/unity-mcp-server"
}
}
}
Step 4: Connect Claude Code to Unity
- Open Terminal
cdto your Unity project root:cd /path/to/your/unity-project- Launch Claude Code:
claude - Claude Code will automatically read
.mcp.json, start the MCP server, and connect to Unity
Verify the Connection
Try these commands in Claude Code:
- "Take a screenshot of the Scene View"
- "List all GameObjects in the current scene"
- "Create an empty GameObject called TestObject"
If it responds correctly, the connection is working.
Available Tools (58 total)
Once connected, Claude Code can use these capabilities:
Asset Management
assets-find— Search project assetsassets-create-folder— Create foldersassets-copy/assets-move/assets-delete— Copy/move/delete assetsassets-material-create— Create materialsassets-prefab-create/assets-prefab-instantiate— Create/instantiate Prefabs
GameObject Operations
gameobject-create/gameobject-destroy/gameobject-duplicategameobject-find— Find GameObjectsgameobject-modify— Modify Transform and other propertiesgameobject-component-add/gameobject-component-get/gameobject-component-modify
Scene Management
scene-open/scene-save/scene-createscene-list-opened— List opened scenes
Scripts & Code
script-read/script-update-or-create/script-deletescript-execute— Execute C# code directly
Screenshots & Debugging
screenshot-scene-view/screenshot-game-view/screenshot-cameraconsole-get-logs/console-clear-logs
Package Management
package-list/package-add/package-remove/package-search
Testing
tests-run— Run unit tests
Troubleshooting
Q: HTTP mode shows "Connection refused"
A: Switch to stdio mode. Custom connection → Transport → select stdio.
Q: Compilation errors / installation failed
A: Make sure Unity version >= 2022.3 and your project uses .NET Standard 2.1 or higher.
Q: Claude Code doesn't detect MCP after launch
A: Confirm .mcp.json exists in the project root directory, and the command path points to an existing unity-mcp-server binary.
Q: How to handle multiple Unity projects?
A: Each project needs its own plugin installation and .mcp.json generated via Configure. Claude Code connects to whichever project directory it's launched from.
Plugin Info
- Plugin: IvanMurzak/Unity-MCP
- Version: 0.60.0
- Protocol: MCP (Model Context Protocol)