Skip to content

[Bug]: Auto-generated uvx stdio config for Claude Desktop fails on Windows (pywin32 os error 32), and plugin repeatedly overwrites working manual config #1248

Description

@paraschivescu

=== BUG REPORT WRITTEN WITH AI ===

What happened?

Auto-generated uvx stdio config for Claude Desktop fails on Windows (pywin32 os error 32), and plugin repeatedly overwrites working manual config

Environment

Summary

The stdio config that "Configure Selected" writes to claude_desktop_config.json for Claude Desktop does not produce a working connection on Windows. Separately, the plugin repeatedly overwrites a working manual config back to the broken form.

Bug 1 — Generated uvx command fails at launch

Generated entry:
"unityMCP": {
"command": "C:\Users\\.local\bin\uvx.exe",
"args": ["--from", "mcpforunityserver==10.0.0", "mcp-for-unity", "--transport", "stdio"],
"type": "stdio"
}
Because uvx builds an ephemeral venv on every launch, and Claude Desktop sends initialize before that build finishes, the partially-started server locks pywin32 and uv aborts:

error: Failed to install: pywin32-312-cp311-cp311-win_amd64.whl (pywin32==312)
Caused by: failed to remove directory ...\uv\cache\builds-v0\.tmpXXXX\Lib\site-packages\pywin32-312.data:
The process cannot access the file because it is being used by another process. (os error 32)

Result: Server transport closed unexpectedly → Server disconnected, on every start. Running the exact same command by hand in a terminal succeeds, because nothing is racing it. This began after a Claude Desktop update (bridge worked before it), consistent with anthropics/claude-code#38266.

Side-issue — Plugin overwrites working manual config

Working, stable configuration (no per-launch build, so no race):

  1. uv tool install "mcpforunityserver==10.0.0" (persistent venv, one time)
  2. Point Claude Desktop at the installed executable:
    "unityMCP": {
    "command": "C:\Users\\.local\bin\mcp-for-unity.exe",
    "args": ["--transport", "stdio"],
    "type": "stdio"
    }

This connects reliably. However, the plugin rewrites this entry back to the broken uvx form — apparently on Unity project load and/or opening the MCP for Unity window — and the panel reports "Missing MCPForUnity config" against the working manual entry because it only recognizes configs it generated itself. This creates a tug-of-war where the working config cannot survive.

Reproduction steps

  1. Windows + Claude Desktop, MCP for Unity v10, stdio transport.
  2. Configure Claude Desktop via the panel → restart Claude → connection fails with the pywin32 error above.
  3. Replace the entry with the uv tool install + mcp-for-unity.exe form → restart → works.
  4. Reopen the Unity project or the MCP for Unity window → the working entry is overwritten back to the uvx form.

Unity version

2022.3.20f1

MCP for Unity package version

10.0.0

Python server version

No response

MCP client

Claude Desktop

Transport

stdio

OS

Windows

Relevant logs / console output


Checks

  • I searched existing issues and did not find a duplicate
  • I included logs / steps to reproduce

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions