将 20+ 个 MCP 服务器整合到一个端点
何时使用: 你的 claude_desktop_config.json 有 20+ 条记录,添加/移除服务器非常繁琐。
前置条件
- 1mcp 已安装 — npx -y @1mcp/agent(或按文档永久安装)
步骤
-
将现有服务器迁移到 1mcp 配置Use onemcp-agent. Convert my current MCP client config into a 1mcp config file with each server prefixed by its name.✓ 已复制→ 1mcp.config.json 含所有服务器及前缀
-
将客户端指向 1mcpReplace my client's MCP config with a single entry pointing at 1mcp; keep a backup.✓ 已复制→ 客户端现在只看到一个服务器;工具以前缀形式列出
-
热添加新服务器Add the new arxiv MCP to 1mcp config and reload — without restarting Claude Desktop.✓ 已复制→ 下一次 list_tools 刷新时新工具出现
结果: 所有 MCP 服务器的单一可信来源;迭代更快。
注意事项
- 带前缀的工具名称变得很长 — 为每个服务器使用简短的前缀别名(gh、fs、pg),而非全名