convez.ai
MCP ServerDevOps & InfraestruturaAvançado
reaatech

MCP Gateway

reaatech/mcp-gateway

Gateway MCP de produção com auth, rate limit e auditoria

Ver no GitHub
BomPluginScore · de 0 a 100

Gateway 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-gateway

1 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

Estrelas
0
Forks
0
Acompanhando
0
Saúde
85%
Último commit
há 3 dias
Versão
@reaatech/mcp-gateway-rate-limit@1.1.0
Issues abertas
10
Contribuidores
2

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

CI License: MIT TypeScript

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-Control bypass
  • 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

PackageDescription
@reaatech/mcp-gateway-coreTypes, schemas, config loading, logging, and utilities
@reaatech/mcp-gateway-authAPI key, JWT, OAuth2, and OIDC authentication
@reaatech/mcp-gateway-rate-limitPer-tenant rate limiting with token bucket algorithm
@reaatech/mcp-gateway-cacheRedis/in-memory response caching with per-tool TTL strategies
@reaatech/mcp-gateway-allowlistPer-tenant tool access control with wildcard patterns
@reaatech/mcp-gateway-validationJSON Schema validation for MCP protocol messages
@reaatech/mcp-gateway-fanoutMulti-upstream fan-out routing and MCP client connections
@reaatech/mcp-gateway-auditCompliance audit trail with tamper-evident chaining
@reaatech/mcp-gateway-observabilityOpenTelemetry tracing, metrics, and health checks
@reaatech/mcp-gateway-gatewayFull Express 5 gateway server with CLI

Documentation

  • ARCHITECTURE.md — System design, package relationships, and data flows
  • AGENTS.md — Coding conventions and development guidelines
  • GITHUB_TO_NPM.md — Publishing runbook for npm and GitHub Packages
  • CONTRIBUTING.md — Contribution workflow and release process
  • docs/ — Deep dives on configuration, security, and deployment

License

MIT

Ver o original no GitHub

Bom para

Relacionados