> ## Documentation Index
> Fetch the complete documentation index at: https://mcpconfig.plaino.me/llms.txt
> Use this file to discover all available pages before exploring further.

# delete-server

> Interactively remove an MCP server by name from selected configs

## Synopsis

```bash theme={null}
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](https://developers.openai.com/codex/config-reference/).

## Example

```bash theme={null}
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

* [list-clients](/commands/list-clients) — List where config files are located.
* [list-servers](/commands/list-servers) — List MCP servers (use to find exact server names).
* [add-server](/commands/add-server) — Add a server to configs.
* [Supported apps](/reference/supported-apps) — Which configs are writable (JSON and Codex TOML).
