VSCode /mcp shows 'No servers configured' when slow-starting stdio MCP servers are added to .mcp.json

Resolved 💬 4 comments Opened Feb 26, 2026 by EarthmanWeb Closed Mar 28, 2026

Bug Description

Adding slow-starting stdio MCP servers (using npx) to .mcp.json causes the /mcp panel in VSCode to display "No servers configured" — even though the servers are actually connected and functional.

Environment

  • Claude Code VSCode Extension: Latest (Feb 2026)
  • OS: macOS (Darwin 25.2.0)
  • VSCode: Latest stable

Steps to Reproduce

  1. Have a working .mcp.json with fast-starting servers (e.g., playwright, sequential-thinking)
  2. /mcp panel correctly shows all servers
  3. Add slow-starting stdio servers to .mcp.json:
{
  "mcpServers": {
    "playwright": { "type": "stdio", "command": "npx", "args": ["@playwright/mcp@latest"] },
    "sequential-thinking": { "type": "stdio", "command": "npx", "args": ["-y", "@modelcontextprotocol/server-sequential-thinking"] },
    "claude-flow": { "type": "stdio", "command": "npx", "args": ["claude-flow@v3alpha", "mcp", "start"] },
    "ruv-swarm": { "type": "stdio", "command": "npx", "args": ["ruv-swarm", "mcp", "start"] }
  }
}
  1. Restart Claude Code / reload window
  2. /mcp now shows "No servers configured"

Expected Behavior

/mcp should show all configured servers with their connection status (connected, connecting, failed, etc.)

Actual Behavior

/mcp shows "No servers configured" — as if no .mcp.json exists.

Evidence from Logs

The VSCode extension log (Claude VSCode.log) reveals:

  • claude-flow and ruv-swarm never appear as "Starting connection" — they are silently dropped during config loading
  • The fast servers (serena, playwright, sequential-thinking) DO appear and connect successfully (~1.5-2.5s)
  • Despite /mcp showing nothing, the MCP tools actually work — ToolSearch finds and loads tools from all servers including claude-flow and ruv-swarm
# These appear in logs - fast servers connect fine:
MCP server "plugin:swe:serena": Starting connection with timeout of 30000ms
MCP server "playwright": Starting connection with timeout of 30000ms  
MCP server "sequential-thinking": Starting connection with timeout of 30000ms

# claude-flow and ruv-swarm NEVER appear as "Starting connection"
# Yet their tools are accessible via ToolSearch and work correctly

Analysis

The bug appears to be a race condition in the MCP config loading/UI rendering stage, not the connection stage:

  1. The 30000ms per-server connection timeout works fine (fast servers connect within it)
  2. The issue is that slow npx commands stall the config parsing phase
  3. The UI state gets corrupted and renders "No servers configured" for ALL servers
  4. The actual MCP connection layer works independently and does connect the servers

Impact

  • Users see "No servers configured" and think their MCP setup is broken
  • No error messages, warnings, or indication of what went wrong
  • The servers are actually working — only the /mcp UI display is wrong
  • This discourages users from adding npx-based MCP servers

Related Issues

  • #25751 — MCP server connection fails silently on startup
  • #7336 — Feature request for lazy loading MCP servers
  • #25976 — Extension hangs with MCP server error

View original on GitHub ↗

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