MCP服务器编排工具

MCP Orchestrator是一款支持自托管的多MCP服务器管理工具,通过Cloudflare隧道提供安全远程访问,适用于需要集中管理文件系统、GitHub集成等MCP服务的开发者。

  • by aaelfe
  • TypeScript
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 aaelfe/mcp-orchestrator

使用说明

🚀 MCP编排器 具有安全远程访问的模型上下文协议(MCP)服务器的轻松自托管。 MCP Orchestrator允许您在一个地方部署和管理多个MCP服务器,可通过Cloudflare隧道远程访问。非常适合希望在任何地方使用MCP工具(如文件系统访问、GitHub集成等)的开发人员。 ✨ 特性

🐳 基于Docker的部署-一个命令即可运行所有内容 🔒 安全的远程访问-Cloudflare隧道零网络配置 🔧 简单的MCP管理-使用简单的CLI启用/禁用服务 📦 预配置的MCP-文件系统、GitHub、Slack、Notion等 🌐 Web终端-基于浏览器的终端访问(可选) 💻 客户端就绪-适用于Cursor、Claude Desktop和其他MCP客户端

🚀 快速开始 先决条件

Docker和Docker Compose Node.js和npm(用于MCP服务器包) jq(JSON处理器) Cloudflare帐户(免费版有效) 域名(或使用Cloudflare的免费子域)

  1. 克隆和设置 bashgit克隆https://github.com/yourusername/mcp-orchestrator.git cd-mcp编排器

复制环境模板

cp.env.example.env

使CLI可执行

chmod+x脚本/mcp 2.添加MCP服务器 bash#添加一些示例服务器 ./scripts/mcp初始化

或手动添加服务器

./scripts/mcp添加github npx@modelcontextprotocol/server github ./scripts/mcp添加文件系统npx@modelcontextprotocol/服务器文件系统/工作区 3.配置Cloudflare隧道 bash#安装cloudflared命令行界面

macOS:brew安装cloudflare/cloudflare/cloud flare

Linux:请参阅https://github.com/cloudflare/cloudflared

创建隧道

cloudflared隧道创建mcp编排器

配置DNS(替换为您的域)

cloudflared隧道路由dns mcp编排器mcp.yourdomain.com

从Cloudflare仪表板获取隧道令牌并添加到.env:

TUNNEL_TOKEN=您的TUNNEL_TOKEN_here

  1. 启动您的MCP中心 猛击。/脚本/mcp启动 您的MCP集线器现在正在运行https://mcp.yourdomain.com! 🎮 用法 管理MCP服务 bash#列出已配置的服务 ./scripts/mcp列表

添加MCP服务

./scripts/mcp添加github npx@modelcontextprotocol/server github ./scripts/mcp添加松弛npx@modelcontextprotocol/server松弛 ./scripts/mcp添加postgres npx@modelcontextprotocol/server postgres

应用更改

./scripts/mcp重新启动 配置API令牌 将所需的令牌添加到.env文件中: bash#GitHub(从获取https://github.com/settings/tokens) GITHUB_TOKEN=ghp_ xxxxxxxxxxxx

Slack(从获取https://api.slack.com/apps)

SLACK_TOKEN=xoxb-xxxxxxxxxxxxx

通知(来源https://www.notion.so/my-integrations)

注:TOKEN=机密 监控服务 bash#检查状态 ./scripts/mcp状态

查看日志

./scripts/mcp日志

查看特定服务日志

./scripts/mcp日志github mcp 🔌 客户端集成 光标配置 添加到您的.cursor/mcp.json中: json{ “mcpServers”:{ “我的mcp中心”:{ “运输”:“sse”, “url”:“https://mcp.yourdomain.com/mcp/" } } } Claude桌面配置 添加到您的Claude Desktop配置中: json{ “mcpServers”:{ “我的mcp中心”:{ “运输”:“sse”, “url”:“https://mcp.yourdomain.com/mcp/" } } } 📦 MCP服务器配置 MCP Orchestrator使用与Claude Desktop和Cursor相同的配置格式。编辑mcp-config.json: json{ “mcpServers”:{ “文件系统”:{ “命令”:“npx”, “args”:[“@modelcontextprotocol/server文件系统”,“/workspace”] }, “github”:{ “命令”:“npx”, “args”:[“@modelcontextprotocol/server github”], “env”:{ “GITHUB_TOKEN”:“ghp_your_TOKEN_here” } }, “Postgres”:{ “命令”:“npx”, “args”:[“@modelcontextprotocol/server-postgres”], “env”:{ “POST RES_CONNECION_STRING”:“postgresql://user:pass@主机/db” } } } } 流行的MCP服务器 将这些添加到您的配置中: bash#文件系统访问 ./scripts/mcp添加文件系统npx@modelcontextprotocol/服务器文件系统/工作区

GitHub集成

./scripts/mcp添加github npx@modelcontextprotocol/server github

PostgreSQL数据库

./scripts/mcp添加postgres npx@modelcontextprotocol/server postgres

勇敢的搜索

./scripts/mcp添加搜索npx@modelcontextprotocol/server勇敢搜索

Slack集成

./scripts/mcp添加松弛npx@modelcontextprotocol/server松弛 🛠 CLI命令 猛击。/scripts/mcp列表#列出已配置的mcp服务器 ./scripts/mcp添加 [args]#添加MCP服务器 ./scripts/mcp删除 #删除MCP服务器
./scripts/mcp配置#显示当前配置 ./scripts/mcp init#添加示例服务器 ./scripts/mcp start#启动所有服务 ./scripts/mcp stop#停止所有服务
./scripts/mcp restart#重新启动所有服务 ./scripts/mcp状态#显示服务状态 ./scripts/mcp-logs[service]#显示日志 ./scripts/mcp设置隧道#隧道设置帮助 🔧 高级配置 添加自定义MCP 您可以添加任何遵循标准协议的MCP服务器: bash#使用CLI添加 ./scripts/mcp添加我的服务器npx我的自定义mcp包

或者直接编辑mcp-config.json

{ “mcpServers”:{ “我的服务器”:{ “command”:“python”, “args”:[“/path/to/my-mcp-server.py”], “env”:{ “API_KEY”:“your_API_KEY” } } } } 地方发展 对于没有Cloudflare隧道的本地测试: bash#在docker-compose.yml中注释出隧道服务

直接访问http://localhost

docker组成-up-d 🐛 故障排除 隧道问题 bash#检查隧道状态 ./scripts/mcp日志隧道

验证隧道令牌

echo$TUNNEL_TOKEN

测试本地连接

卷曲http://localhost/health MCP连接问题 bash#检查MCP服务器日志 ./scripts/mcp记录文件系统mcp

验证nginx路由

./scripts/mcp日志代理

测试MCP端点

卷曲https://mcp.yourdomain.com/mcp/ 环境变量 bash#检查加载环境 ./scripts/mcp状态

验证.env文件

猫.环境 🤝 贡献

分叉存储库 创建要素分支 将您的MCP服务器添加到MCP-register.yml 测试集成 提交拉取请求

📄 许可证 MIT许可证-有关详细信息,请参阅许可证文件。 🔗 链接

模型上下文协议 Cloudflare隧道 Docker Compose

需要帮助?打开一个问题或加入我们的社区讨论!