mcp-gateway
Universal MCP Gateway (mcp-gateway)
Un servicio de proxy inverso y gateway de alto rendimiento y multi-tenant para el Model Context Protocol (MCP), construido sobre @thargy/mcp-server-core.
¿Por qué mcp-gateway?
La mayoría de los servidores MCP de terceros (como github-mcp-server, Brave Search, SQLite y PostgreSQL) están diseñados principalmente para la ejecución local en escritorio mediante stdio. Cuando se exponen a través de HTTP o de túneles de Cloudflare Zero Trust, suelen carecer de:
Preparación del flujo SSE de Cloudflare: comentarios
: heartbeat\n\ninmediatos para omitir el almacenamiento en búfer del proxy inverso.Compatibilidad moderna con el handshake de MCP: soporte para
subscriptions/listen,server/discovery despacho JSON-RPC sin estado.Gestión del ciclo de vida de las sesiones: seguimiento correcto de la cabecera
Mcp-Session-Idy autenticación mediante token.
mcp-gateway actúa como un único adaptador multi-tenant situado entre los clientes MCP remotos (como Antigravity IDE, Cloudflare Zero Trust y Cursor) y uno o más backends MCP de terceros ascendentes (contenedores, APIs HTTP o herramientas CLI de stdio).
Related MCP server: Shared MCP Gateway
Arquitectura
graph TD
subgraph Clients ["MCP Clients"]
AG["Antigravity IDE / Agents"]
CFPortal["Cloudflare Zero Trust MCP Portal"]
end
subgraph Ingress ["Cloudflare Tunnel (mcp.thargy.com)"]
Tunnel["cloudflared (HA Server)"]
end
subgraph Gateway ["mcp-gateway Container (:3007 -> :3008)"]
App["@thargy/mcp-server-core Router"]
GHRoute["/gh/mcp -> HttpProxyAdapter"]
BraveRoute["/brave/mcp -> StdioProxyAdapter"]
end
subgraph Backends ["3rd-Party Backends"]
GHContainer["github-mcp-backend (:8082)"]
BraveCLI["@modelcontextprotocol/server-brave-search"]
end
Clients --> Ingress
Ingress --> Gateway
App --> GHRoute --> GHContainer
App --> BraveRoute --> BraveCLIConfiguración (config.yaml)
port: 3008
routes:
gh:
type: http
name: "github-mcp-server"
description: "GitHub Model Context Protocol Server (repositories, commits, issues, PRs)"
targetUrl: "http://github-mcp-backend:8082"
authHeaderEnv: "GITHUB_PERSONAL_ACCESS_TOKEN"
# brave:
# type: stdio
# name: "brave-search"
# description: "Brave Search MCP Server"
# command: "npx"
# args: ["-y", "@modelcontextprotocol/server-brave-search"]
# env:
# BRAVE_API_KEY: "${BRAVE_API_KEY}"This server cannot be deployed
Maintenance
Related MCP Connectors
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Managed MCP gateway with OAuth, per-agent permissions, shared accounts and activity logs.
Stateless MCP gateway and OTel span-streaming bridge for hosted MCP servers.
MCP Gateway: wrap any MCP server with cold-start retries, uptime SLA, and per-execution MPP billing.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceGateway MCP Server - Route MCP requests intelligently to multiple backend servers.3MIT
- FlicenseNot gradedqualityDmaintenanceAggregates multiple shared MCP servers into a single HTTP gateway, providing a unified, observable, and reusable MCP access layer for multiple AI clients like Codex, OpenCode, and OpenClaw. It centralizes configuration management, logging, health checks, and circuit breaking to simplify multi-client MCP deployments.5-
- AlicenseNot gradedqualityCmaintenanceA universal MCP server that acts as a unified gateway for dynamically connecting and managing multiple MCP servers via a single HTTP endpoint.6 npm6MIT
- AlicenseNot gradedqualityAmaintenanceA universal MCP gateway that aggregates multiple MCP servers into a single endpoint, providing features like hot-reload, auto-healing, and a hook system for request/response mutation.1MIT