Skip to content

Import server configs from other MCP clients (Claude Desktop, Cursor, Cline) #1348

@cliffhall

Description

@cliffhall

Background

#1343 ships add/edit/remove via UI, but typing in N servers by hand when they're already configured in Claude Desktop / Cursor / Cline is friction. The InspectorView prop interface already declares onServerImportConfig and onServerImportJson — they're currently todoNoop in App.tsx.

This issue: an "Import" button on the Servers screen that reads another tool's MCP config and merges it into ~/.mcp-inspector/mcp.json.

Known canonical source paths

  • Claude Desktop
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  • Cursor: ~/.cursor/mcp.json (global), <workspace>/.cursor/mcp.json (per-project)
  • Cline: ~/Documents/Cline/MCP/cline_mcp_settings.json (varies by platform)
  • VS Code native MCP: ~/.config/Code/User/mcp.json or similar

All use the same { mcpServers: { ... } } shape, so parsing reuses loadMcpServersConfig.

Merge semantics

  • Conflicting id: prompt the user — overwrite / skip / rename.
  • Each merged entry goes through the existing POST /api/servers so the file ends up with the unioned set.

Sketch

  • Backend: nothing new needed if we feed entries through POST /api/servers. Or add GET /api/import-source?type=claude-desktop|cursor|cline that reads the well-known path on the backend and returns the parsed config — saves the user a file-picker round-trip on the common cases.
  • Frontend:
    • Source picker (dropdown of known agents) with platform-aware default paths.
    • File-picker fallback (<input type=file> + client-side parse) for non-standard paths and for paths the backend cannot read.
    • Conflict-resolution dialog.
    • Calls addServer for each merged entry (or a future bulk endpoint).

Probably worth shipping both backend-read and file-upload paths: backend-read for one-click on common cases, file-upload for everything else.

Out of scope

  • Two-way sync. Import is one-shot; subsequent edits in Claude Desktop don't propagate.
  • Re-import diffing ("which servers in Claude Desktop are new since I last imported?").

Metadata

Metadata

Assignees

No one assigned

    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