Skip to main content

Synopsis

mcpconfig delete-server

Description

delete-server runs an interactive flow: you enter the exact name of the MCP server to remove, then choose which app config(s) to update. Only configs that exist, support editing (JSON or Codex TOML), and contain a server with that name are shown. mcpconfig removes the server entry from every selected config. If no writable configs exist, the command shows a message and suggests running list-clients. If the server name is not found in any config, it shows “Server not found” and suggests running list-servers to see existing server names.

Options

None.

Flow

  1. Server name — Enter the exact name of the MCP server as it appears in the config (e.g. my-mcp-server). Only configs that contain this server will be listed in the next step.
  2. Select apps — A list of configs that have that server is shown. Use ↑/↓ to move, Space to toggle each app (or Select all), then Enter to confirm. The server is removed from every selected config.
After you press Enter, the server is removed from each selected config. JSON configs have the entry deleted from mcpServers; Codex TOML has the [mcp_servers.<name>] section removed per the Codex config reference.

Example

mcpconfig delete-server

Output

  • Success — ”✓ Server “<name>” removed from N config(s)” with each config path (where <name> is the server name you entered).
  • Server not found — No config contains a server with that name; suggests running list-servers.
  • Error — If writing fails, an error message is shown.
  • No configs — “No writable MCP configs found.” with a hint to run list-clients.

See also