Expand description
MCP Gateway Library
Universal Model Context Protocol (MCP) Gateway with a compact Meta-MCP tool surface.
§Features
- Meta-MCP Mode: 12 tools minimum, 14 in the README benchmark scenario, 15 when webhook status is surfaced
- Streaming: Real-time notifications via SSE (MCP 2025-03-26 Streamable HTTP)
- Notification Multiplexer: Routes backend notifications to connected clients
- Multi-Transport: stdio, Streamable HTTP, SSE support
- Failsafes: Circuit breakers, retries, timeouts, rate limiting
- Production Ready: Health checks, metrics, graceful shutdown
§Protocol Version
Implements MCP protocol versions:
- 2025-11-25 (latest - tasks, elicitation, audio, tool annotations)
- 2025-06-18
- 2025-03-26 (Streamable HTTP)
- 2024-11-05
- 2024-10-07
Re-exports§
Modules§
- a2a
- A2A (
Agent2Agent) transport adapter — Phase 1. - attestation
- Symphony+ sandbox attestation — token injection at sandbox creation (MIK-5223, B1-IDENT).
- autotag
- Automatic keyword extraction for MCP tool descriptions.
- backend
- Backend management
- cache
- Response caching with TTL for
gateway_invokeresults - capability
- Capability system for direct REST API integration
- chains
- Durable Capability Chains — step-level checkpoint + retry for multi-tool pipelines.
- cli
- Command-line interface definitions for
mcp-gateway. - config
- Configuration management.
- config_
persistence - Shared helpers for mutating and persisting gateway config files.
- config_
reload - Config hot-reload with diff patching.
- context_
compression - DSA-inspired context compression for proxied conversations — Issue #79.
- context_
integrity - Context integrity kernel for tool-result boundary protection.
- control_
plane - Enterprise control-plane domain model.
- cost_
accounting - Per-client cost accounting for gateway tool calls.
- discovery
- MCP Server Auto-Discovery
- error
- Error types for MCP Gateway
- failsafe
- Failsafe mechanisms: circuit breaker, retry, rate limiting, health tracking
- gateway
- Gateway server implementation
- idempotency
- Idempotency key support for
gateway_invoke - identity_
grants - Identity-scoped capability grants for personal MCP tools.
- identity_
propagation - End-user identity propagation to backend MCP servers (MIK-6704 / ADR-007).
- key_
server - LLM Key Server — OIDC identity to temporary scoped API keys.
- kill_
switch - Production safety — kill switches and error budgets for backend servers.
- kubernetes
- Kubernetes enterprise reconciliation planning.
- metrics
- Prometheus metrics recorder installation and text-format rendering.
- mtls
- Mutual TLS (mTLS) authenticated tool access.
- oauth
- OAuth 2.0 Client for MCP Gateway
- playbook
- Playbook engine for multi-step tool chains.
- projection
- Projection layer for the gateway proxy surface (MIK-3530).
- protocol
- MCP Protocol types (version 2025-11-25)
- protocol_
imports - Safe protocol import planning for external API and MCP package sources.
- provider
- Provider abstraction — pluggable tool sources for
FastMCP3.0. - ranking
- Smart search ranking based on usage frequency
- registry
- Capability registry for community-shared capability definitions
- routing_
profile - Routing profiles for session-scoped tool access control.
- runtime
- RUNTIME-D: dual-substrate OCI abstraction layer.
- scheduler
- Cron scheduler and inbound webhook action dispatcher.
- secret_
injection - Secret injection proxy — credential brokering at the gateway level.
- secrets
- Secret resolution with keychain integration
- security
- Security modules for the MCP gateway.
- semantic_
search - Semantic search for natural language MCP tool discovery (RFC-0072).
- session_
sandbox - Gateway-level session sandboxing for per-session resource limits.
- simhash
- Simhash-based request routing and cache sharing for MCP Gateway — Issue #46.
- skills
- MCP Capability to Agent Skills bridge.
- stats
- Usage statistics tracking for the gateway
- tool_
profiles - Per-user tool usage profiles (RFC-0073).
- tool_
registry - Engram-inspired deterministic O(1) tool registry with prefetching.
- tracing_
context - Distributed tracing for tool call chains — Issue #63.
- transform
- Response transform pipeline for stripping noise from API responses.
- transition
- Predictive tool prefetch via invocation sequence tracking.
- transport
- Transport implementations for MCP backends
- trust
TrustCardand CBOM metadata for MCP servers and tools.- tunnel
- Tunnel integration for secure remote access.
- validator
- MCP Server Design Validator - Agent-UX Compliance
Constants§
- MCP_
PROTOCOL_ VERSION - MCP Protocol version supported by this gateway (latest)
Functions§
- setup_
tracing - Setup tracing/logging