Introduction
add-mcp adds MCP servers to your favorite coding agents with a single command.
add-mcp is an open-source CLI (and TypeScript SDK) that installs Model Context Protocol servers into the config files of your coding agents — Claude Code, Codex, Cursor, OpenCode, VS Code, and 10 more — with a single command.
npx add-mcp https://mcp.context7.com/mcp
One command handles the whole flow: it detects which agents you use, asks which ones to install to (or takes flags for non-interactive use), and writes the right config shape to each agent’s own file format — JSON, YAML, or TOML.
What it does
- Install remote or local servers — by URL (streamable HTTP or SSE), npm package, or arbitrary command.
- Find servers — search the add-mcp registry right from the terminal with
add-mcp findand install a match interactively. - Manage installs —
list,remove, andsyncserver configs across all your agents. - Programmatic use — the
add-mcpnpm package exposes an SDK so your own CLI or tool can install MCP servers for its users.
Why not configure agents by hand?
Every agent stores MCP servers in a different file, format, and shape: Cursor uses .cursor/mcp.json, Codex uses TOML at .codex/config.toml, Goose uses YAML, Claude Code splits project and global configs. Fields like timeouts, OAuth scopes, and tool auto-approval differ per client — some don’t support them at all. add-mcp keeps one canonical server definition and maps it into each client’s native schema, dropping unsupported fields with a warning instead of writing broken config.
Next steps
- Quickstart — install your first MCP server.
- CLI reference — every command and flag.
- SDK — programmatic use from your own tools.
- Registry — find servers and host your own registry.