Background
#1343 introduces getDefaultMcpConfigPath() (returns ~/.mcp-inspector/mcp.json). The web client reads from that path automatically. The CLI/TUI currently require an explicit --config <path> — resolveServerConfigs in core/mcp/node/config.ts errors with "Target is required" if no config and no positional args.
This issue: when the CLI/TUI is wired up to v2, fall back to getDefaultMcpConfigPath() if no --config AND no positional target is supplied. The same mcp.json becomes the source of truth across all three Inspector incarnations.
Depends on
#1246 (Port v1.5 CLI / TUI / launcher to v2). Touch as part of that port, or as an immediate follow-up.
Scope
core/mcp/node/config.ts resolveServerConfigs: when !hasConfigPath && !hasAdHoc, try getDefaultMcpConfigPath(); only error if that file is also absent.
- Update CLI/TUI
--help text to mention the default path.
- Tests for the three branches: no config + default present (use it), no config + default absent (error), explicit config (unchanged behavior).
Background
#1343 introduces
getDefaultMcpConfigPath()(returns~/.mcp-inspector/mcp.json). The web client reads from that path automatically. The CLI/TUI currently require an explicit--config <path>—resolveServerConfigsincore/mcp/node/config.tserrors with "Target is required" if no config and no positional args.This issue: when the CLI/TUI is wired up to v2, fall back to
getDefaultMcpConfigPath()if no--configAND no positional target is supplied. The samemcp.jsonbecomes the source of truth across all three Inspector incarnations.Depends on
#1246 (Port v1.5 CLI / TUI / launcher to v2). Touch as part of that port, or as an immediate follow-up.
Scope
core/mcp/node/config.tsresolveServerConfigs: when!hasConfigPath && !hasAdHoc, trygetDefaultMcpConfigPath(); only error if that file is also absent.--helptext to mention the default path.