feat: port CLI, TUI, and launcher from v1.5 into v2#1451
Closed
BobDickinson wants to merge 2 commits into
Closed
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Author
|
Replaced with same repo PR #1452 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports the CLI, TUI, and launcher from v1.5 into v2 with the smallest practical blast radius. The goal is to get all three clients building, testable, and invocable from a single
mcp-inspectorentrypoint — not to fully “v2-ify” them yet.This is the “drag the rest of the clients kicking and screaming into v2” PR. Follow-ups will tackle deeper v2 integration (catalog UX, CI hardening, TUI parity, session-oriented CLI, etc.).
Closes #1246.
What changed
New clients (ported from v1.5)
clients/cli/— one-shot CLI (runCli), 86 ported integration testsclients/tui/— Ink TUI (runTui), minimal smoke testsclients/launcher/— mode router (--web/--cli/--tui; default web), argv forwardingPackaging & build
@modelcontextprotocol/inspectorbecomes a fat npm package: merged runtime deps,prepack→ full build,mcp-inspectorbintsupbundles@inspector/coreinto CLI/TUI/web-runnerbuild/index.js(core is source-only in v2, not a separate published package)clients/{web,cli,tui}/build/index.js— nofile:workspace depsWeb changes (required for launcher)
runWeb(argv)— programmatic web entry formcp-inspector --web/--web --devtsup.runner.config.ts+clients/web/build/index.js— Node runner separate from Vite SPA buildweb-server-config.ts— shared config builder for dev plugin, prod Hono, and launcherConfig / catalog (minimal)
withDefaultConfigPath()incore/mcp/node/config.ts— CLI and TUI fall back to~/.mcp-inspector/mcp.jsonwhen no--configand no ad-hoc targetmcpConfigToServerEntries()(correct v2 settings path); CLI still uses bareMCPServerConfigfrom file (known gap)Infra & docs
vitest.shared.mts— shared@inspector/core/ test-server aliases for CLI/TUI Vitest--helpsmoke, Storybook (existing web pipeline unchanged in spirit)specification/v2_cli_tui_launcher.md— architecture spec for this portspecification/v2_catalog_launch_config.md— catalog/launch design (mostly future work; cross-linked)What we intentionally did not solve
--catalog/servers/importrunWeb --configsets legacyinitialMcpConfigonly; nomcpConfigPathon backendheaders/timeouts/OAuth not lifted intoserverSettings(TUI does lift them)runWeb --headervalidateclients/web/dist/(CI builds web; launcher smoke does not start prod web end-to-end)Test plan
npm run test:coverage(web unit + integration)npm run test:cli(CLI tests)npm run test:tui(TUI tests)npm run test:storybook(Storybook play tests)--help,--cli --help,--tui --helpnpm run build(web + cli + tui + launcher)mcp-inspector --cli node … --method tools/listmcp-inspector --tuiwith default~/.mcp-inspector/mcp.jsonmcp-inspector --web --devDocs
specification/v2_cli_tui_launcher.mdspecification/v2_catalog_launch_config.mdAGENTS.md(project structure, test commands)