Repository navigation
Description
Description of the bug
On Windows, the once-per-day update check briefly flashes a cmd.exe console window on the desktop, unrelated to any user action. It appears on the first MCP-server startup after ~/.cache/chrome-devtools-mcp/latest.json becomes stale (>24h), so it looks like a random ~once-a-day flash.
Root cause — two cooperating spots, both missing windowsHide:
src/utils/check-for-updates.tsspawns the version checker with{ detached: true, stdio: 'ignore' }. On Windowsdetached: truemaps toDETACHED_PROCESS, so the child process has no console.src/bin/check-latest-version.ts→getRegistry()runsexecSync('npm config get registry', …).npmon Windows is a.cmdbatch wrapper, which requires a console — and because the parent has none, Windows allocates a new visible console window for it. That window is the flash.
Regression
Introduced by #2038 (commit 83a299fc, 2026-05-12), which replaced the hardcoded fetch('https://registry.npmjs.org/…') with a shell-out to npm config get registry. Before that change the detached process only performed a fetch() and produced no console window. (The detached update check itself dates to #1783.)
The bug is present in 1.3.0 and still on main (5a9d6af) — both check-for-updates.ts and check-latest-version.ts lack windowsHide.
Reproduction
- Windows,
chrome-devtools-mcpstarted vianpx(e.g. from an MCP client). - Delete or age
%USERPROFILE%\.cache\chrome-devtools-mcp\latest.jsonso it is >24h old (or missing). - Start the MCP server → a
cmd.exewindow flashes.
Direct one-liner that reproduces the exact flash on demand (run with the same Node that launches the server; replace <pkg> with the installed package dir):
node -e "const cp=require('child_process'),os=require('os'),p=require('path');cp.spawn(process.execPath,['<pkg>/build/src/bin/check-latest-version.js',p.join(os.tmpdir(),'x.json')],{detached:true,stdio:'ignore'}).unref()"
Captured process chain at the moment the window appears:
cmd.exe /d /s /c "npm config get registry"
+- node ...\chrome-devtools-mcp\build\src\bin\check-latest-version.js ...\latest.json
+- node ...\chrome-devtools-mcp\build\src\bin\chrome-devtools-mcp.js --browserUrl ...
Suggested fix
Add windowsHide: true to both child-process calls:
- the
child_process.spawn(...)incheck-for-updates.ts, and - the
execSync('npm config get registry', …)incheck-latest-version.ts.
The execSync one is what directly suppresses the visible npm console; adding it to the spawn as well is belt-and-suspenders.
Workaround
Set CHROME_DEVTOOLS_MCP_NO_UPDATE_CHECKS=1 to disable the check entirely (loses update notifications).
Chrome DevTools MCP version
1.3.0 (also present on main @ 5a9d6af)
Chrome version
n/a (occurs at server startup, before any browser interaction)
Node version
24.17.0
Operating system
Windows 10 (19045)
Activity
fix: hide Windows update check consoles (#2231)
fix: hide Windows update check consoles (ChromeDevTools#2231)
chore: sync upstream chrome-devtools-mcp v1.5.0 (#21)
chore: sync upstream chrome-devtools-mcp v1.5.0 (#21)