Overview
Every add-mcp command at a glance.
The implicit default command installs a server from a URL, package name, or command. There is no literal add subcommand: use add-mcp <target>. Everything else is a named subcommand, as defined in the 2.6.1 CLI source:
| Command | Description |
|---|---|
add-mcp <target> |
Install an MCP server by URL, npm package, or command |
find |
Search MCP registries and install a selected match |
search |
Alias for find |
list |
List installed MCP servers across detected agents |
remove |
Remove an MCP server from agent configurations |
sync |
Synchronize server names and installations across agents |
unify |
Alias for sync |
list-agents |
List all supported coding agents with scope (project/global) |
Shared flags
These flags work on every install-capable command:
| Flag | Description |
|---|---|
-g, --global |
Install to user directory instead of project |
-a, --agent <agent> |
Target specific agents (e.g. cursor, claude-code). Repeatable. |
-y, --yes |
Skip all confirmation prompts |
--all |
Install to all agents |
--gitignore |
Add generated config files to .gitignore |
Use --help for help; -h means --header on the install command.
All remaining transport-compatible agents share one install scope. After any incompatible agents are skipped with --all, a selection containing any global-only agent uses global scope for everyone; otherwise interactive mode asks, and -y defaults to project scope. -g always forces global. --all selects all agents unless explicit -a selections are supplied, skips incompatible transports, and does not imply --yes. Selecting all agents results in global scope because global-only agents are included.
Smart detection
The CLI automatically detects agents based on your environment:
- Project mode (default) — detects project-level config files (
.cursor/,.vscode/,.mcp.json, …) and preselects the detected agents. - Global mode (
-g) — detects all globally-installed agents (including Claude Desktop, Codex, Zed) and preselects them. - No agents detected — interactive mode defaults to your last selection; with
--yes, selects all project-capable agents (project mode) or all global-capable agents (global mode). The global fallback includes Claude Desktop, so a remote install fails before writing unless you explicitly target compatible agents or pass--allto skip unsupported transports.