MCP stdio server spawn on Windows flashes a visible console window (missing windowsHide)

Status Open
Reported on v2.1.215
Maintainer reply None cached
Activity 2 comments · opened Jul 19, 2026

Bug description

On Windows, when Claude Code spawns a stdio-based MCP server whose command is node (e.g. node start.mjs), the child process briefly flashes a visible console window (conhost.exe) before disappearing. This happens every time the MCP server is (re)started, which for the context-mode plugin is roughly per-session or per-restart. During other activity on the machine (games, streaming, fullscreen apps) this causes a jarring window-focus flash / Windows "new window" notification.

Root cause (as far as I can determine)

Confirmed via Get-CimInstance Win32_Process that the console window belongs to a node.exe process spawned directly by claude.exe, not through a cmd.exe wrapper:

ProcessId   : 5128
Name        : conhost.exe
ParentProcessId : 16152   # claude.exe (Claude Code 2.1.215)

ProcessId   : 12760
Name        : node.exe
CommandLine : "C:/Program Files/nodejs/node.exe" C:/Users/kil/.claude/plugins/marketplaces/context-mode/start.mjs

The MCP server registration is a plain .mcp.json:

{
  "mcpServers": {
    "context-mode": {
      "command": "node",
      "args": ["C:\Users\kil\.claude\plugins\marketplaces\context-mode\start.mjs"]
    }
  }
}

node.exe is a console-subsystem executable. On Windows, spawning a console-subsystem process without the windowsHide: true option (Node's child_process.spawn/execFile) or CREATE_NO_WINDOW (Win32 CreateProcess) causes a new console window to be allocated for it, which is what produces the visible flash even though the process exits/detaches almost immediately.

There is no field in .mcp.json (command/args/env) that lets a plugin author opt into hiding the window, this needs to be handled by Claude Code's own process-spawning code on Windows.

Impact

  • Every stdio MCP server with a Node/console-subsystem command flashes a console window on Windows on each spawn.
  • Disruptive during fullscreen apps/games since it steals focus momentarily and can trigger the Windows "new window" toast.
  • Not limited to one plugin, any MCP server config using command: node (or any other console-subsystem binary) on Windows will reproduce this.

Environment

  • Claude Code version: 2.1.215
  • OS: Windows 11 Pro, build 10.0.26100
  • Reproduced with: context-mode MCP plugin (community plugin, https://github.com/anthropics claude-code plugin marketplace), but root cause is generic to any stdio MCP server spawn on Windows.

Expected behavior

MCP server child processes spawned by Claude Code on Windows should not flash a visible console window. This likely requires passing windowsHide: true (or equivalent CREATE_NO_WINDOW flag) when spawning stdio MCP server processes on win32.

Suggested fix

In the MCP server spawn code path (wherever Claude Code does child_process.spawn(command, args, ...) for stdio-type MCP servers), add windowsHide: true to the spawn options when process.platform === 'win32'.

View original on GitHub ↗

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