mcpsmgr
用于多个AI编码代理的统一MCP(模型上下文协议)服务器管理器——定义一次MCP服务器,从一个地方将其同步到Claude Code、Codex、Cursor、Gemini CLI、OpenCode和Antigravity。
快速开始
# Install one or many MCP servers from a GitHub repo
npx mcpsmgr add jtianling/cross-agent-teams-mcp -a claude-code -y
# Or interactively pick which agent to deploy to
npx mcpsmgr add anthropics/some-mcp-server就这样 mcpsmgr 获取回购 mcpsmgr.json manifest(或回退到README扫描),将服务器记录在您的中央存储库中 ~/.mcps-manager/servers/,并将正确的配置写入代理的本机文件(.claude.json, .codex/config.toml等等)。
需要将已安装的服务器部署到新项目中吗? cd 进入项目并运行 npx mcpsmgr deploy.
安装
npm install -g mcpsmgr # or pnpm add -g / yarn global add或者无需安装即可在任何地方运行:
npx mcpsmgr 向项目添加服务器(add)
mcpsmgr add 是主要的切入点。它接受三种输入形状:
mcpsmgr add my-server # already in central repo
mcpsmgr add owner/repo # GitHub shorthand
mcpsmgr add https://github.com/owner/repo # full GitHub URL
mcpsmgr add repo # repo basename (bundle reverse-lookup)解析器在存在匹配的中心条目或包时选择它,并仅在本地没有缓存任何内容时才返回到获取清单。这意味着重新运行 add owner/repo 首次安装后快速且离线安全。
实用标志
-a, --agent Target a specific agent without prompting
-y Unattended: auto-select detected agents, overwrite existing,
fail-fast on missing required vars/env (implies --force)
-f, --force Overwrite existing central entries without confirmation
--port Override manifest variables.port (manifest-driven flow)-y 是CI友好型开关:一个标志,没有提示。当缺少所需的变量或环境变量时,它将拒绝而不是默默地替换默认值——在重新运行之前显式设置这些变量。
将服务器安装到中央存储库中(install)
add 当它拉取远程清单时,写入中央存储库作为副作用。如果您只想注册服务器而不涉及任何项目,请使用 install:
mcpsmgr install owner/repo # GitHub source (manifest or README scan)
mcpsmgr install https://github.com/o/r
mcpsmgr install ./my-mcp.json # any agent's MCP JSON shape
mcpsmgr install ~/workspace/my-mcp-server # local project directory
mcpsmgr install # interactive manual flowGitHub资源也在更新 ~/.mcps-manager/bundles.json 稍后 add repo 调用可以解析回repo声明的每个服务器。
部署到代理(deploy)
cd your-project
mcpsmgr deploy # pick which central servers to deploy
mcpsmgr deploy --refresh # re-sync existing project entries from centraldeploy 自动检测项目已使用的代理(是否存在 .claude.json, .codex/等等),并且只写这些。 --refresh 在您调整中央存储库中的服务器定义并希望每个项目都接受更改后,这是正确的命令。
检查和拆卸
mcpsmgr list # central repository
mcpsmgr list --deployed # what's wired up in the current project
mcpsmgr remove # remove from the current project (per-agent prompt)
mcpsmgr uninstall # remove from the central repository
mcpsmgr update [name] # re-analyze sources and patch central definitionsremove 仅涉及项目代理配置。 uninstall 删除中心条目(并从它所属的任何包中删除它)。
支持的代理
| 代理 | 配置位置 | 格式 |
|---|---|---|
| 克劳德代码 | .claude.json (项目) | JSON |
| 食品法典委员会 | .codex/config.toml (项目) | TOML |
| 光标 | .cursor/mcp.json (项目) | JSON |
| Gemini CLI | .gemini/settings.json (全局) | JSON |
| OpenCode | .opencode.json (项目) | JSON |
| 反重力 | .antigravity/config.json (项目) | JSON |
Gotcha——全球代理商。 Gemini CLI是全局配置的,而不是按项目配置的。add和deploy在给它写信之前会发出警告;在说“是”之前,先查看差异。
GitHub捆绑包(反向查找)
当一个GitHub仓库通过以下方式声明多个MCP服务器时 mcpsmgr.json, mcpsmgr 将它们记录为一个 捆首次安装后,这些输入中的任何一个都会解析到同一组服务器,而不会返回网络:
mcpsmgr add jtianling/cross-agent-teams-mcp # owner/repo
mcpsmgr add https://github.com/jtianling/cross-agent-teams-mcp
mcpsmgr add cross-agent-teams-mcp # bare repo name捆包存放在 ~/.mcps-manager/bundles.json. install 在每次成功安装清单时更新捆绑包成员资格; uninstall 修剪成员,并在包变空时将其丢弃。
Gotcha——仓库名称冲突。 如果两个不同的GitHub所有者发布了具有相同基名的repo,而你已经安装了这两个库,mcpsmgr add将拒绝一份候选人名单。用以下方式消除分歧owner/repo.
许可证
麻省理工学院
