diff --git a/apps/mcphub/1.0.5/data.yml b/apps/mcphub/1.0.5/data.yml new file mode 100644 index 0000000..f6f66bc --- /dev/null +++ b/apps/mcphub/1.0.5/data.yml @@ -0,0 +1,58 @@ +additionalProperties: + formFields: + - default: 3000 + envKey: PANEL_APP_PORT_HTTP + labelEn: Web Port + labelZh: Web 端口 + required: true + rule: paramPort + type: number + edit: true + label: + en: Web Port + zh: Web 端口 + - default: "" + envKey: ADMIN_PASSWORD + labelEn: Admin Password + labelZh: 管理员密码 + required: false + rule: paramComplexity + type: password + edit: true + label: + en: Admin Password + zh: 管理员密码 + - default: mcphub_db + envKey: POSTGRES_DB + labelEn: Database + labelZh: 数据库名 + required: true + rule: paramCommon + type: text + edit: true + label: + en: Database + zh: 数据库名 + - default: mcphub_user + envKey: POSTGRES_USER + labelEn: Database User + labelZh: 数据库用户 + required: true + rule: paramCommon + type: text + edit: true + label: + en: Database User + zh: 数据库用户 + - default: "" + envKey: POSTGRES_PASSWORD + labelEn: Database Password + labelZh: 数据库密码 + random: true + required: true + rule: paramComplexity + type: password + edit: true + label: + en: Database Password + zh: 数据库密码 diff --git a/apps/mcphub/1.0.5/data/.gitkeep b/apps/mcphub/1.0.5/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/apps/mcphub/1.0.5/docker-compose.yml b/apps/mcphub/1.0.5/docker-compose.yml new file mode 100644 index 0000000..35ba59a --- /dev/null +++ b/apps/mcphub/1.0.5/docker-compose.yml @@ -0,0 +1,49 @@ +services: + mcphub: + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + ports: + - "${PANEL_APP_PORT_HTTP}:3000" + volumes: + - ./data:/app/data + environment: + - TZ=Asia/Shanghai + - PORT=3000 + - NODE_ENV=production + - TRUST_PROXY=1 + - ADMIN_PASSWORD=${ADMIN_PASSWORD} + - DB_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB} + depends_on: + postgres: + condition: service_healthy + image: samanhappy/mcphub:1.0.5 + labels: + createdBy: "Apps" + + postgres: + image: pgvector/pgvector:pg17 + container_name: ${CONTAINER_NAME}-pg + restart: always + networks: + - 1panel-network + environment: + - POSTGRES_DB=${POSTGRES_DB} + - POSTGRES_USER=${POSTGRES_USER} + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + - TZ=Asia/Shanghai + volumes: + - ./data/postgres:/var/lib/postgresql/data + healthcheck: + test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"] + interval: 10s + timeout: 5s + retries: 5 + start_period: 30s + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/mcphub/README.md b/apps/mcphub/README.md new file mode 100644 index 0000000..4983c5f --- /dev/null +++ b/apps/mcphub/README.md @@ -0,0 +1,64 @@ +# MCPHub + +MCPHub 通过将多个 MCP(Model Context Protocol)服务器组织为灵活的流式 HTTP(SSE)端点,简化了管理与扩展工作。系统支持按需访问全部服务器、单个服务器或按场景分组的服务器集合。 + +## 功能特点 + +- **集中式管理** - 在统一控制台中监控和管理所有 MCP 服务器 +- **灵活路由** - 通过 HTTP/SSE 访问所有服务器、特定分组或单个服务器 +- **细粒度分组可见性** - 在分组中可独立控制每个服务器的 Tool、Prompt 与 Resource 是否对外暴露 +- **智能路由** - 基于向量语义搜索的 AI 工具发现 +- **热插拔配置** - 无需停机即可添加、移除或更新服务器 +- **OAuth 2.0 支持** - 客户端和服务端模式,实现安全认证 +- **社交一键登录** - 通过 Better Auth 集成支持 GitHub 和 Google 快捷登录(需启用数据库模式) +- **数据库模式** - 将配置存储在 PostgreSQL 中,适用于生产环境 + +## 使用说明 + +### 默认端口 + +- Web界面: 3000 + +### 默认账号密码 + +- 用户名: admin +- 密码: 首次启动时自动生成,可在日志中查看,或通过环境变量 `ADMIN_PASSWORD` 预设 + +### 数据目录 + +应用数据存储在 `./data` 目录。 + +### MCP 配置 + +将 MCP 服务器配置文件 `mcp_settings.json` 放置在数据目录中,或通过 1Panel 文件管理器编辑。 + +示例配置: +```json +{ + "mcpServers": { + "time": { + "command": "npx", + "args": ["-y", "time-mcp"] + }, + "fetch": { + "command": "uvx", + "args": ["mcp-server-fetch"] + } + } +} +``` + +### 连接 AI 客户端 + +通过以下地址连接 AI 客户端(Claude Desktop、Cursor 等): + +- `http://localhost:3000/mcp` - 所有服务器 +- `http://localhost:3000/mcp/{group}` - 特定分组 +- `http://localhost:3000/mcp/{server}` - 特定服务器 +- `http://localhost:3000/mcp/$smart` - 智能路由 + +## 相关链接 + +- 官方网站: https://docs.mcphub.app +- GitHub: https://github.com/samanhappy/mcphub +- 文档: https://docs.mcphub.app diff --git a/apps/mcphub/data.yml b/apps/mcphub/data.yml new file mode 100644 index 0000000..0f93209 --- /dev/null +++ b/apps/mcphub/data.yml @@ -0,0 +1,28 @@ +name: MCPHub +tags: + - 开发工具 + - AI工具 +title: MCP 服务器统一管理中心 +description: MCP 服务器统一管理中心,支持集中管理、灵活路由和智能发现 +additionalProperties: + key: mcphub + name: MCPHub + tags: + - DevTool + - AI + shortDescZh: MCP 服务器统一管理中心 + shortDescEn: Unified Hub for Model Context Protocol (MCP) Servers + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://docs.mcphub.app + github: https://github.com/samanhappy/mcphub + document: https://docs.mcphub.app + architectures: + - amd64 + - arm64 + description: + en: MCPHub makes it easy to manage and scale multiple MCP servers by organizing them into flexible Streamable HTTP endpoints + zh: MCP 服务器统一管理中心,支持集中管理、灵活路由和智能发现 + memoryRequired: 1024 diff --git a/apps/mcphub/latest/data.yml b/apps/mcphub/latest/data.yml new file mode 100644 index 0000000..f6f66bc --- /dev/null +++ b/apps/mcphub/latest/data.yml @@ -0,0 +1,58 @@ +additionalProperties: + formFields: + - default: 3000 + envKey: PANEL_APP_PORT_HTTP + labelEn: Web Port + labelZh: Web 端口 + required: true + rule: paramPort + type: number + edit: true + label: + en: Web Port + zh: Web 端口 + - default: "" + envKey: ADMIN_PASSWORD + labelEn: Admin Password + labelZh: 管理员密码 + required: false + rule: paramComplexity + type: password + edit: true + label: + en: Admin Password + zh: 管理员密码 + - default: mcphub_db + envKey: POSTGRES_DB + labelEn: Database + labelZh: 数据库名 + required: true + rule: paramCommon + type: text + edit: true + label: + en: Database + zh: 数据库名 + - default: mcphub_user + envKey: POSTGRES_USER + labelEn: Database User + labelZh: 数据库用户 + required: true + rule: paramCommon + type: text + edit: true + label: + en: Database User + zh: 数据库用户 + - default: "" + envKey: POSTGRES_PASSWORD + labelEn: Database Password + labelZh: 数据库密码 + random: true + required: true + rule: paramComplexity + type: password + edit: true + label: + en: Database Password + zh: 数据库密码 diff --git a/apps/mcphub/latest/data/.gitkeep b/apps/mcphub/latest/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/apps/mcphub/latest/docker-compose.yml b/apps/mcphub/latest/docker-compose.yml new file mode 100644 index 0000000..ecce4c4 --- /dev/null +++ b/apps/mcphub/latest/docker-compose.yml @@ -0,0 +1,49 @@ +services: + mcphub: + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + ports: + - "${PANEL_APP_PORT_HTTP}:3000" + volumes: + - ./data:/app/data + environment: + - TZ=Asia/Shanghai + - PORT=3000 + - NODE_ENV=production + - TRUST_PROXY=1 + - ADMIN_PASSWORD=${ADMIN_PASSWORD} + - DB_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB} + depends_on: + postgres: + condition: service_healthy + image: samanhappy/mcphub:latest + labels: + createdBy: "Apps" + + postgres: + image: pgvector/pgvector:pg17 + container_name: ${CONTAINER_NAME}-pg + restart: always + networks: + - 1panel-network + environment: + - POSTGRES_DB=${POSTGRES_DB} + - POSTGRES_USER=${POSTGRES_USER} + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + - TZ=Asia/Shanghai + volumes: + - ./data/postgres:/var/lib/postgresql/data + healthcheck: + test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"] + interval: 10s + timeout: 5s + retries: 5 + start_period: 30s + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/mcphub/latest/mcp_settings.json b/apps/mcphub/latest/mcp_settings.json new file mode 100644 index 0000000..da39e4f --- /dev/null +++ b/apps/mcphub/latest/mcp_settings.json @@ -0,0 +1,3 @@ +{ + "mcpServers": {} +} diff --git a/apps/mcphub/logo.png b/apps/mcphub/logo.png new file mode 100644 index 0000000..20d892b Binary files /dev/null and b/apps/mcphub/logo.png differ