claude-code - 💡(How to fix) Fix Windows: MCP server spawning causes brief console window flash (missing CREATE_NO_WINDOW flag)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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 })

Code Example

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

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

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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

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

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING