diff --git a/README.md b/README.md index 3ea1967..71b4bba 100644 --- a/README.md +++ b/README.md @@ -543,6 +543,15 @@ AI驱动的开源代码知识库与文档协作平台,支持多模型、多数 + +MetaMCP +
MetaMCP +
+ +🚀 MCP聚合器、编排器、中间件、网关于一体的Docker解决方案 + +2.4.5 • [官网链接](https://github.com/metatool-ai/metamcp) + diff --git a/apps/metamcp/2.4.5/data.yml b/apps/metamcp/2.4.5/data.yml new file mode 100644 index 0000000..3784603 --- /dev/null +++ b/apps/metamcp/2.4.5/data.yml @@ -0,0 +1,87 @@ +additionalProperties: + formFields: + - default: 12008 + envKey: PANEL_APP_PORT_HTTP + labelEn: Web Port + labelZh: HTTP 端口 + required: true + rule: paramPort + type: number + label: + en: Web Port + zh: HTTP 端口 + - default: metamcp_db + envKey: POSTGRES_DB + labelEn: Database + labelZh: 数据库名 + required: true + rule: paramCommon + type: text + label: + en: Database + zh: 数据库名 + - default: metamcp_user + envKey: POSTGRES_USER + labelEn: User + labelZh: 数据库用户 + random: true + required: true + rule: paramCommon + type: text + label: + en: User + zh: 数据库用户 + - default: m3t4mcp + envKey: POSTGRES_PASSWORD + labelEn: Password + labelZh: 数据库用户密码 + random: true + required: true + rule: paramComplexity + type: password + label: + en: Password + zh: 数据库用户密码 + - default: "http://localhost:12008" + envKey: APP_URL + labelEn: Application URL + labelZh: 应用访问地址 + required: true + type: text + label: + en: Application URL + zh: 应用访问地址 + - default: "http://localhost:12008" + envKey: NEXT_PUBLIC_APP_URL + labelEn: Public Application URL + labelZh: 公共应用访问地址 + required: true + type: text + label: + en: Public Application URL + zh: 公共应用访问地址 + - default: "your-super-secret-key-change-this-in-production" + envKey: BETTER_AUTH_SECRET + labelEn: Auth Secret + labelZh: 认证密钥 + random: true + required: true + rule: paramComplexity + type: password + label: + en: Auth Secret + zh: 认证密钥 + - default: "true" + envKey: TRANSFORM_LOCALHOST_TO_DOCKER_INTERNAL + labelEn: Transform Localhost + labelZh: 转换本地主机 + required: true + type: select + values: + - label: "True" + value: "true" + - label: "False" + value: "false" + label: + en: Transform Localhost + zh: 转换本地主机 \ No newline at end of file diff --git a/apps/metamcp/2.4.5/docker-compose.yml b/apps/metamcp/2.4.5/docker-compose.yml new file mode 100644 index 0000000..eceb0d7 --- /dev/null +++ b/apps/metamcp/2.4.5/docker-compose.yml @@ -0,0 +1,65 @@ +version: "3" +services: + app: + container_name: ${CONTAINER_NAME} + image: ghcr.io/metatool-ai/metamcp:2.4.5 + pull_policy: always + ports: + - "${PANEL_APP_PORT_HTTP}:12008" + environment: + # Postgres connection details + POSTGRES_HOST: postgres + POSTGRES_PORT: 5432 + POSTGRES_USER: ${POSTGRES_USER} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + POSTGRES_DB: ${POSTGRES_DB} + + # Database configuration (composed from above vars) + DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB} + + # Application URL configuration + APP_URL: ${APP_URL} + NEXT_PUBLIC_APP_URL: ${NEXT_PUBLIC_APP_URL} + + # Auth configuration + BETTER_AUTH_SECRET: ${BETTER_AUTH_SECRET} + + # Docker networking fix + TRANSFORM_LOCALHOST_TO_DOCKER_INTERNAL: ${TRANSFORM_LOCALHOST_TO_DOCKER_INTERNAL} + extra_hosts: + - "host.docker.internal:host-gateway" + depends_on: + postgres: + condition: service_healthy + restart: always + networks: + - 1panel-network + volumes: + - ./data:/app/data + labels: + createdBy: "Apps" + + postgres: + image: postgres:16-alpine + container_name: ${CONTAINER_NAME}-pg + restart: always + environment: + POSTGRES_DB: ${POSTGRES_DB} + POSTGRES_USER: ${POSTGRES_USER} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + 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 + networks: + - 1panel-network + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/metamcp/2.4.5/example.env b/apps/metamcp/2.4.5/example.env new file mode 100644 index 0000000..f55da13 --- /dev/null +++ b/apps/metamcp/2.4.5/example.env @@ -0,0 +1,35 @@ +NODE_ENV=production + +# Postgres connection details +POSTGRES_HOST=postgres +POSTGRES_PORT=5432 +POSTGRES_USER=metamcp_user +POSTGRES_PASSWORD=m3t4mcp +POSTGRES_DB=metamcp_db + +# Database configuration (composed from above vars) +DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB} + +# Application URL configuration +# This is the public URL where your application will be accessible +APP_URL=http://localhost:12008 +NEXT_PUBLIC_APP_URL=http://localhost:12008 + +# Auth configuration +BETTER_AUTH_SECRET=your-super-secret-key-change-this-in-production + +# OIDC Provider Configuration (Optional) +# Uncomment and configure these variables to enable OpenID Connect authentication +# Required for OIDC: +# OIDC_CLIENT_ID=your-oidc-client-id +# OIDC_CLIENT_SECRET=your-oidc-client-secret +# OIDC_DISCOVERY_URL=https://your-oidc-provider.com/.well-known/openid-configuration +# OIDC_AUTHORIZATION_URL=https://your-oidc-provider.com/auth + +# Optional OIDC Configuration: +# OIDC_PROVIDER_ID=oidc +# OIDC_SCOPES=openid email profile +# OIDC_PKCE=true + +# Docker networking fix +TRANSFORM_LOCALHOST_TO_DOCKER_INTERNAL=true diff --git a/apps/metamcp/README-en.md b/apps/metamcp/README-en.md new file mode 100644 index 0000000..5dfc195 --- /dev/null +++ b/apps/metamcp/README-en.md @@ -0,0 +1,46 @@ +# MetaMCP + +**MetaMCP** is an MCP proxy that allows you to dynamically aggregate MCP servers into a unified MCP server and apply middleware. MetaMCP itself is also an MCP server, so it can easily connect to **any** MCP client. + +![](https://cdn.jsdelivr.net/gh/xiaoY233/PicList@main/public/assets/MetaMCP.png) + +![](https://img.shields.io/badge/Copyright-arch3rPro-ff9800?style=flat&logo=github&logoColor=white) + + +## Key Features + +- 🏷️ **Group MCP servers into namespaces**, host them as meta-MCP, and assign public endpoints (SSE or Streamable HTTP) with authentication. Switch endpoint namespaces with one click. +- 🎯 **Choose only the tools you need when mixing MCP servers**. Apply other pluggable middleware such as observability, security, etc. +- 🔍 **Enhanced MCP inspector** that supports saving server configurations and checking if MetaMCP endpoints are available locally. +- 🔍 **Elasticsearch for MCP tool selection**. + +## Core Concepts + +### MCP Server +MCP server configuration that tells MetaMCP how to start an MCP server. + +### MetaMCP Namespace +- Group one or more MCP servers into a namespace +- Support enabling/disabling MCP servers at server or tool level +- Apply middleware to process MCP requests and responses at the namespace level + +### MetaMCP Endpoint +- Create endpoints and assign namespaces to them +- Multiple MCP servers within a namespace will be aggregated and output as a MetaMCP endpoint +- Optional API Key authentication or MCP Spec 2025-06-18 standard OAuth +- Exposed via SSE or Streamable HTTP transport protocols and OpenAPI endpoints + +### Middleware +- Intercept and transform MCP requests and responses at the namespace level +- Built-in example: "Filter inactive tools" - optimize tool context for LLMs + +## Use Cases + +- As infrastructure, hosting dynamically composed MCP servers through a unified endpoint +- Choose only the tools you need when mixing MCP servers +- Enhanced MCP inspector with support for saving server configurations +- Search engine for MCP tool selection + +## More Information + +For more details, visit the official documentation: https://docs.metamcp.com \ No newline at end of file diff --git a/apps/metamcp/README.md b/apps/metamcp/README.md new file mode 100644 index 0000000..e6c46b8 --- /dev/null +++ b/apps/metamcp/README.md @@ -0,0 +1,46 @@ +# MetaMCP + +**MetaMCP** 是一个 MCP 代理,允许你动态聚合 MCP 服务器为统一的 MCP 服务器,并应用中间件。MetaMCP 本身也是一个 MCP 服务器,因此可以轻松接入**任何** MCP 客户端。 + +![](https://cdn.jsdelivr.net/gh/xiaoY233/PicList@main/public/assets/MetaMCP.png) + +![](https://img.shields.io/badge/Copyright-arch3rPro-ff9800?style=flat&logo=github&logoColor=white) + + +## 主要特点 + +- 🏷️ **将 MCP 服务器分组到命名空间**,作为 meta-MCP 托管,并分配公共端点(SSE 或 Streamable HTTP),支持认证。一键切换端点的命名空间。 +- 🎯 **在混合 MCP 服务器时只选择你需要的工具**。可应用其他可插拔中间件,如可观测性、安全等。 +- 🔍 **作为增强版 MCP 检查器**,支持保存服务器配置,并可在本地检查 MetaMCP 端点是否可用。 +- 🔍 **作为 MCP 工具选择的 Elasticsearch**。 + +## 核心概念 + +### MCP 服务器 +MCP 服务器配置,告诉 MetaMCP 如何启动 MCP 服务器。 + +### MetaMCP 命名空间 +- 将一个或多个 MCP 服务器分组到命名空间 +- 支持在服务器或工具级别启用/禁用 MCP 服务器 +- 可在命名空间级别应用中间件处理 MCP 请求和响应 + +### MetaMCP 端点 +- 创建端点并为其分配命名空间 +- 命名空间内的多个 MCP 服务器将被聚合并作为 MetaMCP 端点输出 +- 可选择 API Key 认证或 MCP Spec 2025-06-18 标准 OAuth +- 通过 SSE 或 Streamable HTTP 传输协议以及 OpenAPI 端点对外提供服务 + +### 中间件 +- 在命名空间级别拦截并转换 MCP 请求和响应 +- 内置示例:"过滤非活跃工具"——为 LLM 优化工具上下文 + +## 使用场景 + +- 作为基础设施,通过统一端点托管动态组合的 MCP 服务器 +- 在混合 MCP 服务器时只选择需要的工具 +- 作为增强版 MCP 检查器,支持保存服务器配置 +- 作为 MCP 工具选择的搜索引擎 + +## 更多信息 + +更多详细信息,请访问官方文档:https://docs.metamcp.com \ No newline at end of file diff --git a/apps/metamcp/data.yml b/apps/metamcp/data.yml new file mode 100644 index 0000000..0ffdeae --- /dev/null +++ b/apps/metamcp/data.yml @@ -0,0 +1,26 @@ +name: MetaMCP +tags: + - 实用工具 +title: MCP 聚合器、编排器、中间件、网关于一体的 Docker 解决方案 +description: MCP 聚合器、编排器、中间件、网关于一体的 Docker 解决方案 +additionalProperties: + key: metamcp + name: MetaMCP + tags: + - Tool + shortDescZh: MCP 聚合器、编排器、中间件、网关于一体的解决方案 + shortDescEn: MCP aggregator, orchestrator, middleware, and gateway in one Docker solution + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://docs.metamcp.com + github: https://github.com/metatool-ai/metamcp + document: https://docs.metamcp.com + architectures: + - amd64 + - arm64 + description: + en: MCP aggregator, orchestrator, middleware, and gateway in one Docker solution + zh: MCP 聚合器、编排器、中间件、网关于一体的 Docker 解决方案 + memoryRequired: 2048 \ No newline at end of file diff --git a/apps/metamcp/latest/data.yml b/apps/metamcp/latest/data.yml new file mode 100644 index 0000000..3784603 --- /dev/null +++ b/apps/metamcp/latest/data.yml @@ -0,0 +1,87 @@ +additionalProperties: + formFields: + - default: 12008 + envKey: PANEL_APP_PORT_HTTP + labelEn: Web Port + labelZh: HTTP 端口 + required: true + rule: paramPort + type: number + label: + en: Web Port + zh: HTTP 端口 + - default: metamcp_db + envKey: POSTGRES_DB + labelEn: Database + labelZh: 数据库名 + required: true + rule: paramCommon + type: text + label: + en: Database + zh: 数据库名 + - default: metamcp_user + envKey: POSTGRES_USER + labelEn: User + labelZh: 数据库用户 + random: true + required: true + rule: paramCommon + type: text + label: + en: User + zh: 数据库用户 + - default: m3t4mcp + envKey: POSTGRES_PASSWORD + labelEn: Password + labelZh: 数据库用户密码 + random: true + required: true + rule: paramComplexity + type: password + label: + en: Password + zh: 数据库用户密码 + - default: "http://localhost:12008" + envKey: APP_URL + labelEn: Application URL + labelZh: 应用访问地址 + required: true + type: text + label: + en: Application URL + zh: 应用访问地址 + - default: "http://localhost:12008" + envKey: NEXT_PUBLIC_APP_URL + labelEn: Public Application URL + labelZh: 公共应用访问地址 + required: true + type: text + label: + en: Public Application URL + zh: 公共应用访问地址 + - default: "your-super-secret-key-change-this-in-production" + envKey: BETTER_AUTH_SECRET + labelEn: Auth Secret + labelZh: 认证密钥 + random: true + required: true + rule: paramComplexity + type: password + label: + en: Auth Secret + zh: 认证密钥 + - default: "true" + envKey: TRANSFORM_LOCALHOST_TO_DOCKER_INTERNAL + labelEn: Transform Localhost + labelZh: 转换本地主机 + required: true + type: select + values: + - label: "True" + value: "true" + - label: "False" + value: "false" + label: + en: Transform Localhost + zh: 转换本地主机 \ No newline at end of file diff --git a/apps/metamcp/latest/docker-compose.yml b/apps/metamcp/latest/docker-compose.yml new file mode 100644 index 0000000..d689b8c --- /dev/null +++ b/apps/metamcp/latest/docker-compose.yml @@ -0,0 +1,65 @@ +version: "3" +services: + app: + container_name: ${CONTAINER_NAME} + image: ghcr.io/metatool-ai/metamcp:latest + pull_policy: always + ports: + - "${PANEL_APP_PORT_HTTP}:12008" + environment: + # Postgres connection details + POSTGRES_HOST: postgres + POSTGRES_PORT: 5432 + POSTGRES_USER: ${POSTGRES_USER} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + POSTGRES_DB: ${POSTGRES_DB} + + # Database configuration (composed from above vars) + DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB} + + # Application URL configuration + APP_URL: ${APP_URL} + NEXT_PUBLIC_APP_URL: ${NEXT_PUBLIC_APP_URL} + + # Auth configuration + BETTER_AUTH_SECRET: ${BETTER_AUTH_SECRET} + + # Docker networking fix + TRANSFORM_LOCALHOST_TO_DOCKER_INTERNAL: ${TRANSFORM_LOCALHOST_TO_DOCKER_INTERNAL} + extra_hosts: + - "host.docker.internal:host-gateway" + depends_on: + postgres: + condition: service_healthy + restart: always + networks: + - 1panel-network + volumes: + - ./data:/app/data + labels: + createdBy: "Apps" + + postgres: + image: postgres:16-alpine + container_name: ${CONTAINER_NAME}-pg + restart: always + environment: + POSTGRES_DB: ${POSTGRES_DB} + POSTGRES_USER: ${POSTGRES_USER} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + 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 + networks: + - 1panel-network + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/metamcp/latest/example.env b/apps/metamcp/latest/example.env new file mode 100644 index 0000000..f55da13 --- /dev/null +++ b/apps/metamcp/latest/example.env @@ -0,0 +1,35 @@ +NODE_ENV=production + +# Postgres connection details +POSTGRES_HOST=postgres +POSTGRES_PORT=5432 +POSTGRES_USER=metamcp_user +POSTGRES_PASSWORD=m3t4mcp +POSTGRES_DB=metamcp_db + +# Database configuration (composed from above vars) +DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB} + +# Application URL configuration +# This is the public URL where your application will be accessible +APP_URL=http://localhost:12008 +NEXT_PUBLIC_APP_URL=http://localhost:12008 + +# Auth configuration +BETTER_AUTH_SECRET=your-super-secret-key-change-this-in-production + +# OIDC Provider Configuration (Optional) +# Uncomment and configure these variables to enable OpenID Connect authentication +# Required for OIDC: +# OIDC_CLIENT_ID=your-oidc-client-id +# OIDC_CLIENT_SECRET=your-oidc-client-secret +# OIDC_DISCOVERY_URL=https://your-oidc-provider.com/.well-known/openid-configuration +# OIDC_AUTHORIZATION_URL=https://your-oidc-provider.com/auth + +# Optional OIDC Configuration: +# OIDC_PROVIDER_ID=oidc +# OIDC_SCOPES=openid email profile +# OIDC_PKCE=true + +# Docker networking fix +TRANSFORM_LOCALHOST_TO_DOCKER_INTERNAL=true diff --git a/apps/metamcp/logo.png b/apps/metamcp/logo.png new file mode 100644 index 0000000..fabde86 Binary files /dev/null and b/apps/metamcp/logo.png differ