feat: add app MetaMCP

This commit is contained in:
arch3rPro
2025-08-08 17:12:43 +08:00
parent cd6beac15a
commit 874e45c05c
11 changed files with 501 additions and 0 deletions

View File

@@ -543,6 +543,15 @@ AI驱动的开源代码知识库与文档协作平台支持多模型、多数
</td>
<td width="33%" align="center">
<a href="./apps/metamcp/README.md">
<img src="./apps/metamcp/logo.png" width="60" height="60" alt="MetaMCP">
<br><b>MetaMCP</b>
</a>
🚀 MCP聚合器、编排器、中间件、网关于一体的Docker解决方案
<kbd>2.4.5</kbd> • [官网链接](https://github.com/metatool-ai/metamcp)
</td>
<td width="33%" align="center">

View File

@@ -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: 转换本地主机

View File

@@ -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

View File

@@ -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

46
apps/metamcp/README-en.md Normal file
View File

@@ -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

46
apps/metamcp/README.md Normal file
View File

@@ -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

26
apps/metamcp/data.yml Normal file
View File

@@ -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

View File

@@ -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: 转换本地主机

View File

@@ -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

View File

@@ -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

BIN
apps/metamcp/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB