[BUG] MCP servers never initialize on Windows/PowerShell - silent failure

Resolved 💬 5 comments Opened Nov 14, 2025 by CaptainPalapa Closed Nov 14, 2025

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

  1. MCP servers are correctly configured in .mcp.json files
  2. Claude Code launches successfully
  3. MCP servers never load - no tools appear in tool list
  4. 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:

  1. The MCP servers are functional
  2. The configuration format is correct
  3. The Windows environment supports MCP
  4. 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.json parsing, 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.json configuration
  • Project-level .mcp.json configuration
  • 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

  1. Claude Code should read .mcp.json files
  2. MCP servers should be spawned at startup
  3. MCP tools should appear in available tools list (with appropriate prefix)
  4. Debug logs should show MCP initialization (success or failure)

Actual Behavior

  1. .mcp.json files are silently ignored
  2. No MCP initialization occurs
  3. No MCP tools are available
  4. 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

  1. Install Claude Code on Windows
  2. Create .mcp.json with any valid MCP server config
  3. Launch Claude Code under PowerShell
  4. Check available tools - MCP tools won't be there
  5. Check debug logs - no MCP initialization

Request

Please investigate why the MCP subsystem never initializes on Windows/PowerShell. Either:

  1. Fix MCP to work on Windows/PowerShell, OR
  2. Document that MCP requires git-bash/WSL on Windows, OR
  3. Show clear error message when MCP fails to initialize

Silent failure with no error message is the worst possible UX.

View original on GitHub ↗

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