# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: MetaMCP
spec:
    description: |
        MetaMCP is an MCP Aggregator, Orchestrator, Middleware, and Gateway in one Docker container. It dynamically aggregates MCP servers into a unified MCP server and applies middlewares.
    coverImage: https://raw.githubusercontent.com/metatool-ai/metamcp/refs/heads/main/metamcp.svg
    icon: https://raw.githubusercontent.com/canyugs/zeabur-template/refs/heads/main/MetaMCP/logo.ico
    variables:
        - key: PUBLIC_DOMAIN
          type: DOMAIN
          name: Domain
          description: What domain do you want to bind MetaMCP to?
        - key: BETTER_AUTH_SECRET
          type: STRING
          name: Auth Secret
          description: Secret key for Better Auth authentication (change this for production)
    tags:
        - MCP
        - Middleware
        - Gateway
        - Orchestrator
        - AI Tools
    readme: |
        # MetaMCP
        MetaMCP is a powerful MCP proxy that lets you dynamically aggregate MCP servers into a unified MCP server and apply middlewares. It functions as an MCP Aggregator, Orchestrator, Middleware, and Gateway all in one Docker container.

        ## Key Features
        - **MCP Aggregation**: Group MCP servers into namespaces and host them as meta-MCPs
        - **Public Endpoints**: Assign public endpoints (SSE or Streamable HTTP) with authentication
        - **Tool Selection**: Pick only the tools you need when remixing MCP servers
        - **Pluggable Middleware**: Apply middleware for observability and security
        - **Enhanced Inspector**: Use as MCP inspector with saved server configs

        ## Usage
        - Open MetaMCP at `https://${PUBLIC_DOMAIN}`
        - Login and configure your MCP servers
        - The default PostgreSQL credentials are provided in the service instructions

        ## Configuration
        - `DATABASE_URL`: PostgreSQL connection string (auto-configured)
        - `APP_URL`: Public URL of the application
        - `BETTER_AUTH_SECRET`: Authentication secret key
        - Optional OIDC configuration available through environment variables

        ## Documentation
        - Official docs: https://docs.metamcp.com
        - GitHub: https://github.com/metatool-ai/metamcp
    services:
        - name: postgresql
          icon: https://raw.githubusercontent.com/zeabur/service-icons/main/marketplace/postgresql.svg
          template: PREBUILT
          spec:
            id: postgresql
            source:
                image: postgres:16-alpine
            ports:
                - id: database
                  port: 5432
                  type: TCP
            volumes:
                - id: data
                  dir: /var/lib/postgresql/data
            instructions:
                - title: Connection String
                  content: postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${PORT_FORWARDED_HOSTNAME}:${DATABASE_PORT_FORWARDED_PORT}/${POSTGRES_DATABASE}
                - title: PostgreSQL Connect Command
                  content: psql "postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${PORT_FORWARDED_HOSTNAME}:${DATABASE_PORT_FORWARDED_PORT}/${POSTGRES_DATABASE}"
                - title: PostgreSQL username
                  content: ${POSTGRES_USERNAME}
                - title: PostgreSQL password
                  content: ${POSTGRES_PASSWORD}
                - title: PostgreSQL database
                  content: ${POSTGRES_DATABASE}
                - title: PostgreSQL host
                  content: ${PORT_FORWARDED_HOSTNAME}
                - title: PostgreSQL port
                  content: ${DATABASE_PORT_FORWARDED_PORT}
            env:
                POSTGRES_CONNECTION_STRING:
                    default: postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DATABASE}
                    expose: true
                POSTGRES_DATABASE:
                    default: ${POSTGRES_DB}
                    expose: true
                POSTGRES_DB:
                    default: metamcp_db
                POSTGRES_HOST:
                    default: ${CONTAINER_HOSTNAME}
                    expose: true
                POSTGRES_PASSWORD:
                    default: ${PASSWORD}
                    expose: true
                POSTGRES_PORT:
                    default: ${DATABASE_PORT}
                    expose: true
                POSTGRES_URI:
                    default: ${POSTGRES_CONNECTION_STRING}
                    expose: true
                POSTGRES_USER:
                    default: metamcp_user
                POSTGRES_USERNAME:
                    default: ${POSTGRES_USER}
                    expose: true
        - name: metamcp
          icon: https://raw.githubusercontent.com/canyugs/zeabur-template/refs/heads/main/MetaMCP/logo.ico
          dependencies:
            - postgresql
          template: PREBUILT
          spec:
            id: metamcp
            source:
                image: ghcr.io/metatool-ai/metamcp:latest
            ports:
                - id: web
                  port: 12008
                  type: HTTP
            instructions:
                - title: Access MetaMCP
                  content: https://${PUBLIC_DOMAIN}
                - title: Auth Secret
                  content: ${BETTER_AUTH_SECRET}
                - title: Database Connection
                  content: ${DATABASE_URL}
            env:
                APP_URL:
                    default: ${ZEABUR_WEB_URL}
                BETTER_AUTH_SECRET:
                    default: ${BETTER_AUTH_SECRET}
                DATABASE_URL:
                    default: postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DATABASE}
                NEXT_PUBLIC_APP_URL:
                    default: ${ZEABUR_WEB_URL}
                NODE_ENV:
                    default: production
                TRANSFORM_LOCALHOST_TO_DOCKER_INTERNAL:
                    default: "true"
          domainKey: PUBLIC_DOMAIN
localization:
    es-ES:
        description: |
            MetaMCP es un Agregador, Orquestador, Middleware y Gateway de MCP en un único contenedor Docker. Agrega dinámicamente servidores MCP en un servidor MCP unificado y aplica middlewares.
        variables:
            - key: PUBLIC_DOMAIN
              type: DOMAIN
              name: Dominio
              description: ¿A qué dominio quieres vincular MetaMCP?
            - key: BETTER_AUTH_SECRET
              type: STRING
              name: Secreto de Autenticación
              description: Clave secreta para la autenticación de Better Auth (cámbiala en producción)
        readme: |
            # MetaMCP
            MetaMCP es un potente proxy MCP que te permite agregar dinámicamente servidores MCP en un servidor MCP unificado y aplicar middlewares. Funciona como Agregador, Orquestador, Middleware y Gateway de MCP todo en un contenedor Docker.

            ## Características principales
            - **Agregación MCP**: Agrupa servidores MCP en espacios de nombres y hostéalos como meta-MCPs
            - **Endpoints públicos**: Asigna endpoints públicos (SSE o Streamable HTTP) con autenticación
            - **Selección de herramientas**: Elige solo las herramientas que necesitas al remezclar servidores MCP
            - **Middleware conectable**: Aplica middleware para observabilidad y seguridad
            - **Inspector mejorado**: Úsalo como inspector MCP con configuraciones de servidor guardadas

            ## Uso
            - Abre MetaMCP en `https://${PUBLIC_DOMAIN}`
            - Inicia sesión y configura tus servidores MCP
            - Las credenciales predeterminadas de PostgreSQL se proporcionan en las instrucciones del servicio

            ## Configuración
            - `DATABASE_URL`: Cadena de conexión PostgreSQL (configurada automáticamente)
            - `APP_URL`: URL pública de la aplicación
            - `BETTER_AUTH_SECRET`: Clave secreta de autenticación
            - Configuración OIDC opcional disponible a través de variables de entorno

            ## Documentación
            - Documentación oficial: https://docs.metamcp.com
            - GitHub: https://github.com/metatool-ai/metamcp
    id-ID:
        description: |
            MetaMCP adalah Aggregator, Orchestrator, Middleware, dan Gateway MCP dalam satu container Docker. Secara dinamis mengagregasi server MCP menjadi server MCP terpadu dan menerapkan middleware.
        variables:
            - key: PUBLIC_DOMAIN
              type: DOMAIN
              name: Domain
              description: Domain mana yang ingin Anda ikat ke MetaMCP?
            - key: BETTER_AUTH_SECRET
              type: STRING
              name: Kunci Rahasia Autentikasi
              description: Kunci rahasia untuk autentikasi Better Auth (ubah ini untuk produksi)
        readme: |
            # MetaMCP
            MetaMCP adalah proxy MCP yang kuat yang memungkinkan Anda mengagregasi server MCP secara dinamis menjadi server MCP terpadu dan menerapkan middleware. Berfungsi sebagai Aggregator, Orchestrator, Middleware, dan Gateway MCP semuanya dalam satu container Docker.

            ## Fitur Utama
            - **Agregasi MCP**: Kelompokkan server MCP ke dalam namespace dan host sebagai meta-MCP
            - **Endpoint Publik**: Tetapkan endpoint publik (SSE atau Streamable HTTP) dengan autentikasi
            - **Pemilihan Tool**: Pilih hanya tool yang Anda butuhkan saat meremix server MCP
            - **Middleware Pluggable**: Terapkan middleware untuk observabilitas dan keamanan
            - **Inspector yang Ditingkatkan**: Gunakan sebagai inspector MCP dengan konfigurasi server yang tersimpan

            ## Cara Penggunaan
            - Buka MetaMCP di `https://${PUBLIC_DOMAIN}`
            - Login dan konfigurasi server MCP Anda
            - Kredensial PostgreSQL default disediakan dalam instruksi layanan

            ## Konfigurasi
            - `DATABASE_URL`: String koneksi PostgreSQL (dikonfigurasi otomatis)
            - `APP_URL`: URL publik aplikasi
            - `BETTER_AUTH_SECRET`: Kunci rahasia autentikasi
            - Konfigurasi OIDC opsional tersedia melalui variabel environment

            ## Dokumentasi
            - Dokumentasi resmi: https://docs.metamcp.com
            - GitHub: https://github.com/metatool-ai/metamcp
    ja-JP:
        description: |
            MetaMCPは、MCPアグリゲーター、オーケストレーター、ミドルウェア、ゲートウェイを1つのDockerコンテナに統合したツールです。MCPサーバーを動的に統合し、統一されたMCPサーバーとして提供し、ミドルウェアを適用できます。
        variables:
            - key: PUBLIC_DOMAIN
              type: DOMAIN
              name: ドメイン
              description: MetaMCPをバインドするドメインを指定してください
            - key: BETTER_AUTH_SECRET
              type: STRING
              name: 認証シークレット
              description: Better Auth認証のシークレットキー（本番環境では必ず変更してください）
        readme: |
            # MetaMCP
            MetaMCPは、MCPサーバーを動的に統合し、統一されたMCPサーバーとして提供できる強力なMCPプロキシです。ミドルウェアを適用し、MCPアグリゲーター、オーケストレーター、ミドルウェア、ゲートウェイの機能を1つのDockerコンテナで提供します。

            ## 主な機能
            - **MCP統合**：MCPサーバーを名前空間にグループ化し、meta-MCPとしてホスト
            - **パブリックエンドポイント**：認証付きのパブリックエンドポイント（SSEまたはStreamable HTTP）を割り当て
            - **ツール選択**：MCPサーバーをリミックスする際に必要なツールのみを選択
            - **プラガブルミドルウェア**：可観測性とセキュリティのためのミドルウェアを適用
            - **拡張インスペクター**：保存されたサーバー構成を持つMCPインスペクターとして使用

            ## 使用方法
            - `https://${PUBLIC_DOMAIN}` でMetaMCPを開く
            - ログインしてMCPサーバーを設定
            - デフォルトのPostgreSQL認証情報はサービス説明に記載されています

            ## 設定オプション
            - `DATABASE_URL`：PostgreSQL接続文字列（自動設定）
            - `APP_URL`：アプリケーションの公開URL
            - `BETTER_AUTH_SECRET`：認証シークレットキー
            - 環境変数を介してオプションのOIDC設定が可能

            ## ドキュメント
            - 公式ドキュメント：https://docs.metamcp.com
            - GitHub：https://github.com/metatool-ai/metamcp
    zh-CN:
        description: |
            MetaMCP 是一个集 MCP 聚合器、编排器、中间层和网关于一体的 Docker 容器。它可以动态地将 MCP 服务器聚合成统一的 MCP 服务器并应用中间层。
        variables:
            - key: PUBLIC_DOMAIN
              type: DOMAIN
              name: 域名
              description: 你想将 MetaMCP 绑定到哪个域名？
            - key: BETTER_AUTH_SECRET
              type: STRING
              name: 身份验证密钥
              description: Better Auth 身份验证的密钥（生产环境请务必修改此值）
        readme: |
            # MetaMCP
            MetaMCP 是一个强大的 MCP 代理服务器，让你可以动态地将 MCP 服务器聚合成统一的 MCP 服务器并应用中间层。它集 MCP 聚合器、编排器、中间层和网关功能于一身。

            ## 主要功能
            - **MCP 聚合**：将 MCP 服务器分组到命名空间并托管为 meta-MCP
            - **公开端点**：分配具有身份验证的公开端点（SSE 或 Streamable HTTP）
            - **工具选择**：在混合 MCP 服务器时只选择你需要的工具
            - **可插拔中间层**：应用用于可观察性和安全性的中间层
            - **增强检查器**：用作具有已保存服务器配置的 MCP 检查器

            ## 使用方式
            - 在 `https://${PUBLIC_DOMAIN}` 打开 MetaMCP
            - 登录并配置你的 MCP 服务器
            - 默认的 PostgreSQL 凭证在服务说明中提供

            ## 配置选项
            - `DATABASE_URL`：PostgreSQL 连接字符串（自动配置）
            - `APP_URL`：应用程序的公开 URL
            - `BETTER_AUTH_SECRET`：身份验证密钥
            - 可通过环境变量配置可选的 OIDC

            ## 文档
            - 官方文档：https://docs.metamcp.com
            - GitHub：https://github.com/metatool-ai/metamcp
    zh-TW:
        description: |
            MetaMCP 是一個集 MCP 聚合器、編排器、中介層和閘道於一體的 Docker 容器。它可以動態地將 MCP 伺服器聚合成統一的 MCP 伺服器並套用中介層。
        variables:
            - key: PUBLIC_DOMAIN
              type: DOMAIN
              name: 網域
              description: 你想將 MetaMCP 綁定到哪個網域？
            - key: BETTER_AUTH_SECRET
              type: STRING
              name: 身份驗證密鑰
              description: Better Auth 身份驗證的密鑰（生產環境請務必修改此值）
        readme: |
            # MetaMCP
            MetaMCP 是一個強大的 MCP 代理伺服器，讓你可以動態地將 MCP 伺服器聚合成統一的 MCP 伺服器並套用中介層。它集 MCP 聚合器、編排器、中介層和閘道功能於一身。

            ## 主要功能
            - **MCP 聚合**：將 MCP 伺服器分組到命名空間並託管為 meta-MCP
            - **公開端點**：分配具有身份驗證的公開端點（SSE 或 Streamable HTTP）
            - **工具選擇**：在混合 MCP 伺服器時只選擇你需要的工具
            - **可插拔中介層**：套用用於可觀察性和安全性的中介層
            - **增強檢查器**：用作具有已儲存伺服器配置的 MCP 檢查器

            ## 使用方式
            - 在 `https://${PUBLIC_DOMAIN}` 開啟 MetaMCP
            - 登入並配置你的 MCP 伺服器
            - 預設的 PostgreSQL 憑證在服務說明中提供

            ## 配置選項
            - `DATABASE_URL`：PostgreSQL 連線字串（自動配置）
            - `APP_URL`：應用程式的公開 URL
            - `BETTER_AUTH_SECRET`：身份驗證密鑰
            - 可透過環境變數配置選用的 OIDC

            ## 文件
            - 官方文件：https://docs.metamcp.com
            - GitHub：https://github.com/metatool-ai/metamcp
