[BUG] MCP servers never initialize on Windows/PowerShell - silent failure
Bug Report: MCP Servers Never Initialize on Windows/PowerShell
Summary
MCP servers configured in .mcp.json files are completely ignored when running Claude Code on native Windows under PowerShell. The MCP subsystem never attempts to initialize - no tools are loaded, no errors appear, it's completely silent.
Environment
- Claude Code Version: 2.0.37
- Platform: Windows (native, not WSL)
- Shell: PowerShell (pwsh)
- Node Version: v25.0.0
- Claude Code Install Path: D:\Servers\nvm\v25.0.0\node_modules\@anthropic-ai\claude-code
Issue Details
What Happens
- MCP servers are correctly configured in
.mcp.jsonfiles - Claude Code launches successfully
- MCP servers never load - no tools appear in tool list
- Debug logs show zero MCP initialization - plugins, LSP servers, skills all load normally, but MCP is completely absent
Configuration Files
User-level config: C:\Users\wbelden\.claude\.mcp.json
{
"mcpServers": {
"test-server": {
"command": "node",
"args": ["D:\\Development\\mcp\\build\\index.js"]
}
}
}
Settings: C:\Users\wbelden\.claude\settings.local.json
{
"enableAllProjectMcpServers": true,
...
}
Evidence
Debug Log Analysis (C:\Users\wbelden\.claude\debug\*.txt):
[DEBUG] Found 0 plugins (0 enabled, 0 disabled)
[DEBUG] Total LSP servers loaded: 0
[DEBUG] LSP manager initialized with 0 servers
[DEBUG] Loading skills from directories: ...
[DEBUG] Loaded 0 unique skills ...
[DEBUG] Total plugin agents loaded: 0
No mention of MCP anywhere - no "Loading MCP servers", no "MCP initialization failed", nothing.
Manual Verification Works
The MCP servers themselves work perfectly when invoked manually:
$ echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"test-client","version":"1.0.0"}}}
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"echo","arguments":{"message":"Hello!"}}}' | node D:\Development\mcp\build\index.js
# Works perfectly - returns proper JSON-RPC responses
{"result":{"protocolVersion":"2025-06-18",...},"jsonrpc":"2.0","id":1}
{"result":{"content":[{"type":"text","text":"Echo from MCP server: Hello!"}]},"jsonrpc":"2.0","id":2}
Comparison with Working Systems
Cursor IDE (on same Windows machine):
- Uses identical Docker MCP configuration
- Successfully loads all MCP tools
- Tools appear with
mcp_prefix - Works perfectly
This proves:
- The MCP servers are functional
- The configuration format is correct
- The Windows environment supports MCP
- Only Claude Code fails to load them
Root Cause Analysis
Examining Claude Code's compiled code (cli.js):
- MCP code IS present in the binary (found
mcpServers,.mcp.jsonparsing, etc.) - MCP subsystem appears to be conditionally enabled/disabled
- Possibly depends on git-bash even when Claude Code itself runs under PowerShell
Attempted Workarounds
❌ Doesn't Work
- User-level
.mcp.jsonconfiguration - Project-level
.mcp.jsonconfiguration - Setting
enableAllProjectMcpServers: true - Restarting Claude Code
- Different MCP server types (node-based, Docker-based)
✅ Partial Workaround
Manual invocation via Bash works, but this is not practical because:
- MCP tools don't appear in Claude's tool list
- Claude doesn't know they exist
- Can't be used automatically during conversations
Expected Behavior
- Claude Code should read
.mcp.jsonfiles - MCP servers should be spawned at startup
- MCP tools should appear in available tools list (with appropriate prefix)
- Debug logs should show MCP initialization (success or failure)
Actual Behavior
.mcp.jsonfiles are silently ignored- No MCP initialization occurs
- No MCP tools are available
- Debug logs contain zero MCP-related messages
Impact
This makes MCP completely unusable in Claude Code on Windows/PowerShell, which is a significant limitation for Windows users who don't want to use WSL/bash.
Related Issues
- #11496 - Claude Code requires git-bash (but that's about launch failure, not MCP)
- #11585 - MCP OAuth issues (different - OAuth-specific)
- #9906 - UTF-8 BOM in .mcp.json (different - encoding issue)
Reproduction Steps
- Install Claude Code on Windows
- Create
.mcp.jsonwith any valid MCP server config - Launch Claude Code under PowerShell
- Check available tools - MCP tools won't be there
- Check debug logs - no MCP initialization
Request
Please investigate why the MCP subsystem never initializes on Windows/PowerShell. Either:
- Fix MCP to work on Windows/PowerShell, OR
- Document that MCP requires git-bash/WSL on Windows, OR
- Show clear error message when MCP fails to initialize
Silent failure with no error message is the worst possible UX.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗