Supported agents
Every coding agent add-mcp can install MCP servers to, with config paths and scopes.
MCP servers can be installed to any of these agents. Project paths are relative to your working directory; agents without a project path are global-only. Global paths below show macOS defaults unless an override is noted; see the platform and environment notes below.
Verified against add-mcp 2.6.1 on 2026-11-16: agent configuration source, agent identifiers and aliases, and release changelog.
| Agent | --agent |
Project path | Global path |
|---|---|---|---|
| Antigravity | antigravity |
— | ~/.gemini/config/mcp_config.json (shared by Antigravity, Antigravity IDE, and Antigravity CLI) |
| Cline VSCode Extension | cline |
— | ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json |
| Cline CLI | cline-cli |
— | ~/.cline/data/settings/cline_mcp_settings.json |
| Claude Code | claude-code |
.mcp.json |
~/.claude.json |
| Claude Desktop | claude-desktop |
— | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Codex | codex |
.codex/config.toml |
~/.codex/config.toml |
| Cursor | cursor |
.cursor/mcp.json |
~/.cursor/mcp.json |
| Factory Droid | factory-droid |
.factory/mcp.json |
~/.factory/mcp.json |
| fx | fx |
— | ~/.fx/mcp.json |
| Gemini CLI | gemini-cli |
.gemini/settings.json |
~/.gemini/settings.json |
| Goose | goose |
— | ~/.config/goose/config.yaml |
| GitHub Copilot CLI | github-copilot-cli |
.mcp.json (or existing .github/mcp.json) |
$COPILOT_HOME/mcp-config.json (defaults to ~/.copilot/mcp-config.json) |
| Grok Build | grok-build |
.grok/config.toml |
$GROK_HOME/config.toml (defaults to ~/.grok/config.toml) |
| Hermes Agent | hermes |
— | $HERMES_HOME/config.yaml (defaults to ~/.hermes/config.yaml, or the active profile) |
| Junie | junie |
.junie/mcp/mcp.json |
$JUNIE_HOME/mcp/mcp.json (defaults to ~/.junie/mcp/mcp.json, which the Junie JetBrains IDE plugin reads) |
| Kilo Code | kilo-code |
kilo.json (or existing .kilo/, .kilocode/, or root kilo.jsonc config) |
~/.config/kilo/kilo.json (or existing ~/.config/kilo/kilo.jsonc) |
| Kimi Code | kimi-code |
.kimi-code/mcp.json |
$KIMI_CODE_HOME/mcp.json (defaults to ~/.kimi-code/mcp.json) |
| Kiro CLI | kiro-cli |
.kiro/settings/mcp.json |
~/.kiro/settings/mcp.json (shared with the Kiro IDE) |
| Mastra Code | mastracode |
.mastracode/mcp.json |
~/.mastracode/mcp.json |
| MCPorter | mcporter |
config/mcporter.json |
~/.mcporter/mcporter.json (or existing ~/.mcporter/mcporter.jsonc) |
| OpenCode | opencode |
opencode.jsonc (or existing opencode.json / .opencode/ config) |
~/.config/opencode/opencode.jsonc (or existing opencode.json) |
| Pi | pi |
.pi/mcp.json |
$PI_CODING_AGENT_DIR/mcp.json (defaults to ~/.pi/agent/mcp.json) |
| VS Code | vscode |
.vscode/mcp.json |
~/Library/Application Support/Code/User/mcp.json |
| Windsurf | windsurf |
— | ~/.codeium/windsurf/mcp_config.json |
| Zed | zed |
.zed/settings.json |
~/Library/Application Support/Zed/settings.json |
Platform and environment paths
- Cline CLI uses
$CLINE_DIR/data/settings/cline_mcp_settings.jsonwhenCLINE_DIRis set. Codex uses$CODEX_HOME/config.tomlwhenCODEX_HOMEis set. - On Windows, the
~/Library/Application Supportpaths above use%APPDATA%(default~/AppData/Roaming) instead. Goose uses%APPDATA%/Block/goose/config/config.yaml. Hermes defaults to%LOCALAPPDATA%/hermes/config.yaml(with~/AppData/Localas the fallback base). - On Linux, the
~/Library/Application Supportpaths above use$XDG_CONFIG_HOME(default~/.config) instead; Zed’s directory is lowercasezed. Goose uses$XDG_CONFIG_HOME/goose/config.yaml. On macOS, Goose uses~/.config/goose/config.yamlregardless ofXDG_CONFIG_HOME. - Kilo Code uses
$XDG_CONFIG_HOME/kilo(default~/.config/kilo) on every platform, including Windows. OpenCode stays under~/.config/opencode; GitHub Copilot CLI uses$COPILOT_HOME(default~/.copilot), notXDG_CONFIG_HOME. - OpenCode reuses the first existing project file in this order:
opencode.jsonc,opencode.json,.opencode/opencode.jsonc,.opencode/opencode.json. If none exists, it createsopencode.jsonc. Globally,.jsoncwins over.json. - Kilo Code reuses the first existing project file in this order:
.kilo/kilo.jsonc,.kilo/kilo.json,.kilocode/kilo.jsonc,.kilocode/kilo.json, rootkilo.jsonc; otherwise it writes rootkilo.json. Globally, an existingkilo.jsoncwins overkilo.json. - MCPorter prefers an existing global
mcporter.jsonovermcporter.jsonc; a new file uses.json.
Transports
All listed agents accept stdio, HTTP, and SSE installs through add-mcp except Claude Desktop, whose config file supports stdio only. Add Claude Desktop remote servers through Settings → Connectors in the app instead. A remote CLI install that selects Claude Desktop fails unless --all is set, in which case it is skipped with a warning.
Aliases
| Alias | Resolves to |
|---|---|
codeium, cascade |
windsurf |
cline-vscode |
cline |
droid, factory |
factory-droid |
gemini |
gemini-cli |
github-copilot |
vscode |
grok |
grok-build |
hermes-agent |
hermes |
kilo, kilocode |
kilo-code |
kimi |
kimi-code |
kiro |
kiro-cli |
mastra |
mastracode |
pi-agent |
pi |
These aliases work with the CLI’s --agent flag. SDK upsertServer and removeServer require canonical identifiers instead (SDK source).
Troubleshooting
Some agents and editors, like Claude Code, require a restart to load a new MCP server. Others, like Cursor, require you to navigate to the MCP settings page and toggle the new server as enabled.
Kimi Code only loads a project-level .kimi-code/mcp.json after you trust the folder in the CLI, so a project install may not take effect until then. Its MCP config is also validated as a whole: if another entry in the file is invalid, Kimi Code disables every MCP server, including a newly added one.
Mastra Code also reads project .mcp.json. add-mcp writes .mastracode/mcp.json (and ~/.mastracode/mcp.json globally) so a mixed Claude + Mastra install does not share that file.
Pi has no built-in MCP. add-mcp writes the Pi-owned files pi-mcp-adapter reads. Install that extension with pi install npm:pi-mcp-adapter. A running Pi session picks the change up after /reload.
Junie CLI and the Junie JetBrains IDE plugin read the same mcp.json. The IDE plugin always reads ~/.junie/mcp/mcp.json, so a global install to a different JUNIE_HOME is only used by the CLI. Junie requires server names to match ^[a-zA-Z0-9_-]+$, so keep --name within that pattern. Junie CLI sends an Authorization header from the config; the IDE plugin does not support tokens in MCP configs.
Hermes Agent keeps MCP servers under mcp_servers in the same config.yaml as its other settings; add-mcp edits only that entry and keeps the file’s comments. add-mcp follows the active_profile file under the Hermes root, including a custom HERMES_HOME, and writes profiles/<name>/config.yaml for a non-default profile. Empty or default selections use the root config; a root already directly under profiles/ is used as-is. A running session picks the change up after /reload-mcp.
Goose and Hermes YAML parse errors report the file, line, column, and error code without quoting file contents. YAML warnings are suppressed in 2.6.1.
fx reads MCP servers only from ~/.fx/mcp.json. A project file cannot add a server. A running session applies the change with /mcp reload.
OpenCode keeps the shape already in the file: mcp.<name> on a V1 or empty config, mcp.servers.<name> when that native map is already there. In a mixed file, a native entry wins over a legacy entry with the same name. Adding a new name to a mixed file normally writes V1; names that collide with mcp.servers or mcp.timeout settings use the native map when available. Renames keep the existing map unless the destination collides with those settings (OpenCode resolver).
GitHub Copilot CLI project installs write .mcp.json. If .mcp.json is absent, an existing .github/mcp.json is reused. Copilot CLI does not read .vscode/mcp.json (that path is the VS Code agent). Entries left in .vscode/mcp.json from older Copilot CLI installs stay there for VS Code; rerun with --agent github-copilot-cli to write the CLI path. .mcp.json is shared with Claude Code: removing a server from either agent removes it for both. add-mcp will not create .mcp.json when .github/mcp.json already exists, because Copilot CLI would then ignore the GitHub file. Merge those servers into .mcp.json under mcpServers first. Copilot writes replace the file with strict JSON, so comments in that file are dropped (including global ~/.copilot/mcp-config.json). Copilot CLI loads a project file only after the folder is trusted; confirm with copilot mcp list --json.