← 全部工具

add-mcp

AI Agent
热度 65 更新于 AI 与 Agent

Add MCP servers to your favorite coding agents with a single command.

npmauto-collected

安装

npm
npm install -g add-mcp

通过 npm 安装。

add-mcp

Add MCP servers to your favorite coding agents with a single command.

Supports Claude Code, Codex, Cursor, OpenCode, VS Code, Grok Build and 10 more.

Docs and registry: add-mcp.com

Install an MCP Server

Install an MCP server by remote URL or package name:

npx add-mcp url | package name [options]

Example installing the Context7 remote MCP server:

npx add-mcp https://mcp.context7.com/mcp

Example installing the Context7 remote MCP server via the programmatic API — great for integrating add-mcp in your own CLI tool:

import { upsertServer } from "add-mcp";

const result = upsertServer(
  "cursor",
  "context7",
  { type: "http", url: "https://mcp.context7.com/mcp" },
  { local: true },
);
console.log(result);

You can add env variables and arguments (stdio) and headers (remote) to the server config using the --env, --args and --header options. With ${VAR} placeholders, interactive installs prompt for each variable (omit skipped optional keys so empty strings are not written to config).

Find MCP Servers

Find and install MCP servers from the add-mcp registry:

npx add-mcp find vercel

The first find/search run automatically saves the add-mcp registry to ~/.config/add-mcp/config.json (or $XDGCONFIGHOME/add-mcp/config.json). You can edit that file to replace the default registry, add the official Anthropic registry, or point at any registry-compatible server.

Supported Agents

MCP servers can be installed to any of these agents: