Skip to content

Port v1.5 CLI / TUI / launcher to v2 (clients/cli, clients/tui, clients/launcher) #1246

@cliffhall

Description

@cliffhall

Background

AGENTS.md documents three intended Inspector V2 incarnations: Web, TUI, CLI. v1.5 ships all three (clients/web/, clients/tui/, clients/cli/), each consuming the shared core/ package. v2 currently has only clients/web/; clients/tui/, clients/cli/, and the shared clients/launcher/ (per the docs structure) don't exist yet.

The plan flags this as a follow-up: "CLI / TUI clients. v1.5 has both (clients/cli/, clients/tui/); v2 will reuse the wrapper types from core/mcp/types.ts once that file exists in v2." The core/mcp/types.ts part is now done (Phase 0.2 + Phase 5 cleanup); what remains is the actual CLI/TUI/launcher port.

Scope

Three sub-deliverables, ideally as three child issues once this is broken down:

clients/launcher/ — shared bootstrap that picks a transport and connects, used by all three clients. Port from v1.5.

clients/cli/ — non-interactive command-line surface for one-shot operations (list tools, call a tool with JSON args, read a resource, etc.). Port from v1.5.

clients/tui/ — interactive terminal UI mirroring the web client's information architecture in a text grid (likely @blessed/blessed or ink per v1.5's choice). Port from v1.5.

Acceptance criteria

  • clients/launcher/, clients/cli/, clients/tui/ each exist with their own package.json, tsconfig.json, and entry point.
  • All three import wrapper types from core/mcp/types.ts (the same module the web client uses) — no parallel type declarations.
  • CLI: at minimum supports inspector list-tools <server>, inspector call-tool <server> <name> <json-args>, inspector read-resource <server> <uri> against any MCPServerConfig.
  • TUI: at minimum mirrors the Servers / Tools / Prompts / Resources / Logs screens from the web client, navigable with the keyboard.
  • Each client has its own README under clients/<name>/README.md documenting commands and developer setup. Top-level README.md is updated to enumerate the three clients.
  • AGENTS.md "Project Structure" section is updated to reflect the now-populated clients/cli/, clients/tui/, clients/launcher/.

Test plan

  • CLI: integration test runs each subcommand against a stub MCP server and asserts on stdout JSON.
  • TUI: snapshot tests of rendered screens at fixed terminal sizes (80x24, 120x40).
  • Launcher: unit tests covering each transport branch (stdio, sse, streamable-http).
  • npm run format && npm run lint && npm run build clean across all three clients.
  • Manual: run the CLI against npx @modelcontextprotocol/server-filesystem and confirm tool listing matches the web client's output.

Out of scope

  • Adding new features that don't exist in v1.5's CLI/TUI.
  • Multi-server simultaneous connection in CLI/TUI.
  • Persistent session state (CLI runs are one-shot).

Blocked by

  • v2 core/ hook layer effort — the launcher/CLI/TUI all want the same InspectorClient abstraction the web client uses; that lives in the hook layer.

Related

Metadata

Metadata

Assignees

Labels

v2Issues and PRs for v2

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions