
neon-solutions/add-mcp 是从 https://github.com/neon-solutions/add-mcp. 导入的 MCP 服务器候选
概览
neon-solutions/add-mcp 是从 https://github.com/neon-solutions/add-mcp. 导入的 MCP 服务器候选
概述(AI 翻译)
只需一个命令,就能将MCP服务器添加到你最喜欢的编码代理中。
支持Claude代码、Codex、Cursor、OpenCode、VS Code、Grok Build以及其他16个。
文档和登记册:add-mcp.com
安装MCP服务器
通过远程URL或包名安装MCP服务器:
安装 Context7 远程 MCP 服务器示例:
例如通过程序化API安装Context7远程MCP服务器——非常适合将add-mcp集成到你的CLI工具中:
你可以通过 --env、--args 和 --header 选项,向服务器配置添加 env 变量和参数(stdio)以及头部(远程)。使用 ${VAR} 占位符时,交互式安装提示针对每个变量(省略跳过的可选键,以免空字符串写入配置)。
查找MCP服务器
从 add-mcp 注册表中查找并安装 MCP 服务器:
第一次运行 find/[search 会自动将 add-mcp 注册表保存到 ~/.config/add-mcp/config.json(或 $XDG_CONFIG_HOME/add-mcp/config.json)。你可以编辑该文件替换默认注册表,添加官方 Anthropic 注册表,或指向任何兼容注册表的服务器。
支持的特工
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
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 19 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 $XDG_CONFIG_HOME/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:
| Agent | --agent |
Project Path | Global Path |
|---|---|---|---|
| Antigravity | antigravity |
- | ~/.gemini/config/mcp_config.json (shared by Antigravity, Antigravity IDE, and Antigravity CLI) |
| Cline VSCode Extension | cline |
- | ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json |
| Cline CLI | cline-cli |
- | ~/.cline/data/settings/cline_mcp_settings.json |
安装
npx add-mcp url | package name [options]