Comprehensive Unity Editor operations using unity-mcp-client CLI via uvx. Covers daily workflows (refresh, console, build verification), asset management, scene/object manipulation, and debugging. This skill should be used when users request Unity Editor operations, error analysis, log review, asset refresh, test execution, or after making script/asset modifications.
This skill inherits all available tools. When active, it can use any tool Claude has access to.
references/error-patterns.mdreferences/mcp-commands.mdStreamline Unity Editor operations through unity-mcp-client CLI via uvx. Handle daily development workflows, asset management, debugging, and scene operations with automated verification cycles.
All Unity Editor operations use unity-mcp-client via uvx:
# Base command (port auto-detected on macOS)
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp <command>
# With explicit port
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp --port 6400 <command>
Note: On macOS, port is auto-detected from Unity EditorPrefs. Manual --port is only needed for non-standard setups.
| Command | Purpose | Options |
|---|---|---|
verify | Full validation (refresh→clear→wait→console) | --timeout, --retry, --types |
refresh | Refresh asset database | None |
state | Get editor state (isCompiling, isPlaying) | None |
console | Get console logs | --types, --count |
clear | Clear console | None |
play | Enter Play Mode | None |
stop | Exit Play Mode | None |
find | Find GameObject | <name> |
tests | Run tests | <mode> (edit/play) |
| Option | Description | Default |
|---|---|---|
--port | MCP server port | Auto-detect (macOS) |
--host | MCP server host | localhost |
--types | Log types (error, warning, log) | error warning |
--count | Number of logs to retrieve | 20 |
--timeout | Max wait for compilation (verify only) | 60s |
--retry | Max connection retry attempts (verify only) | 3 |
Refer to references/mcp-commands.md for detailed documentation.
Trigger: After editing C# scripts, shaders, or .asmdef files
Workflow:
Edit Script → Refresh Assets → Wait for Compile → Check Console → Fix if Errors
↑ |
└──────────────────── Repeat ←────────────────────────────────┘
Single Command:
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp verify
This command executes:
isCompiling)With Custom Options:
# Extended timeout for large projects
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp verify --timeout 120
# Include all log types
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp verify --types error warning log
# More retry attempts for unstable connections
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp verify --retry 5
Critical: Never skip verification after script changes. Always verify before reporting task completion.
Trigger: User requests "check logs", "analyze errors", or debugging assistance
Log Types:
error - Compilation and runtime errors (critical)warning - Deprecation, performance warnings (medium)log - Debug.Log output (informational)Commands:
# Get errors only
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp console --types error
# Get errors and warnings (default)
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp console
# Get all logs with limit
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp console --types error warning log --count 50
Workflow:
CS0246 at Scripts/Player.cs:15)references/error-patterns.md for known patternsTrigger: User requests test run, or before commit/PR
Prerequisites:
verify first)Commands:
# Run Edit Mode tests
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp tests edit
# Run Play Mode tests
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp tests play
Workflow:
verify first to ensure clean compilationTrigger: User mentions prefabs, ScriptableObjects, or asset operations
Commands:
# Full verification (recommended)
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp verify
# Refresh only (without waiting)
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp refresh
Best Practices:
verify after external file changesTrigger: User requests scene management or object manipulation
Find GameObject:
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp find "PlayerController"
Play Mode Control:
# Enter Play Mode
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp play
# Exit Play Mode
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp stop
Editor State:
uvx --from git+https://github.com/bigdra50/unity-mcp-client unity-mcp state
| Error Type | Identification | Priority |
|---|---|---|
| Compilation (CS####) | CS error codes | Critical - fix immediately |
| Assembly Reference | Missing .asmdef refs | Critical |
| Runtime Exception | NullReference, Missing | High - fix when requested |
| Deprecation Warning | Obsolete API usage | Medium |
| Performance Warning | GC allocation, etc. | Low |
verify command to confirm resolutionThe state command returns JSON:
{
"success": true,
"data": {
"isPlaying": false,
"isPaused": false,
"isCompiling": false,
"activeSceneName": "MainGame"
}
}
verify after making changesScripts/Player.cs:42)verify before running testsIf CLI commands fail:
--retry option for transient failures--port if auto-detection failsIf compilation takes too long:
--timeout 120If auto-detection fails:
--port 6400Use this skill when: