MCP Gateway
reaatech/mcp-gateway
Gateway MCP de produção com auth, rate limit e auditoria
Ver no GitHubGateway de produção para Model Context Protocol com autenticação OAuth/OIDC, rate limiting por tenant, validação de schema, allowlists de ferramentas, logging e auditoria. Funciona como um Kong/Envoy para MCP, centralizando segurança, roteamento e observabilidade em arquiteturas multi-servidor.
Instalação
npx convez-ai reaatech/mcp-gateway1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Centralizar autenticação e autorização em múltiplos servidores MCP
- Implementar rate limiting e quotas por tenant
- Controlar acesso a ferramentas específicas por usuário/cliente
- Fan-out de requisições para múltiplos backends MCP com cache e circuit breaker
- Auditoria e observabilidade distribuída de chamadas MCP
Veredito

Solução robusta e modular para operacionalizar MCP em ambiente de produção. Ideal para equipes que precisam escalar acesso a múltiplos servidores MCP com governança, segurança e observabilidade enterprise-grade.
README
A tradução para o português deste README ainda está na fila.
mcp-gateway
Production-grade MCP Gateway — the "Kong/Envoy for MCP." Authenticate, rate-limit, validate, cache, and fan-out requests to upstream MCP servers.
This monorepo provides a composable gateway framework with 10 independently versioned packages for building production MCP infrastructure at scale.
Features
- Authentication — API keys, JWT (JWKS), OAuth2 introspection (RFC 7662), and OIDC ID token validation
- Rate limiting — Per-tenant token bucket with Redis or in-memory backends, daily quota tracking
- Schema validation — JSON-RPC 2.0 and MCP method payload validation with custom per-tool schemas
- Tool allowlists — Per-tenant tool access control with wildcard pattern matching and rollback support
- Fan-out routing — Multi-upstream broadcasting with three aggregation strategies, circuit breaker, and retry logic
- Response caching — Redis or in-memory LRU cache with per-tool TTL strategies and
Cache-Controlbypass - Audit trail — Structured JSONL audit logging with tamper-evident chaining and query API
- Observability — OpenTelemetry auto-initialization, pre-built metrics, distributed tracing, and health checks
Installation
Using the packages
Packages are published under the @reaatech scope and can be installed individually:
# Core types, config, and logging (required by all other packages)
pnpm add @reaatech/mcp-gateway-core
# Authentication strategies
pnpm add @reaatech/mcp-gateway-auth
# Rate limiting
pnpm add @reaatech/mcp-gateway-rate-limit
# Response caching
pnpm add @reaatech/mcp-gateway-cache
# Tool allowlists
pnpm add @reaatech/mcp-gateway-allowlist
# Schema validation
pnpm add @reaatech/mcp-gateway-validation
# Fan-out routing and MCP client
pnpm add @reaatech/mcp-gateway-fanout
# Audit trail logging
pnpm add @reaatech/mcp-gateway-audit
# OpenTelemetry observability
pnpm add @reaatech/mcp-gateway-observability
# Full gateway server with CLI
pnpm add @reaatech/mcp-gateway-gateway
Contributing
git clone https://github.com/reaatech/mcp-gateway.git
cd mcp-gateway
pnpm install
pnpm build
pnpm test
pnpm lint
pnpm typecheck
Quick Start
Run the gateway server:
npx mcp-gateway start --port 8080 --config gateway.yaml
Or programmatically:
import { createApp } from "@reaatech/mcp-gateway-gateway";
const gateway = createApp();
gateway.app.listen(8080, () => console.log("Gateway listening on :8080"));
Packages
| Package | Description |
|---|---|
@reaatech/mcp-gateway-core | Types, schemas, config loading, logging, and utilities |
@reaatech/mcp-gateway-auth | API key, JWT, OAuth2, and OIDC authentication |
@reaatech/mcp-gateway-rate-limit | Per-tenant rate limiting with token bucket algorithm |
@reaatech/mcp-gateway-cache | Redis/in-memory response caching with per-tool TTL strategies |
@reaatech/mcp-gateway-allowlist | Per-tenant tool access control with wildcard patterns |
@reaatech/mcp-gateway-validation | JSON Schema validation for MCP protocol messages |
@reaatech/mcp-gateway-fanout | Multi-upstream fan-out routing and MCP client connections |
@reaatech/mcp-gateway-audit | Compliance audit trail with tamper-evident chaining |
@reaatech/mcp-gateway-observability | OpenTelemetry tracing, metrics, and health checks |
@reaatech/mcp-gateway-gateway | Full Express 5 gateway server with CLI |
Documentation
ARCHITECTURE.md— System design, package relationships, and data flowsAGENTS.md— Coding conventions and development guidelinesGITHUB_TO_NPM.md— Publishing runbook for npm and GitHub PackagesCONTRIBUTING.md— Contribution workflow and release processdocs/— Deep dives on configuration, security, and deployment