MCP stdio servers flash visible CMD windows on Windows (windowsHide not set)
Description
On Windows, every stdio-based MCP server spawns a visible CMD window that briefly flashes on screen during Claude Code startup. This happens for each MCP server configured with type: "stdio".
With 4-5 stdio MCP servers configured, users see multiple CMD windows flash on every claude launch, which is disruptive.
Root Cause
In the MCP StdioClientTransport, the windowsHide option is set conditionally:
windowsHide: process.platform === "win32" && LO9()
Where LO9() checks "type" in process, which always returns false in standard Node.js (it only returns true in Electron where process.type exists).
This means windowsHide is effectively always false on Windows, causing child processes (MCP servers) to spawn with visible console windows.
Expected Behavior
MCP server processes should be hidden on Windows. The fix should be:
windowsHide: process.platform === "win32"
Or simply:
windowsHide: true
(The option is ignored on non-Windows platforms anyway.)
Steps to Reproduce
- On Windows, configure 2+ stdio MCP servers in
~/.claude.json - Run
claudefrom terminal - Observe: multiple CMD windows flash briefly during startup
Environment
- OS: Windows 11
- Claude Code: v2.1.37
- Node.js: v24.13.0
- MCP servers: 4 stdio servers (context7, firebase, vercel, github)
Impact
- Every
claudestartup shows 4+ flashing CMD windows - Window titles show paths like
.bin,.bunwhich confuse users - Purely cosmetic but significantly degrades Windows UX
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗