> ## 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.

# add-server

> Interactively add an MCP server to one or more configs

## Synopsis

```bash theme={null}
mcpconfig add-server
```

## Description

**add-server** runs an interactive flow: you choose which app config(s) to update, then enter the server name, command, and args. mcpconfig writes the new MCP server to every selected config. Only configs that **exist** and support adding servers are shown—**JSON** configs (Claude Desktop, Cursor, Cline, etc.) and **Codex** `config.toml`. YAML configs (Goose, Continue.dev) are not writable by add-server.

If no writable configs are found, the command shows a message and suggests running **list-clients** to see which configs exist.

## Options

None.

## Flow

1. **Select apps** — A list of writable configs is shown. Use **↑/↓** to move, **Space** to toggle each app (or **Select all**), then **Enter** to continue. You must select at least one app.
2. **Server name** — Enter a unique key for the MCP server (e.g. `my-mcp-server`).
3. **Command** — Enter the executable to run (e.g. `npx`, `python`, `node`).
4. **Arguments** — Enter optional args, comma-separated (e.g. `-y`, `run`, `my-server`). You can leave this empty.

After you submit args, the server is written to every selected config. JSON configs get a new entry under `mcpServers`; Codex TOML gets an `[mcp_servers.<name>]` section per the [Codex config reference](https://developers.openai.com/codex/config-reference/).

## Example

```bash theme={null}
mcpconfig add-server
```

## Output

* **Success** — "✓ Server added to N config(s)" with the name, command, and each config path.
* **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 from found configs.
* [Supported apps](/reference/supported-apps) — Which configs are writable (JSON and Codex TOML).
