Repository navigation
Description
Re-scoped (2026-06-19)
The original ask — default --config to getDefaultMcpConfigPath() when no flag is given — is delivered. withDefaultConfigPath() injects getDefaultMcpConfigPath() (~/.mcp-inspector/mcp.json) when there's no --config and no ad-hoc target; resolveLaunchServerConfigs() wraps it (core/mcp/node/config.ts:223-314). CLI wires it at clients/cli/src/cli.ts:395, TUI at clients/tui/src/tui-servers.ts:67, and clients/web/src/test/core/mcp/node/config.test.ts covers all three branches. So all three incarnations resolve to the same ~/.mcp-inspector/mcp.json. ✅
What remains is normalizing the --catalog / --config vocabulary and behavior across CLI/TUI to match the web model introduced in #1481/#1483 (landed in #1496), plus the one original acceptance item never completed: CLI/TUI --help text still doesn't mention the default path.
Current divergence (web vs CLI/TUI)
| Concept | Web (current, post-#1496) | CLI/TUI (today) |
|---|---|---|
| Writable default-catalog flag | --catalog <path> (or MCP_CATALOG_PATH) |
no such flag |
| Read-only session file flag | --config <path> — served, never written/seeded/migrated |
--config <path> — the only file flag; carries no read-only semantics |
| No-flag default | default catalog, writable, seeded if missing | default path injected into the --config slot, read-only by nature, errors if missing |
| Writable/read-only split | yes (writable flag end-to-end) |
none |
Confirmed by grep: there is no --catalog flag anywhere in clients/cli/src or clients/tui/src — --catalog is web-only. The CLI/TUI no-flag default fills the --config slot, so it plays the web's catalog role through the config flag, and a fresh machine errors with "Config file not found" instead of seeding.
Web reference: clients/web/server/run-web.ts:77-78 (--catalog = writable/seed-if-missing/file-watched; --config = read-only session) and specification/v2_catalog_launch_config.md.
Work
Adopt the #1481 semantics as the single shared model across web, CLI, and TUI:
- Add
--catalog <path>to CLI and TUI (mirroring web): writable catalog source, seed-if-missing, the slot the no-flag default fills. - Make
--config <path>a read-only session everywhere: served but never written/seeded/migrated — the same guarantee that protects a foreign config (e.g.claude_desktop_config.json) in web. - Re-point the no-flag default at the
--catalog(writable) slot, not the--configslot, inwithDefaultConfigPath()— and rename the helper/comments to stop conflating the two (it currently says "catalog" while filling--config). - Decide seed-on-missing for CLI/TUI. To truly match web, the writable default catalog should seed on first run rather than erroring. (If we deliberately keep CLI/TUI erroring, document that as an intentional difference.)
- Thread a
writablenotion through CLI/TUI resolution so--configvs--catalogactually differ in behavior — coordinate with the sharedresolveServerList+ writable unification in CLI: lift config-file headers/timeouts/OAuth into serverSettings (parity with TUI) #1482 / Inspector mcpdo client #1432 rather than duplicate it. - Mutual-exclusion + clear errors for
--catalog/--config/ ad-hoc combinations, matching the web conflict matrix inrun-web.ts. - Update CLI/TUI
--helpto document both flags and the default path (closes this issue's outstanding help-text criterion:cli.ts:291is still just.option("--config <path>", "Config file path")). - Tests for the new CLI/TUI matrix (default catalog used/seeded;
--catalogwritable;--configread-only & never mutated; conflicts error), mirroring the webrun-webresolution-matrix tests.
References / dependencies
- Reference model: Web: launcher --config should drive the web catalog, not just seed initialMcpConfig #1481 / Web/launcher:
--headeris accepted but only warns — apply it or remove it #1483 (web catalog vs read-only session),specification/v2_catalog_launch_config.md, launcher README flag table. - Writable-unification dependencies: CLI: lift config-file headers/timeouts/OAuth into serverSettings (parity with TUI) #1482 / Inspector mcpdo client #1432.
Activity
cliffhall commentedon Jun 16, 2026
Status: behavior already landed in the #1452 port — but it needs normalizing against the #1481 catalog/session model
The default-path fallback this issue asks for is already implemented (it came in with the CLI/TUI port, not a dedicated PR):
core/mcp/node/config.ts—withDefaultConfigPath()injectsgetDefaultMcpConfigPath()(~/.mcp-inspector/mcp.json) when there's no--configand no ad-hoc target;resolveLaunchServerConfigs()wraps it.clients/cli/src/cli.ts:395→resolveLaunchServerConfigs(...).clients/tui/src/tui-servers.ts:67→withDefaultConfigPath(...).clients/web/src/test/core/mcp/node/config.test.tscover all three branches (default present → use it; explicit config → unchanged; default absent → error).So all three incarnations now resolve to the same
~/.mcp-inspector/mcp.json, which is the "single source of truth" goal this issue and #1481 share. ✅However, #1481 (web) introduced a catalog vs. read-only session model that this issue's framing predates, and the CLI/TUI have not been brought in line with it. Normalizing that vocabulary + behavior everywhere is the remaining work.
The divergence to fix
--catalog <path>(orMCP_CATALOG_PATH)--config <path>(served, never written/seeded/migrated)--config <path>— but it's the only file flag and carries no read-only semantics--configslot, read-only by nature, errors if missingwritableflag end-to-end)Concretely:
--config/configPathslot with the default path, yet the code/comments call it the "default catalog path" (config.ts:223,307). Semantically it's playing the web's catalog role through the config flag. There is no--catalogflag in CLI/TUI.~/.mcp-inspector/mcp.jsonon first run; CLI/TUI error with "Config file not found" on a fresh machine. So "same source of truth" isn't a uniform first-run experience.cli.ts:291is just.option("--config <path>", "Config file path"), and no CLI/TUI help string mentions the default path.What we need to do to normalize
--catalog/--configeverywhereAdopt the #1481 semantics as the single shared model across web, CLI, and TUI:
--catalog <path>to CLI and TUI (mirroring web): writable catalog source, seed-if-missing, the slot the no-flag default fills.--config <path>a read-only session everywhere: served but never written/seeded/migrated — same guarantee that protects a foreign config (e.g.claude_desktop_config.json) in web.--catalog(writable) slot, not the--configslot, inwithDefaultConfigPath()— and rename the helper/comments to stop conflating the two (it currently says "catalog" while filling--config).writablenotion through CLI/TUI resolution so--configvs--catalogactually differ in behavior — this is the sharedresolveServerList+ writable unification already tracked in CLI: lift config-file headers/timeouts/OAuth into serverSettings (parity with TUI) #1482 / Inspector mcpdo client #1432; this issue should coordinate with those rather than duplicate them.--catalog/--config/ad-hoc combinations, matching the web conflict matrix inrun-web.ts.--helpto document both flags and the default path (closes this issue's outstanding help-text criterion).--catalogwritable;--configread-only & never mutated; conflicts error), mirroring the webrun-webresolution-matrix tests.Suggested issue hygiene [DONE]
The original three-branch default-fallback ask is done; what remains is the normalization above. Recommend either re-scoping this issue to "normalize
--catalog/--configterminology + behavior across web/CLI/TUI" (and link #1481 as the reference model, #1482/#1432 as the writable-unification dependencies), or closing this as delivered and opening a dedicated normalization issue. Either way the checklist above is the work.Reference model:
specification/v2_catalog_launch_config.mdand the launcher README flag table.[-]CLI/TUI: default --config to getDefaultMcpConfigPath() when no flag is given[/-][+]Normalize --catalog / --config across CLI/TUI to match web (#1481), + CLI/TUI --help[/+]test(launcher): add smoke:cli + smoke:tui e2e launcher smokes (#1347)
feat(cli,tui): normalize --catalog / --config with web; update --help (…