Repository navigation
Closed
Description
Background
#1348 covers importing server configs from other MCP clients (Claude Desktop, Cursor, Cline) — local { mcpServers: { ... } } files. This issue is the complementary path: importing a server from the official MCP Registry via its server card (server.json) schema.
The InspectorView prop onServerImportJson is currently todoNoop in App.tsx, and the draft state InspectorServerJsonDraft already exists in core/mcp/types.ts (with parsed?: unknown pending the registry schema type). This issue fills in that wiring — paste/look up a registry server card, pick a package, fill required env, and merge it into ~/.mcp-inspector/mcp.json.
Known canonical source
- MCP Registry API:
https://registry.modelcontextprotocol.io(server list + per-serverserver.json). - Server card schema (
server.json): describes a server'sname,description,packages[](npm/pypi/oci, withruntimeHint,runtimeArguments,packageArguments,environmentVariables) and/orremotes[](sse/streamable-http URLs). - A registry card may declare multiple packages/transports — the user picks which one to install.
Import semantics
- Translate a selected registry
package(orremote) into aStoredMCPServer(command/args/env for stdio packages; url/transport for remotes). - Surface required
environmentVariables(and anyisSecret/isRequiredflags) as fields the user fills before save. - Allow a
nameOverrideand per-varenvOverrides(already onInspectorServerJsonDraft). - Conflicting
id/name: prompt the user — overwrite / skip / rename (same resolution UX as Import server configs from other MCP clients (Claude Desktop, Cursor, Cline) #1348). - Each merged entry goes through the existing
POST /api/serversso the file ends up with the unioned set.
Sketch
- Backend: optional
GET /api/registry?...(search) andGET /api/registry/:name(fetch one card) proxy so the browser avoids CORS and we can cache. Paste-JSON path needs no backend. - Frontend (
ImportServerJsonPanelwiring):- Paste-
server.jsontextarea → parse intoInspectorServerJsonDraft.parsed. - (Optional) registry search/browse to fetch a card by name.
- Package selector (
selectedPackageIndex) when a card declares more than one. - Env/argument form derived from the selected package, writing
envOverrides+nameOverride. - Conflict-resolution dialog, then
addServerper merged entry.
- Paste-
- Add the registry server card type to replace
parsed?: unknowninInspectorServerJsonDraft.
Out of scope
- Auto-update / re-sync when the registry card changes.
- Publishing to the registry (read-only import only).
- Registry auth / private registries (public registry first).
Metadata
Metadata
Assignees
Labels
v2Issues and PRs for v2Issues and PRs for v2
Activity