MCP Hub
MCP Hub — 一体化 MCP 服务器与连接器生态系统
自托管中心,将 MCP(模型上下文协议)连接器聚合到单个端点,供您的 AI 客户端使用——附带应用商店风格的 Web UI、一键安装、实时日志和健康监控。
Claude Desktop / Cursor ──Bearer key──▶ ┌─────────────────────┐
│ MCP Hub (:3000) │──▶ github (npx)
│ /mcp /api Web UI │──▶ postgres (npx)
Web browser ──session cookie──▶ └─────────┬───────────┘──▶ slack (npx) …
▼
PostgreSQL 16快速开始
A. 本地 / 普通 Docker
cp .env.example .env
# edit .env — set POSTGRES_PASSWORD (and optionally MASTER_ENCRYPTION_KEY / SESSION_SECRET)
docker compose up -d --buildB. Portainer(Web 编辑器)
Stacks → Add stack → Web editor 并粘贴
portainer-stack.yml。部署前添加环境变量
POSTGRES_PASSWORD(在 Environment variables 下)。部署——镜像从 Docker Hub 拉取(
xeniak10/mcp-hub:latest),无需构建。
打开 http://:3000 — 首次访问时会要求您创建管理员账户(引导)。然后:
前往 Marketplace,安装例如 GitHub,粘贴令牌 → 连接器的子进程在后台启动。
前往 Settings → 创建 API 密钥。
将您的 AI 客户端指向中心:
{
"mcpServers": {
"hub": {
"url": "http://localhost:3000/mcp",
"headers": { "Authorization": "Bearer mcp_YOUR_KEY" }
}
}
}所有连接器工具都以 github__create_issue、postgres__query 等命名空间形式出现。
Related MCP server: CbetaMCP
您将获得
Marketplace — 71 个内置连接器,适用于开发者(GitHub、GitLab、Postgres、Kubernetes、Sentry…)以及业务团队 — CRM(Salesforce、HubSpot、Pipedrive)、ERP/会计(Odoo、QuickBooks、Xero)、帮助台(Zendesk、Freshdesk、ServiceNow)、通信(Microsoft 365、Email IMAP/SMTP、Twilio、Slack、Teams files)、生产力(Google Sheets、Notion、Airtable)和可观测性(Dynatrace)。一键安装、基于 schema 的配置表单、通过中心容器内的
npx/uvx进行后台依赖启动。支持搜索、分类筛选和排序(官方优先 / 安装最多 / 名称)。社区连接器仓库 — 在 Marketplace(“Community repos”部分)粘贴公共 GitHub 仓库 URL,其中的每个有效连接器清单都会被获取、验证并合并到您的目录中(以
community:owner/repo/<id>命名空间,离线缓存在数据卷中)。仓库根目录的index.json显式列出文件;否则探测根级别的*.json文件。新条目在中心重启后出现。自定义连接器 — 将 JSON 清单放入
./connectors/(或connectors卷),重启后它就会出现在市场中。参见connectors/example.json.example。Dashboard — 实时状态徽章(运行中 / 启动中 / 错误 / 已停止)、统计磁贴、实例搜索、批量 Restart all / Stop all 并带确认。
Connector detail — 内联重命名实例、可视化配置编辑器、实时工具预览(通过运行进程的
tools/list)并支持点击复制工具名称、实时日志查看器(WebSocket 尾部)带级别/文本筛选、跟随模式和日志下载。浅色与深色主题 — 在侧边栏切换;按浏览器持久化。
键盘快捷键 —
/聚焦搜索 ·g d仪表盘 ·g m市场 ·g s设置 ·Esc关闭对话框/模糊搜索。PWA-ready — 可安装清单 + SVG 图标。
备份与恢复 — 一键导出所有已安装连接器及配置到 JSON 文件;导入可在全新实例上恢复(设置页面)。
账户管理 — 更改密码(注销所有其他设备)、列出活动会话(含 IP/用户代理)、撤销任意会话。
故障警报 — 设置
ERROR_WEBHOOK_URL,当连接器进入错误状态时,中心会 POST 一个 JSON 警报(适用于 Slack、Discord、Teams、通用接收器;每个连接器 5 分钟冷却)。看门狗 — 崩溃的进程以指数退避重启;每 30 秒健康 ping;启动恢复会恢复重启前启用的所有内容。
更新 — 设置页面显示当前版本,并每 6 小时检查 GitHub releases / Docker Hub tags(或点击 Check now)。当新版本发布时,您会获得一键复制适用于您部署类型的精确升级命令。
可选自动更新 — 使用
docker compose --profile autoupdate up -d启用 Watchtower 边车:它每小时拉取更新的xeniak10/mcp-hub镜像,并仅重建应用容器(它受标签限定,因此绝不会触碰您的数据库)。监控与运维 — 未认证的
GET /healthz用于正常运行时间探测;GET /api/meta报告版本 + git 提交(显示在设置页脚);/mcp上的 API 密钥流量限制为每个密钥每分钟 120 次请求。安全 — 静态配置使用 AES-256-GCM 加密,argon2id 密码,cookie 会话,哈希 API 密钥,登录速率限制,审计日志。
配置
变量 | 必需 | 描述 |
| ✅ | 捆绑的 PostgreSQL 的密码 |
| – |
|
| – | 空 = 每次启动随机(重启后用户会被注销) |
| – | 主机端口(默认 |
| – | 每个连接器的环形缓冲区大小(默认 5000) |
| – | 日志保留期限(默认 7) |
| – | 连接器进入错误状态时 POST JSON 警报的 URL |
卷:pgdata(数据库)、app-data(主密钥 + 状态)、npx-cache(连接器依赖缓存 — 保持重启快速)。
更新
中心无法替换自身容器,因此更新只需在主机上执行一行命令:
docker compose pull app && docker compose up -d --no-deps --force-recreate app(设置 → 更新会在有新版本时为您复制此命令。在 Portainer 上使用 Stack → Pull and redeploy。)想要完全自动化?
docker compose --profile autoupdate up -d这会在中心旁边启动 Watchtower;它每小时检查 Docker Hub,并在存在更新镜像时重建应用容器(--cleanup 移除旧镜像)。您的数据存储在卷中,因此更新无损。
开发
npm install
npm run dev # server (watch) + web (vite dev server on :5173, proxied /api + /mcp)
npm run typecheck # all workspaces
npm run build # shared → server → web技术栈:npm workspaces · Fastify 5 · @modelcontextprotocol/sdk · PostgreSQL 16 · Vite + React 18 + Tailwind CSS v4 + TanStack Query。
布局
packages/
shared/ types shared by server & web (manifests, API DTOs, WS events)
server/ Fastify app: auth, registry (connector manifests), ConnectorManager,
unified /mcp proxy, log pipeline, SQL migrations
web/ React SPA served statically by the server in production添加连接器
无需重建(推荐):将 connectors/example.json.example 复制到 connectors/<your-id>.json,填写清单(命令 argv 带 {env.NAME} 占位符 + JSON-schema 配置表单),然后重启中心。无效文件会在日志中跳过并显示警告;与内置冲突的自定义 id 会被忽略。
从 GitHub 仓库:Marketplace → Community repos → 粘贴 owner/repo(或完整的 github.com URL)。中心从仓库根目录获取 index.json(文件路径数组),或回退到根级别的 *.json 文件,根据与卷清单相同的 schema 验证每个文件,并将其缓存为 community:owner/repo/<id> id — 因此它们永远不会遮蔽内置项,并在首次获取后保持离线可用。在同一部分管理/移除仓库;更改在下次重启时生效。
内置:创建 packages/server/src/registry/connectors/<id>.ts,导出 ConnectorManifest,并在 src/registry/index.ts 中注册。重建后它会立即出现在市场中。
REST API 摘要
端点 | 认证 | 描述 |
| – | 存活探针(仅数据库 ping,无详细信息) |
| –/session | 首次运行账户、登录/注销 |
| session | 运行构建的 |
| session | 更改密码;撤销所有其他会话 |
| session | 列出/撤销活动会话 |
| session | 目录条目及安装计数 |
| session | 管理社区连接器仓库 |
| session | 安装 / 重命名 / 卸载 |
| session | 保存加密配置 |
| session | 生命周期 |
| session | 批量操作 |
| session | 来自运行进程的实时工具列表 |
| session | 日志尾部 |
| session | API 密钥管理 |
| session | 配置导出/导入 |
| Bearer key or session | 统一 MCP 端点(每个密钥 120 次请求/分钟) |
所有变更端点都会写入审计日志。
备注
连接器作为中心容器内的子进程运行(
npx -y pkg@version或uvx)。未挂载 docker socket。基于 Python 的连接器需要uvx— 它已安装到运行时镜像中。MCP 端点是无状态 Streamable HTTP(
/mcp)— 任何 HTTP MCP 客户端均可使用。资源通过
connector://<slug>/<original-uri>暴露。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityCmaintenanceThis server facilitates the invocation of AI models from providers like Anthropic, OpenAI, and Groq, enabling users to manage and configure large language model interactions seamlessly.213MIT
- AlicenseNot gradedqualityDmaintenanceA modular, extensible FastAPI-based platform that aggregates multiple AI tools and microservices into a unified interface with standardized I/O formats, perfect for frontend integration or LLM system orchestration.4MIT
- -licenseNot gradedqualityNot gradedmaintenanceIntelligent routing service that selects optimal AI models based on capability requirements and normalizes input/output formats across multiple providers like OpenAI, Anthropic, Google, and others.
- FlicenseNot gradedqualityDmaintenanceA unified local API gateway providing caching, rate limiting, and full Model Context Protocol compatibility for AI agent integration. It enables users to aggregate multiple API endpoints into a single gateway with built-in observability and customizable eviction strategies.
Related MCP Connectors
Universal AI API Orchestrator — 1,554 tools, 96 services. One install.
Connect MCP clients to 2,000+ AI models without managing provider API keys.
Enterprise AI Control Plane: governance, guardrails, spend tracking, compliance & smart routing.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/xeniak123/mcp-hub'
If you have feedback or need assistance with the MCP directory API, please join our Discord server