[BUG] MCP Fails on native Windows
Resolved 💬 9 comments Opened Jul 12, 2025 by vuhoanglam Closed Jul 18, 2025
Environment
- Platform (select one): Claude Max Sub
- Claude CLI version: 1.0.51
- Operating System: Windows 11
- Terminal: Powershell
Bug Description
The MCP functionality is not working on Windows (native installation). When attempting to add a stdio MCP.
Steps to Reproduce
- Open a terminal (e.g., PowerShell, Cmd).
- Attempt to add a context using the
claude mcp addcommand, for example:
claude mcp add context7 -- "npx -y @upstash/context7-mcp"
Expected Behavior
The MCP should be successfully added - It's working on WSL2 on the same machine.
Actual Behavior
The MCP command fails with the following error log, indicating a "Connection closed" issue:
{
"debug": "Error stack: McpError: MCP error -32000: Connection closed\n at ka1._onclose (file:///C:/Users/FooBar/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1336:15216)\n at _transport.onclose (file:///C:/Users/FooBar/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1336:14535)\n at ChildProcess.<anonymous> (file:///C:/Users/FooBar/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1338:1459)\n at ChildProcess.emit (node:events:518:28)\n at ChildProcess.emit (node:domain:489:12)\n at LbQ.A.emit (file:///C:/Users/FooBar/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:320:155823)\n at maybeClose (node:internal/child_process:1104:16)\n at Socket.<anonymous> (node:internal/child_process:456:11)\n at Socket.emit (node:events:518:28)\n at Socket.emit (node:domain:489:12)",
"timestamp": "2025-07-11T23:43:11.730Z",
"sessionId": "8c2cb375-4da4-48e2-9d0f-f37c8f0ccae7",
"cwd": "D:\\FooBar\\bpress"
}This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗