Windows: MCP server spawning causes brief console window flash (missing CREATE_NO_WINDOW flag)

Resolved 💬 1 comment Opened May 29, 2026 by hippo2222 Closed Jul 1, 2026

Description

On Windows, every time Claude Code starts or restarts an MCP server, a console window briefly flashes on screen. This is a cosmetic issue but noticeable and annoying for users.

Root cause

Claude Code spawns MCP server processes (e.g. node script.js) without the windowsHide: true option in Node.js child_process.spawn. On Windows, this maps to the absence of the CREATE_NO_WINDOW (0x08000000) flag in CreateProcess. When a GUI application (Electron) spawns a console subsystem executable without this flag, Windows briefly creates and shows a console window before the process settles.

The fix is a one-liner in the MCP server spawning code:

// before
spawn(command, args, { stdio: [...] })

// after
spawn(command, args, { stdio: [...], windowsHide: true })

Steps to reproduce

  1. Windows 10/11
  2. Configure any MCP server in ~/.claude.json that runs a console application (node, python, etc.)
  3. Start Claude Code
  4. Observe a brief console window flash on screen at startup

Environment

  • OS: Windows 11
  • Claude Code version: latest
  • Reproducible with any stdio MCP server (confirmed with @colbymchenry/codegraph)

Expected behavior

No console window visible when MCP servers start in the background.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗