一键导入
unity-setup
Auto-install and configure unity-mcp from scratch. Run before first use of /unity.
菜单
Auto-install and configure unity-mcp from scratch. Run before first use of /unity.
Game design brainstorm and research. Use when the user wants to design a game, research a genre, or learn from existing games before building.
Shared explore/plan mode behavior for Unity game builder commands. Provides the stance, Feynman technique, continuous verification, subagent protocols, and guardrails.
Launch Unity game builder. Usage: /unity [args]
| name | unity-setup |
| description | Auto-install and configure unity-mcp from scratch. Run before first use of /unity. |
You are setting up the unity-mcp bridge so that Claude Code can control Unity Editor via MCP tools. Automate every step possible — only ask the user when you genuinely need input.
STEP 1: PREREQUISITES
Check Python: Run: python --version (or python3 --version) Required: 3.10+ If missing, install automatically:
Check uv: Run: uv --version If missing, install automatically:
Check openupm-cli: Run: openupm --version If missing, install automatically: Run: npm install -g openupm-cli
Ask user for Unity project path (the folder containing Assets/). Verify the path exists and contains Assets/ folder.
STEP 2: INSTALL UNITY PACKAGE
Run in the Unity project directory:
openupm add com.coplaydev.unity-mcp
This adds the package to the project's manifest.json and scoped registry automatically. Unity will import it on next Editor focus.
After running, verify installation:
STEP 3: CONFIGURE CLAUDE CODE MCP CLIENT
Read the project's .claude/settings.json (or create it if it doesn't exist). Add unity-mcp to the mcpServers section:
{
"mcpServers": {
"UnityMCP": {
"url": "http://localhost:8080/mcp"
}
}
}
If settings.json already exists, merge the mcpServers entry — do not overwrite other settings.
STEP 4: START SERVER & VERIFY
Tell the user:
Then test the connection by calling the unity-mcp project_info resource. If connection fails, retry once after 5 seconds (Unity may still be importing).
STEP 5: OPTIONAL EXTRAS
Ask user if they want these (yes/no, default no):
Roslyn validation (strict C# checks): Tell user: In Unity, go to Window > MCP for Unity > Install Roslyn DLLs
Disable telemetry: Set DISABLE_TELEMETRY=true in environment.
TROUBLESHOOTING
openupm fails:
Connection refused:
MCP tools not appearing after config:
DONE
After setup is complete, announce:
## unity-mcp Setup Complete
Server: http://localhost:8080/mcp
Unity: [version]
Project: [name]
Pipeline: [URP/HDRP/Built-in]
Ready to use /unity [genre] to build games.