Skip to content

Client templates: stop MCP Inspector opening a browser when an agent runs it (mcp-inspector --version popups) - #275

Merged
seathatflowsinourveins merged 1 commit into
mainfrom
claude/inspector-no-autoopen-20260925
Sep 25, 2026
Merged

seathatflowsinourveins merged 1 commit into
mainfrom
claude/inspector-no-autoopen-20260925

Conversation

@seathatflowsinourveins

Copy link
Copy Markdown
Collaborator

Scope

  • What this PR changes: adds MCP_AUTO_OPEN_ENABLED=false to the Claude settings template env and to the Codex template [shell_environment_policy.set], and extends the mcp-inspector recipe row to explain why.
  • Base commit: dcd6f0cf
  • Lane: lane:foundation
  • Owned paths touched: adoption/templates/claude.settings.template.json, adoption/templates/codex.config.template.toml, recipes/README.md, and their registrations in manifests/evidence.json.

Why. The user kept seeing an MCP Inspector browser tab fail with spawn --version ENOENT. MCP Inspector 2.7.0 has no version flag. mcp-inspector --version starts the web UI with --version as an ad-hoc stdio server, and its web mode opens a browser unless MCP_AUTO_OPEN_ENABLED=false (resolveAutoOpen() in clients/web/build/index.js). On WSL that is the Windows browser. Today's session transcripts show agents running it as a routine version probe: unbounded at 05:56Z and 18:58Z, and in bounded #251 probes at 06:19Z and 06:21Z.

Evidence-class table

Claim Evidence class Command
The web mode opens a browser unless the variable is false source_review installed 2.7.0 clients/web/build/index.js:1724-1729 (resolveAutoOpen)
With MCP_AUTO_OPEN_ENABLED=false, mcp-inspector --version still starts the web server but prints no "Opening browser" line; the timeout ends it and no 627x listener remains local_integration MCP_AUTO_OPEN_ENABLED=false setsid timeout -k 2 8 mcp-inspector --version </dev/null, then ss -ltn and pgrep
Templates still render and parse synthetic the 368 tests covering the templates and the recipe (render_config, adoption docs, effort guard, …), all OK

Host evidence

This workstation's ~/.claude/settings.json env and ~/.codex/config.toml [shell_environment_policy.set] got the same key, each with a backup. The key takes effect for sessions started after the change.

Checklist

  • No workflow changes. [x] No secrets. [x] No paid surface. [x] Peer files preserved.

🤖 Generated with Claude Code

… commands

MCP Inspector 2.7.0 has no version flag: `mcp-inspector --version` starts
the web UI with `--version` as a stdio server command and, unless
MCP_AUTO_OPEN_ENABLED=false (resolveAutoOpen in clients/web/build), opens a
browser tab. On WSL that is the user's Windows browser, which then shows
`spawn --version ENOENT`. Agents probing tool versions kept triggering it
(latest 2026-09-25 18:58Z). Both client templates now set the variable to
false for agent shells, and the recipe row says why. A bounded probe with
the variable set printed no "Opening browser" line and opened nothing.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@seathatflowsinourveins seathatflowsinourveins added the lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers label Sep 25, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant