开源MCP工具:npx add-mcp 是 AI Skill Hub 本期精选MCP工具之一。综合评分 7.5 分,整体质量较高。我们推荐使用将其纳入你的 AI 工具库,帮助提升工作效率。
开源MCP工具:npx add-mcp 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
开源MCP工具:npx add-mcp 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/neon-solutions/add-mcp
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"--mcp---npx-add-mcp": {
"command": "npx",
"args": ["-y", "add-mcp"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 开源MCP工具:npx add-mcp 执行以下任务... Claude: [自动调用 开源MCP工具:npx add-mcp MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"__mcp___npx_add-mcp": {
"command": "npx",
"args": ["-y", "add-mcp"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
Add MCP servers to your favorite coding agents with a single command.
Supports Claude Code, Codex, Cursor, OpenCode, VSCode and 9 more.
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
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).
| Scope | Flag | Location | Use Case |
|---|---|---|---|
| **Project** | (default) | .cursor/mcp.json etc. | Committed with your project, shared with team |
| **Global** | -g | ~/.cursor/mcp.json | Available across all projects |
npx add-mcp https://mcp.example.com/mcp -y
npx add-mcp https://mcp.example.com/mcp -g -a claude-code -y
npx add-mcp https://mcp.example.com/mcp -a cursor -a claude-code
npx add-mcp @modelcontextprotocol/server-postgres --name postgres
npx add-mcp mcp-server-github --all
npx add-mcp mcp-server-github --all -g -y
npx add-mcp find neon -a claude-code -g -y
npx add-mcp find github --all --gitignore ```
```bash
```bash
npx add-mcp @modelcontextprotocol/server-filesystem --env "API_KEY=secret" --env "DATABASE_URL=postgres://localhost/app"
npx add-mcp https://mcp.example.com/mcp -a cursor -y --gitignore ```
| Option | Description |
|---|---|
-g, --global | Install to user directory instead of project |
-a, --agent <agent> | Target specific agents (e.g., cursor, claude-code). Can be repeated. |
-t, --transport <type> | Transport type for remote servers: http (default), sse |
--type <type> | Alias for --transport |
--header <header> | HTTP header for remote servers (repeatable, Key: Value) |
--env <env> | Env var for local stdio servers (repeatable, KEY=VALUE) |
-n, --name <name> | Server name (auto-inferred if not provided) |
-y, --yes | Skip all confirmation prompts |
--all | Install to all agents |
--gitignore | Add generated config files to .gitignore |
| Option | Description |
|---|---|
-g, --global | Install to user directory instead of project |
-a, --agent <agent> | Target specific agents (e.g., cursor, claude-code). Can be repeated. |
-n, --name <name> | Server name override (defaults to the selected catalog entry name) |
-y, --yes | Skip confirmation prompts |
--all | Install to all agents |
--gitignore | Add generated config files to .gitignore |
Transport for find/search is inferred from registry metadata. The CLI prefers HTTP remotes when available and only falls back to SSE when HTTP is not available for the selected install context.
When a server offers both remote and stdio package options, interactive mode lets you choose one (remote is the default). With -y, it auto-selects remote.
If a selected remote server defines URL variables or header inputs:
-y, placeholders are inserted (for example <your-header-value-here>)The first time you run find or search, the CLI prompts you to choose which registries to enable. Your selection is saved to ~/.config/add-mcp/config.json (respects XDG_CONFIG_HOME) and reused on every subsequent search.
If you run with -y before this one-time registry setup is completed, the CLI exits with guidance to rerun without --yes.
npx add-mcp list -g
npx add-mcp remove neon -g -a cursor -y ```
| Option | Description |
|---|---|
-g, --global | Remove from global configs |
-a, --agent <agent> | Filter to specific agent(s) |
-y, --yes | Remove all matches without prompting |
npx add-mcp sync
npx add-mcp sync -g -y ```
| Option | Description |
|---|---|
-g, --global | Sync global configs instead of project |
-y, --yes | Skip confirmation prompts |
unify is an alias for sync.
import {
detectProjectAgents,
detectGlobalAgents,
upsertServer,
removeServer,
listInstalledServers,
} from "add-mcp";
const project = detectProjectAgents("/path/to/project");
const global = await detectGlobalAgents();
// Remote server
upsertServer(
"claude-code",
"example",
{ type: "http", url: "https://mcp.example.com/api" },
{ local: true, cwd: "/path/to/project" },
);
// Stdio (npm package)
upsertServer("claude-code", "postgres", {
command: "npx",
args: ["-y", "@modelcontextprotocol/server-postgres"],
});
const projectServers = await listInstalledServers({
cwd: "/path/to/project",
});
const globalServers = await listInstalledServers({ global: true });
removeServer("claude-code", "example", {
local: true,
cwd: "/path/to/project",
});
upsertServer and removeServer return { success, path, error? } rather than throwing.
npx add-mcp @modelcontextprotocol/server-postgres
该项目使用 TypeScript 开发,提供了一个易于使用的 MCP 配置工具,适合需要 MCP 配置的项目,但需要进一步优化和完善。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。
经综合评估,开源MCP工具:npx add-mcp 在MCP工具赛道中表现稳健,质量良好。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | add-mcp |
| Topics | mcptypescript |
| GitHub | https://github.com/neon-solutions/add-mcp |
| License | Apache-2.0 |
| 语言 | TypeScript |
收录时间:2026-05-23 · 更新时间:2026-05-23 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端