add-mcp to install MCP servers.
General Questions
What are MCP servers?
What are MCP servers?
- Tools: Functions the agent can call (e.g., database queries, API calls)
- Resources: Data sources the agent can access (e.g., file systems, documentation)
- Context: Additional information to improve agent responses
- Integrate with external services (Notion, Linear, GitHub, Slack)
- Connect to databases (PostgreSQL, MySQL, MongoDB)
- Provide file system access in a controlled way
- Offer specialized tools for your workflow
- Query your production database while coding
- Search and update Notion pages from your editor
- Fetch GitHub issues and create pull requests
- Access company-specific tools and APIs
What coding agents does add-mcp support?
What coding agents does add-mcp support?
add-mcp supports 10 popular coding agents:| Agent | Project Support | Global Support |
|---|---|---|
| Claude Code | ✓ | ✓ |
| Claude Desktop | - | ✓ |
| Codex | ✓ | ✓ |
| Cursor | ✓ | ✓ |
| Gemini CLI | ✓ | ✓ |
| Goose | - | ✓ |
| GitHub Copilot CLI | ✓ | ✓ |
| OpenCode | ✓ | ✓ |
| VS Code | ✓ | ✓ |
| Zed | ✓ | ✓ |
gemini→gemini-cligithub-copilot→vscode
How does add-mcp detect which agents I have installed?
How does add-mcp detect which agents I have installed?
add-mcp uses smart detection based on your installation scope:Project mode (default):- Looks for project-level config directories in current directory:
.cursor/for Cursor.vscode/for VS Code.mcp.jsonor.claude/for Claude Codeopencode.jsonor.opencode/for OpenCode.codex/for Codex.gemini/for Gemini CLI.zed/for Zed
- Automatically selects detected agents by default
-g flag):- Checks for agent installations in your home directory:
~/.cursor/for Cursor~/.config/opencode/for OpenCode~/.claude/for Claude Code~/Library/Application Support/Claude/for Claude Desktop~/.codex/for Codex- And more…
- Selects all detected global agents by default
- Interactive mode: Prompts you to select from all available agents
- With
--yesflag: Installs to all project-capable agents (project mode) or all agents (global mode)
-a or --all flags.Installation Scope
When should I use project vs global scope?
When should I use project vs global scope?
- Project-specific servers (e.g., your app’s database)
- Servers your team should also have
- Committed to version control
- Configuration that varies by project
.cursor/mcp.json, .vscode/mcp.json, etc.Global scope (with
-g flag):- Personal servers used across all projects
- Tools you always want available
- Not committed to version control
- Global utilities (weather, calculator, etc.)
~/.cursor/mcp.json, ~/.config/opencode/opencode.json, etc.Pro tip: You can use both! Install project-specific servers locally and personal utilities globally.
Should I commit MCP config files to git?
Should I commit MCP config files to git?
.cursor/mcp.json, etc.):- YES, commit them if the server is needed by your team
- NO, add to
.gitignoreif they contain:- Personal API keys or tokens
- Local-only server configurations
- Machine-specific paths
--gitignore flag to automatically add config files to .gitignore:~/.cursor/mcp.json, etc.):- Never committed (they’re in your home directory)
- Personal to your machine
- Commit project configs with placeholder values
- Document required environment variables
- Use
.gitignorefor configs with secrets
Server Management
Can I install an MCP server to multiple agents at once?
Can I install an MCP server to multiple agents at once?
--all flag:-a flag:How do I update an MCP server to a new version?
How do I update an MCP server to a new version?
add-mcp again with the same server name:add-mcpoverwrites the existing server configuration- The server name remains the same
- New version will be used next time agent loads
What happens if a server name already exists?
What happens if a server name already exists?
-
Use different names:
-
Check existing config first:
-
Back up before installing:
How do I remove an MCP server?
How do I remove an MCP server?
add-mcp currently does not have a built-in remove/uninstall command.To remove a server, manually edit the config file:-
Locate the config file:
-
Open in editor:
-
Remove the server entry:
- Save and restart your agent
Transport Types
Which transport type should I use?
Which transport type should I use?
| Transport | When to Use | Flag |
|---|---|---|
| HTTP (default) | Most modern remote servers | --transport http (or omit) |
| SSE | Legacy servers, explicit requirement | --transport sse |
For local npm packages/commands:
- stdio transport is always used automatically
- No need to specify transport type
Agent compatibility:
- Most agents support all transport types
- Exception: Claude Desktop only supports stdio via config file
- Use Settings → Connectors in the app for remote servers
Aliases:
--typeis an alias for--transport- Both flags work identically
What's the difference between HTTP and SSE transport?
What's the difference between HTTP and SSE transport?
- Modern, recommended transport
- Uses standard HTTP with streaming responses
- Better error handling and connection management
- Supported by all agents (except Claude Desktop config)
- Default in
add-mcp
- Legacy transport type
- Deprecated by MCP specification but still widely used
- One-way streaming from server to client
- Supported by all agents (except Claude Desktop config)
- Use only if server explicitly requires it
- For local processes only
- Used automatically for npm packages and commands
- Most secure (no network exposure)
- Supported by all agents
- HTTP and SSE have similar performance for most use cases
- stdio is fastest (no network overhead)
- Choose based on server requirements, not performance
Advanced Usage
Can I use custom HTTP headers for authentication?
Can I use custom HTTP headers for authentication?
--header flag for remote servers:- Format:
"Key: Value"(colon with space) - Must be quoted if it contains spaces or special characters
- Can be repeated for multiple headers
- Headers are written to config file
- Agent sends headers with each MCP request
- Works with both HTTP and SSE transports
How do I install with custom server names?
How do I install with custom server names?
--name flag to specify a custom server name:-
Multiple instances of same server:
-
Descriptive names for your team:
-
Avoid name conflicts:
- Can contain letters, numbers, hyphens, underscores
- Should be unique within each agent’s config
- Will overwrite existing server with same name
Can I skip all confirmation prompts?
Can I skip all confirmation prompts?
-y or --yes flag:- Agent selection (uses detected agents or all agents)
- Installation scope confirmation
- Final installation confirmation
--yes:- Smart detection still runs
- Uses detected agents automatically
- If no agents detected:
- Project mode: Installs to all project-capable agents
- Global mode: Installs to all agents
- Automated setup scripts
- CI/CD pipelines
- Batch installations
- When you know exactly what you want
Troubleshooting
Where can I find help if something goes wrong?
Where can I find help if something goes wrong?
- Check the Troubleshooting guide:
- See Troubleshooting page for common issues
- Search existing issues:
- Create a new issue with:
- Operating system and version
- Exact command you ran
- Complete error message
- Output of
npx add-mcp list-agents - Agent name and version
- Relevant config files (remove sensitive data)
- Check agent-specific documentation:
- Some agents have specific MCP requirements
- Consult your agent’s docs for MCP configuration
- Verify the MCP server itself:
- Test if the server works independently
- Check server documentation for requirements