[BUG] MCP Server Connection Fails on Windows — `cmd /c` wrapper corrupted by CLI parser

Resolved 💬 3 comments Opened Mar 20, 2026 by jjcastillot Closed Apr 25, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Environment

  • OS: Windows 11
  • Claude Code version: 2.1.80
  • Terminal: PowerShell
  • Python: installed
  • uv/uvx: installed

Description
On Windows, it is impossible to configure a local MCP server via the claude mcp add CLI command. The official documentation states that Windows requires a cmd /c wrapper for npx/uvx commands, but the CLI parser corrupts the /c flag in two ways:

  1. When using -- cmd /c in the command, the /c flag gets converted to C:/ (a Windows drive path), breaking the configuration entirely.
  2. In some cases the /c flag is converted to /schedule, also breaking the configuration.

This makes it impossible to follow the official documentation for Windows MCP setup using the CLI.

Steps to Reproduce

  1. On Windows, run:

claude mcp add my-server -s user -- cmd /c uvx some-mcp-package

  1. Run claude mcp get my-server
  2. Observe that Args show /schedule or C:/ instead of /c
  3. MCP server fails to connect

Workaround Attempted
Editing C:\Users\<user>\.claude.json directly — this works to write the correct config, but the MCP server still fails to connect because Claude Code appears to re-parse or re-interpret the /c argument at runtime.

Expected Behavior
cmd /c should be passed through as-is and the MCP server should start correctly.

Actual Behavior
MCP server always shows Status: ✗ Failed to connect on Windows regardless of configuration method.

Impact
Windows users cannot use any local MCP servers with Claude Code, making a core advertised feature completely unavailable on Windows.

What Should Happen?

The cmd /c wrapper should be passed through as-is to the MCP server process, allowing local MCP servers to start correctly on Windows as documented in the official Claude Code documentation.

Error Messages/Logs

Status: ✗ Failed to connect

When /c flag is corrupted:
Args: /schedule uvx mcp_snowflake_server ...
or
Args: C:/ uvx mcp_snowflake_server ...

When running the MCP package directly via uvx:
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_NOTIFY_POLICY'
(OpenSSL compatibility error with mcp_snowflake_server package on Windows)

Steps to Reproduce

  1. On Windows 11, open PowerShell
  2. Run: claude mcp add my-server -s user -- cmd /c uvx some-mcp-package
  3. Run: claude mcp get my-server
  4. Observe Args show /schedule or C:/ instead of /c
  5. Run: claude (start a session)
  6. Ask Claude to use the MCP tool
  7. Claude reports no MCP tool available
  8. Status permanently shows ✗ Failed to connect

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.80

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

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