Troubleshoot Unity MCP bridge issues
Resolve issues that might occur when you connect AI clients to the Unity Editor through the Unity Model Context Protocol (MCP) bridge.
Bridge doesn't start
The Unity MCP bridge fails to start. This prevents any AI client from connecting to the Unity Editor.
Symptoms
You might note one or more of the following symptoms:
- The Unity MCP settings page (AI > Unity MCP) shows Stopped.
- The bridge doesn't start automatically.
- No clients can connect to Unity.
Cause
The bridge might fail to start due to script compilation errors, incomplete package installation, or because it was explicitly stopped.
Resolution
To resolve this issue:
- Open the Unity Console and fix any compilation errors.
- Go to Edit > Project Settings > AI > Unity MCP and select Start.
- Verify the
com.unity.ai.assistantpackage is installed in Window > Package Manager. - Restart the Unity Editor if the issue persists.
MCP client can't connect
The AI client can't connect to Unity, which prevents it from discovering or invoking Unity tools.
Symptoms
You might note one or more of the following symptoms:
- The AI client (Cursor, Claude Code, etc.) reports connection errors.
- The client can't find Unity tools.
Cause
This issue can occur when:
- Unity isn't running or the bridge didn't start.
- The relay binary is missing from
~/.unity/relay/. - The MCP client configuration points to the wrong executable path.
- The
--mcpflag is missing from the client configuration.
Resolution
To resolve this issue:
- Confirm the bridge is running in Project Settings > AI > Unity MCP.
- Verify the relay binary exists:
- macOS:
~/.unity/relay/relay_mac_arm64.app/(orrelay_mac_x64.app/) - Windows:
%USERPROFILE%\.unity\relay\relay_win.exe - Linux:
~/.unity/relay/relay_linux
- macOS:
- Verify your client configuration includes
"args": ["--mcp"]. - Use the Integrations section in Unity MCP settings to reconfigure the client.
- Restart both Unity and your MCP client.
Connection pending / not approved
The MCP client connects to Unity but can't invoke tools because the connection hasn't been approved.
Symptoms
You might note one or more of the following symptoms:
- Your MCP client connects but can't invoke any tools.
- The Unity MCP settings page shows the connection under Pending Connections.
Cause
Direct connections from external MCP clients require user approval. The connection is waiting for you to accept it.
Resolution
To resolve this issue:
- Go to Edit > Project Settings > AI > Unity MCP.
- In the Pending Connections section, review the client details.
- Select Accept to approve the connection.
Once approved, Unity remembers the client and reconnects automatically in future sessions.
Tools not discovered
The MCP client connects successfully, but no Unity tools (or only some tools) are available.
Symptoms
You might note one or more of the following symptoms:
- The MCP client connects but lists no Unity tools.
- Some custom tools are missing.
Cause
This issue can occur when:
- Tool registration scripts contain compilation errors.
- The
[McpTool]attribute is missing or incorrectly applied. - Custom tools are defined in assemblies not scanned by
TypeCache. - Tools are disabled in the Unity MCP settings.
Resolution
To resolve this issue:
- Check the Unity Console for compilation errors in tool scripts and fix them.
- Verify that tool methods are
public staticand decorated with[McpTool]. - For class-based tools, ensure they implement
IUnityMcpToolorIUnityMcpTool<T>and have a parameterless constructor. - In Unity MCP settings, check the Tools section to ensure the tools are enabled.
- In Unity MCP settings, enable Show Debug Logs for detailed discovery information.
Relay binary not installed
The relay binary is not installed, which prevents the MCP client from starting the MCP server.
Symptoms
You might note one or more of the following symptoms:
- The relay binary is missing from
~/.unity/relay/. - The MCP client fails to start the server.
Cause
The ServerInstaller runs at editor startup and copies relay binaries from the package. It might have been interrupted or the package directory isn't accessible.
Resolution
To resolve this issue:
- Restart the Unity Editor to trigger the installer.
- Verify the package directory exists:
Packages/com.unity.ai.assistant/RelayApp~/. - Check the Unity Console for installation warnings.
- If required, manually locate and copy the relay binary using the Locate Server button in Unity MCP settings.
Performance issues
Unity tools respond slowly or time out when invoked by the MCP client.
Symptoms
You might note one or more of the following symptoms:
- Slow responses from Unity tools.
- Timeout errors in the MCP client.
Cause
Unity might be busy with heavy operations, such as asset imports, builds, or script compilation, or system resources are limited.
Resolution
To resolve this issue:
- Wait for Unity to finish any ongoing operations (check the progress bar).
- Restart Unity to clear cached state.
- Reduce the number of concurrent MCP client connections.
- Enable Show Debug Logs to identify bottlenecks.
Enable debug logging
For detailed diagnostic information, enable debug logging in the Unity MCP settings page:
- Go to Edit > Project Settings > AI > Unity MCP.
- Check Show Debug Logs.
Debug logs include connection attempts, tool discovery details, command execution traces, and error information.