When you runDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/neon-solutions/add-mcp/llms.txt
Use this file to discover all available pages before exploring further.
add-mcp without specifying an agent, it doesn’t ask you to pick from a blank list — it scans your environment first. This smart detection step finds which AI coding agents are active in your current directory (or on your machine globally) and pre-selects them in the interactive prompt, so the right agents are already checked before you press Enter.
How detection works
Detection logic differs based on whether you are installing in project scope (the default) or global scope (-g).
- Project mode (default)
- Global mode (-g)
- No agents detected
add-mcp scans the current directory for agent config markers. Each agent has a set of paths it looks for — for example, Cursor is detected when
Agents that are global-only (Antigravity, Cline, Cline CLI, Claude Desktop, Goose, Windsurf) are never detected in project mode but still appear in the list so you can select them manually.
.cursor/ exists, Claude Code when .mcp.json or .claude/ is present, and VS Code / GitHub Copilot CLI when .vscode/ exists.Detected agents appear at the top of the multi-select list with a project hint and are pre-checked. You can deselect them or add others before confirming.Detected project markers by agent:| Agent | Detection paths |
|---|---|
| Claude Code | .mcp.json, .claude/ |
| Codex | .codex/ |
| Cursor | .cursor/ |
| Gemini CLI | .gemini/ |
| GitHub Copilot CLI | .vscode/ |
| MCPorter | config/mcporter.json |
| OpenCode | opencode.json, .opencode/ |
| VS Code | .vscode/ |
| Zed | .zed/ |
Last-selection memory
add-mcp remembers the agents you chose the last time you ran an install. This selection is persisted to~/.config/add-mcp/config.json (respecting $XDG_CONFIG_HOME) and used as the default pre-selection the next time no agents are detected.
In the multi-select prompt, previously chosen agents that were not detected in the current environment appear below detected agents with a · selected last time hint, making it easy to spot them.
The last-selection memory is used as a fallback only when no agents are detected. Detected agents always take priority and are pre-selected regardless of the saved state.
Bypassing detection explicitly
If you already know which agents you want, pass-a one or more times. This skips detection and the interactive prompt entirely:
The --all flag
--all installs to every supported agent at once, completely bypassing both detection and the interactive prompt:
Detection in the programmatic API
You can run the same detection logic from your own tooling using the exported functions:AgentType strings (e.g. ["cursor", "claude-code"]) that you can pass directly to upsertServer or use for any other purpose in your own CLI integrations.