Skip to content

Complete config management CLI: list/get/add-manual/remove/import #85

@avelino

Description

@avelino

Problem

The current mcp config surface is minimal — only mcp config path and mcp config edit. Anything beyond "open it in $EDITOR" requires the user to hand-edit ~/.config/mcp/servers.json.

This forces editing JSON by hand for flows that should be one-liners:

  • Inspecting config. There is no way to list configured servers (name, transport type, URL or command summary) without dumping the JSON or running mcp --list (which only prints names, not the entry shape).
  • Inspecting a single server. No mcp config get <name> to print the resolved entry for one server — useful for debugging env var interpolation, auth headers, or "what is actually in my config right now".
  • Adding a manually-crafted server. mcp add is tied to the registry. A user who wants to add an HTTP endpoint with custom headers, a local stdio command, or a CLI-as-MCP entry has to open the JSON and get the shape right by memory.
  • Removing a server. mcp remove exists, but is not part of the mcp config command group and is less discoverable from mcp config --help.
  • Importing from another MCP client. Cursor, Claude Code, Claude Desktop, Codex, Windsurf, and VS Code all have their own mcp.json/mcpServers config. Today, a user migrating to mcp has to copy/paste entries by hand. There is no mcp config import <source> that reads an existing client's config and merges it (optionally with a --copy flag to materialize the entry locally rather than referencing it).

The consequence is friction on first-run DX (empty config, no obvious way to populate it without reading docs or the registry) and on the migration story (users already invested in another client have to redo the work).

Desired outcome

mcp config grows a coherent set of subcommands covering the full CRUD + discovery lifecycle:

  • List — enumerate configured servers with their transport and a one-line summary.
  • Get — dump a single resolved server entry (with env vars interpolated or with placeholders, as appropriate for the use case).
  • Add (manual) — add a server without going through the registry: HTTP URL, stdio command, or CLI-as-MCP.
  • Remove — delete a server from config (reachable as mcp config remove, in addition to the existing top-level mcp remove).
  • Import — read mcpServers from another client's config (Cursor / Claude Code / Claude Desktop / Codex / Windsurf / VS Code) and bring entries into servers.json, with conflict handling when a name already exists.

Existing mcp config path and mcp config edit continue to work.

Out of scope

  • Exact flag surface, fuzzy name matching for get/remove, JSON output shape, and conflict-resolution strategy on import — to be decided in design.
  • Auto-discovering editor configs on disk without the user naming the source (can be a follow-up).
  • Interactive TUI for editing entries.

Related

Prior art

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliCLI commands, flags, and UXconfigConfiguration and servers.jsonenhancementNew feature or improvement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions