unity-mcp icon indicating copy to clipboard operation
unity-mcp copied to clipboard

Cannot connect to the MCP server via vscode plugin

Open LanKuDot opened this issue 8 months ago • 3 comments

I could connect to the mcp server in the terminal. But when using the claude code plugin in vscode, I got "MCP error -32000: Connection closed" message.

Environments:

  • Unity: 6000.3.9f1
  • MCP for Unity: v9.5.4-beta.7
  • Python: v3.13.2
  • UV: v0.9.16
  • VS Code: 1.111.0
  • Claude Code for VS Code: 2.1.76
Image

LanKuDot avatar Mar 16 '26 09:03 LanKuDot

I also can not use the mcp on claude code extension. But I can use it in terminal.

AlperK2Far avatar Mar 17 '26 10:03 AlperK2Far

Hi, can you guys confirm if this is still an issue now?

Scriptwonder avatar May 01 '26 16:05 Scriptwonder

The solution is that manually create a .mcp.json without --offline option in the project directory.

{
  "mcpServers": {
    "UnityMCP": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "--prerelease", "explicit",
        "--from", "mcpforunityserver>=0.0.0a0",
        "mcp-for-unity"
      ]
    }
  }
}

LanKuDot avatar May 04 '26 07:05 LanKuDot