[BUG] Can not connect to MCP servers running by `pnpx` in Windows

Resolved 💬 4 comments Opened Jul 18, 2025 by CXwudi Closed Aug 8, 2025

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.55
  • Operating System: Windows 10 Pro 22h2
  • Terminal: Powershell 7

Bug Description

As title mentioned, pnpx fails with McpError: MCP error -32000: Connection closed.

Steps to Reproduce

  1. add MCP server to ~/.claude.json

``json
"tavily": {
"type": "stdio",
"command": "pnpx",
"args": [
"tavily-mcp"
],
"env": {
"TAVILY_API_KEY": "your-key"
}
}
`
or
`json
"tavily": {
"type": "stdio",
"command": "cmd",
"args": [
"\c",
"pnpx",
"tavily-mcp"
],
"env": {
"TAVILY_API_KEY": "your-key"
}
}
`
2.launch
claude`

Expected Behavior

MCP server should be connected

Actual Behavior

MCP server failed to connect with error code 32000

Additional Context

I am using proto to manage my node env on windows , and proto generate a pnpx.exe, so typical pnpx.cmd or pnpx.ps1 issue on Windows is not applicable to me

I can also confirm other MCP clients like Cline, Augment Code, are all working fine with pnpx in Windows

This only happens to pnpx but not npx for me on windows, npx is still working fine. So I don't think proto would be the cause, but correct me if I am wrong

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗