-
-
Notifications
You must be signed in to change notification settings - Fork 270
Troubleshooting
This guide covers real issues you may encounter with Unity-MCP and how to resolve them.
If Unity-MCP is not working at all:
- Check the Unity Console for error messages
- Verify the plugin is installed: open
Window > AI Game Developer - Check the connection status in the plugin window
- Restart Unity Editor
Unity-MCP uses SignalR for communication between the plugin and the MCP server. The server binary is auto-downloaded and auto-started by the plugin.
The plugin automatically downloads the server binary to Library/mcp-server/{platform}/ (where platform is win-x64, osx-x64, or linux-x64) and starts it on Unity Editor load.
Check for the server binary:
- Look in your Unity project at
Library/mcp-server/for the platform-specific folder - If missing, the plugin may have failed to download it; check the Unity Console for download errors
Check the Unity Console for error messages related to McpServerManager. Common issues:
- Network failure during binary download
- File permission issues preventing extraction
- Antivirus software blocking the server executable
Project path contains spaces: Unity-MCP validates the project path on startup. If your project path contains spaces, you will see a warning. Move your project to a path without spaces.
Unity-MCP uses a deterministic port based on the SHA256 hash of your Unity project path, mapped to the range 50000-59999. This means the same project always uses the same port, and different projects use different ports.
If another process is using that port:
- The plugin detects an external server on the port and enters
Externalmode - Check what process is using the port:
# Windows netstat -ano | findstr :<port> # macOS/Linux lsof -i :<port>
- Close the conflicting process, or move your Unity project to a different directory (which changes the port)
If the plugin shows a disconnected state:
- The server may have crashed; check
Library/mcp-server/for log files - The plugin reconnects automatically on domain reload and play mode transitions
- Try closing and reopening Unity
The AI client (Claude Desktop, Cursor, VS Code Copilot, etc.) connects to the MCP server via stdio or streamableHttp transport. The server bridges this connection to the Unity plugin via SignalR.
- Open
Window > AI Game Developerin Unity - Select your AI client's configurator tab
- Click the configure button to generate or update the AI client's config file
- Restart your AI client after configuration changes
The plugin configuration is stored at:
Assets/Resources/AI-Game-Developer-Config.json
Unity-MCP includes built-in configurators for 14 AI clients:
| Client | Configurator |
|---|---|
| Antigravity | AntigravityConfigurator |
| Claude Code | ClaudeCodeConfigurator |
| Claude Desktop | ClaudeDesktopConfigurator |
| Codex | CodexConfigurator |
| Cursor | CursorConfigurator |
| Gemini | GeminiConfigurator |
| GitHub Copilot CLI | GitHubCopilotCliConfigurator |
| KiloCode | KiloCodeConfigurator |
| OpenCode | OpenCodeConfigurator |
| Rider | RiderConfigurator |
| UnityAi | UnityAiConfigurator |
| VS Code Copilot | VisualStudioCodeCopilotConfigurator |
| VS Copilot | VisualStudioCopilotConfigurator |
| Custom | CustomConfigurator |
If your AI client reports no Unity tools are available:
- Verify the MCP server is running (check the status in
Window > AI Game Developer) - Ensure the AI client config file points to the correct server binary path
- Restart the AI client completely (not just reload)
- Check that the server binary exists at
Library/mcp-server/{platform}/
Unity-MCP requires Unity 2022.3 or newer. If you are on an older version, the plugin will not compile. Update your Unity installation via Unity Hub.
All Unity API calls must run on the main thread. The plugin handles this internally via MainThread.Instance.Run() and MainThread.Instance.RunAsync(). If you see errors about accessing Unity API from a background thread, this indicates a bug in a custom tool implementation. Wrap all Unity API calls in MainThread.Instance.Run(() => { ... }).
Tools return strings prefixed with [Success] or [Error] for structured feedback to the AI client.
Common tool errors:
- GameObject not found: The referenced GameObject does not exist in the current scene. Verify the name or path.
-
Asset not found: The asset path is incorrect. Asset paths must be relative to the project root (e.g.,
Assets/Materials/MyMaterial.mat). -
Component not found: The component type name may be incorrect. Use the exact C# class name (e.g.,
Rigidbody,MeshRenderer,BoxCollider). -
Scene not loaded: The target scene is not currently open. Use
scene-opento load it first.
Unity-MCP disconnects before a domain reload and reconnects afterward. When entering or exiting Play mode, a delayed reconnection is triggered. Brief disconnections during these transitions are normal.
If nothing else works:
- Close Unity Editor
- Delete
Library/mcp-server/in your project directory - Reopen Unity -- the plugin will re-download the server binary
- Open
Window > AI Game Developerand reconfigure your AI client - Restart your AI client
Before filing an issue:
- Note your Unity version, OS, and Unity-MCP version (current: 0.51.4)
- Copy the full error from the Unity Console
- Check existing issues on GitHub
File a bug report at GitHub Issues with the above information and steps to reproduce.