Skip to main content

Supported Agents

add-mcp supports 10 coding agents across local and global installation scopes. The CLI automatically detects installed agents and routes configuration to the appropriate location.

All Supported Agents

AgentArgumentDisplay NameProject SupportGlobal Support
Claude Codeclaude-codeClaude Code
Claude Desktopclaude-desktopClaude Desktop-
CodexcodexCodex
CursorcursorCursor
Gemini CLIgemini-cliGemini CLI
GoosegooseGoose-
GitHub Copilot CLIgithub-copilot-cliGitHub Copilot CLI
OpenCodeopencodeOpenCode
VS CodevscodeVS Code
ZedzedZed

Agent Aliases

add-mcp supports aliases for common agent names:
  • geminigemini-cli
  • github-copilotvscode

Agent Configuration Details

Claude Code

  • Argument: claude-code
  • Display Name: Claude Code
  • Project Path: .mcp.json
  • Global Path: ~/.claude.json
  • Config Key: mcpServers
  • Format: JSON
  • Supported Transports: stdio, HTTP, SSE
  • Project Detection Paths: .mcp.json, .claude

Claude Desktop

  • Argument: claude-desktop
  • Display Name: Claude Desktop
  • Project Path: Not supported (global only)
  • Global Path: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
  • Config Key: mcpServers
  • Format: JSON
  • Supported Transports: stdio only
  • Note: Claude Desktop only supports local (stdio) servers via its config file. Add remote servers through Settings → Connectors in the app instead.

Codex

  • Argument: codex
  • Display Name: Codex
  • Project Path: .codex/config.toml
  • Global Path: ~/.codex/config.toml (or $CODEX_HOME/config.toml)
  • Config Key: mcp_servers
  • Format: TOML
  • Supported Transports: stdio, HTTP, SSE
  • Project Detection Paths: .codex

Cursor

  • Argument: cursor
  • Display Name: Cursor
  • Project Path: .cursor/mcp.json
  • Global Path: ~/.cursor/mcp.json
  • Config Key: mcpServers
  • Format: JSON
  • Supported Transports: stdio, HTTP, SSE
  • Project Detection Paths: .cursor

Gemini CLI

  • Argument: gemini-cli (alias: gemini)
  • Display Name: Gemini CLI
  • Project Path: .gemini/settings.json
  • Global Path: ~/.gemini/settings.json
  • Config Key: mcpServers
  • Format: JSON
  • Supported Transports: stdio, HTTP, SSE
  • Project Detection Paths: .gemini

Goose

  • Argument: goose
  • Display Name: Goose
  • Project Path: Not supported (global only)
  • Global Path: ~/.config/goose/config.yaml (Linux/macOS) or %APPDATA%\Block\goose\config\config.yaml (Windows)
  • Config Key: extensions
  • Format: YAML
  • Supported Transports: stdio, HTTP, SSE

GitHub Copilot CLI

  • Argument: github-copilot-cli (or alias: github-copilot)
  • Display Name: GitHub Copilot CLI
  • Project Path: .vscode/mcp.json
  • Global Path: ~/.copilot/mcp-config.json (or $XDG_CONFIG_HOME/.copilot/mcp-config.json)
  • Config Key (Global): mcpServers
  • Config Key (Local): servers
  • Format: JSON
  • Supported Transports: stdio, HTTP, SSE
  • Project Detection Paths: .vscode

OpenCode

  • Argument: opencode
  • Display Name: OpenCode
  • Project Path: opencode.json
  • Global Path: ~/.config/opencode/opencode.json
  • Config Key: mcp
  • Format: JSON
  • Supported Transports: stdio, HTTP, SSE
  • Project Detection Paths: opencode.json, .opencode

VS Code

  • Argument: vscode
  • Display Name: VS Code
  • Project Path: .vscode/mcp.json
  • Global Path (macOS): ~/Library/Application Support/Code/User/mcp.json
  • Global Path (Linux): ~/.config/Code/User/mcp.json (or $XDG_CONFIG_HOME/Code/User/mcp.json)
  • Global Path (Windows): %APPDATA%\Code\User\mcp.json
  • Config Key: servers
  • Format: JSON
  • Supported Transports: stdio, HTTP, SSE
  • Project Detection Paths: .vscode

Zed

  • Argument: zed
  • Display Name: Zed
  • Project Path: .zed/settings.json
  • Global Path (macOS): ~/Library/Application Support/Zed/settings.json
  • Global Path (Linux): ~/.config/zed/settings.json (or $XDG_CONFIG_HOME/zed/settings.json)
  • Global Path (Windows): %APPDATA%\Zed\settings.json
  • Config Key: context_servers
  • Format: JSON
  • Supported Transports: stdio, HTTP, SSE
  • Project Detection Paths: .zed

Smart Agent Detection

add-mcp automatically detects agents based on the installation scope:

Project Mode (Default)

When you run add-mcp without the -g flag, it detects project-level configurations:
  • Checks for project-level config files (.cursor/, .vscode/, .mcp.json, etc.)
  • Detects agents that have configuration present in the current directory
  • Pre-selects detected agents for installation
  • Shows all project-capable agents for manual selection
Detection Logic (from detectProjectAgents() in agents.ts:381-397):
function detectProjectAgents(cwd?: string): AgentType[] {
  const dir = cwd || process.cwd();
  const detected: AgentType[] = [];

  for (const [type, config] of Object.entries(agents)) {
    if (!config.localConfigPath) continue;

    for (const detectPath of config.projectDetectPaths) {
      if (existsSync(join(dir, detectPath))) {
        detected.push(type as AgentType);
        break;
      }
    }
  }

  return detected;
}

Global Mode (-g flag)

When you run add-mcp -g, it detects globally-installed agents:
  • Checks for global installation directories
  • Detects all agents installed on your system (including global-only agents)
  • Pre-selects detected agents for installation
  • Shows all agents for manual selection
Detection Logic (from detectAllGlobalAgents() in agents.ts:399-409):
async function detectAllGlobalAgents(): Promise<AgentType[]> {
  const detected: AgentType[] = [];

  for (const [type, config] of Object.entries(agents)) {
    if (await config.detectGlobalInstall()) {
      detected.push(type as AgentType);
    }
  }

  return detected;
}
Each agent has a custom detectGlobalInstall() function that checks for agent-specific directories or files.

Global-Only Agents

Two agents only support global installation:
  • Claude Desktop - Global config only, project config not supported
  • Goose - Global config only, project config not supported

Specifying Agents

You can target specific agents using the -a or --agent flag:
# Single agent
npx add-mcp https://mcp.example.com -a cursor

# Multiple agents
npx add-mcp https://mcp.example.com -a cursor -a claude-code

# All agents
npx add-mcp https://mcp.example.com --all

# Using aliases
npx add-mcp https://mcp.example.com -a gemini  # Resolves to gemini-cli
  • Transports - Learn about HTTP, SSE, and stdio transports
  • Scopes - Understand project vs global installation

Build docs developers (and LLMs) love