Chrome DevTools MCP: live evidence, explicit scope and verifiable browser work
Why explicit false once disappeared: read Chrome DevTools CLI argument forwarding
Trace default-aware serialization and the start-path fix, including array identity and why an argv array is not a shell-escaped command.
What you will learn
- Default comparison can change meaning across entry paths
- Read what serializeArgs actually emits
- An isolated regression explains the boundary
Before you start
- Basic browser console and network concepts
- Understanding of CLI arguments and local client configuration
Plan a scoped browser investigation and distinguish interface defaults, tool success and end-to-end acceptance.
Key takeaways
- Serialize against the defaults of the receiving execution mode.
- Explicit false can be meaningful even when another mode defaults false.
- An argv array is not a shell-escaped command string.
Default comparison can change meaning across entry paths
At the inspected revision, the CLI start handler serializes with getCliOptions rather than the MCP option definitions. The CLI-specific options set headless true, whereas the server configuration defaults it false. A false user choice must therefore be forwarded against the CLI’s true default.
If serialization instead compares false with the server’s false default, it omits the argument. The daemon later parses in CLI mode and restores true. The value was parsed correctly but lost between processes: this is a default-domain mismatch, not evidence that Chrome ignores the option.
Read what serializeArgs actually emits
The function iterates known option keys, skips undefined and null, and omits values identical to the option default. It converts camelCase to kebab-case, emits true as a flag, false as a no-prefixed flag and arrays as repeated assignments. Scalar values become one assignment argument.
The default comparison uses identity for arrays. A parser-reused default array is omitted, but a different array with equal contents is forwarded. The function returns argument items, not a shell-escaped string. Joining them into a shell command would be a different operation needing its own safety review.
An isolated regression explains the boundary
Fourteen cases execute the AST-selected upstream function after TypeScript transpilation, with synthetic option definitions. They cover missing values, explicit false, the wrong-default reproduction, casing, arrays, zero, unknown keys, spaces and input preservation. No imported process or socket functions are executed.
This verifies the pure serializer mechanism, not the full parser, daemon restart or actual Chrome window mode. The start path’s use of CLI options is source-inspected. We did not repeat the upstream end-to-end browser test or turn its result into our own claim.
Decision guide
| Criterion | Option A | Option B |
|---|---|---|
| Best when | You need predictable behavior and easy auditing | You need adaptive optimization and have reliable telemetry |
| Main risk | May leave performance on the table | Can become difficult to explain or debug |
Implementation steps
- 1
Trace the parsed value and both default sets.
- 2
Inspect the serializer’s omission conditions.
- 3
Test the exact false-value regression in isolation.
- 4
Verify full process behavior separately when authorized.
Copy-ready example
{
"regressionFixture": true,
"userValue": false,
"cliDefault": true,
"mcpDefault": false,
"correctForwardedArgs": [
"--no-headless"
],
"wrongDefaultArgs": [],
"browserLaunched": false
}Frequently asked questions
Why could a correct false value become true later?
It could be omitted against the wrong default and then reparsed using CLI defaults.
Were real browser launches tested here?
No. Fourteen isolated serializer cases ran without a daemon or browser.
Sources
- Chrome DevTools MCP / src/bin/chrome-devtools.tsSource checked 2026-09-14
- Chrome DevTools MCP / src/config/mcp-options.tsSource checked 2026-09-14
- Chrome DevTools MCP / src/daemon/utils.tsSource checked 2026-09-14
- Chrome DevTools MCP / docs/configuration.mdSource checked 2026-09-14