Add MCP servers to your coding agents with a single command.
One CLI that writes the right config file, format, and fields for every agent.
npx add-mcp https://mcp.context7.com/mcpWorks with every major coding agent
add-mcp installs any MCP server into Claude Code, Codex, Cursor, OpenCode, VS Code, and 10 more coding agents from the same command.
One command, every agent
Detects the agents in your project or machine, and writes the right config shape to each one — JSON, YAML, or TOML.
Find servers from the terminal
add-mcp find searches the registry and installs a match, prompting for required env vars and headers along the way.
A TypeScript SDK
Building your own CLI? upsertServer() gives your tool the same battle-tested install flow, agents and formats included.
Capability-gated configs
Timeouts, OAuth scopes, and tool auto-approval are mapped to each client's native mechanism — and dropped with a warning where unsupported.
List, remove, sync
Inspect installed servers across agents, remove them everywhere, or unify names and configs with a single sync.
Free and open source
Apache-2.0 licensed, no accounts, no telemetry surprises. A registry you can self-host and a config format you own.
In your own tool, too
The same package is a TypeScript SDK — detect a user's agents and install your MCP server for them in a few lines.
import { upsertServer } from "add-mcp";
upsertServer(
"cursor",
"context7",
{ type: "http", url: "https://mcp.context7.com/mcp" },
{ local: true },
);Read the SDK docs