mcp-gateway
Universal MCP Gateway (mcp-gateway)
@thargy/mcp-server-core 기반으로 구축된 고성능의 멀티테넌트 Model Context Protocol (MCP) 리버스 프록시 및 게이트웨이 서비스입니다.
왜 mcp-gateway인가?
대부분의 서드파티 MCP 서버(예: github-mcp-server, Brave Search, SQLite, PostgreSQL)는 주로 stdio를 통한 로컬 데스크톱 실행을 위해 만들어졌습니다. HTTP 또는 Cloudflare Zero Trust 터널을 통해 노출하면 다음과 같은 기능이 부족한 경우가 많습니다.
Cloudflare SSE 스트림 프라이밍: 리버스 프록시 버퍼링을 우회하기 위한 즉시
: heartbeat\n\n주석.최신 MCP 핸드셰이크 호환성:
subscriptions/listen,server/discover, 그리고 상태 비저장 JSON-RPC 디스패치 지원.세션 수명주기 관리: 올바른
Mcp-Session-Id헤더 추적과 토큰 인증.
mcp-gateway는 원격 MCP 클라이언트(Antigravity IDE, Cloudflare Zero Trust, Cursor 등)와 하나 이상의 업스트림 서드파티 MCP 백엔드(컨테이너, HTTP API, 또는 stdio CLI 도구) 사이에 위치하는 단일 멀티테넌트 어댑터 역할을 합니다.
Related MCP server: Shared MCP Gateway
아키텍처
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 --> BraveCLI구성 (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