The kuadrant/mcp-gateway repository provides an Envoy-based gateway solution designed to aggregate, route, and secure multiple Model Context Protocol (MCP) servers behind a unified endpoint. Its primary purpose is to simplify the management and exposure of MCP servers, enabling organizations to federate tools and services while integrating robust authentication, authorization, and rate limiting mechanisms. The gateway is tightly integrated with Istio and leverages Kubernetes Gateway API resources, making it suitable for modern cloud-native environments.
The MCP Gateway architecture consists of several core components: the broker/router, controller, and custom resource definitions (CRDs). The broker/router handles aggregation and routing logic, while the controller automates discovery and configuration of MCP servers within Kubernetes clusters. The gateway can operate in two modes: standalone (using a YAML configuration file) and controller mode (dynamic discovery via Kubernetes resources). In standalone mode, administrators manually define MCP servers in a configuration file, which the broker monitors and hot-reloads as changes occur. In controller mode, the gateway watches for MCPServer custom resources and HTTPRoute references, automatically updating its configuration to reflect available backend MCP servers.
A key feature of the MCP Gateway is its support for policy attachment mechanisms, enabling advanced security and access control. It integrates with OAuth providers such as Keycloak, allowing for authentication and authorization based on user groups, client scopes, and role mappings. The gateway exposes OAuth protected resource discovery endpoints, facilitating seamless integration with external identity providers. Administrators can configure OAuth settings either via Kubernetes custom resources or environment variables, depending on the deployment mode. The gateway also supports rate limiting and other policy enforcement features, making it suitable for enterprise-grade deployments.
The repository offers comprehensive installation and setup instructions. For minimal installations, users can deploy the MCP Gateway components onto existing Kubernetes clusters with the Gateway API installed. For development and testing, a local environment can be provisioned using Kind, Istio, Keycloak, and test MCP servers, all orchestrated via Makefile targets. The repository includes scripts and guides for deploying to OpenShift, broadening its compatibility across different Kubernetes distributions.
Configuration is highly flexible. In Kubernetes environments, MCPServerRegistration custom resources allow administrators to register MCP servers by referencing HTTPRoutes and specifying prefixes to avoid naming conflicts. The controller maintains status conditions to indicate server readiness and validity. In standalone mode, the configuration file lists MCP servers with their URLs, hostnames, and prefixes. Command-line flags and environment variables provide further customization, including addresses for gRPC and HTTP endpoints, OAuth settings, and operational modes.
The MCP Gateway also includes tools for inspection and testing. The MCP Inspector can be used to connect to the gateway, visualize available tools, and validate authentication flows. Example setups demonstrate OAuth integration with Keycloak, including user and group management, tool authorization, and token validation. The gateway serves OAuth discovery information at standardized endpoints, ensuring compatibility with client applications and identity providers.
Overall, kuadrant/mcp-gateway is a versatile, extensible solution for aggregating, securing, and managing MCP servers in cloud-native environments. Its integration with Istio, Kubernetes Gateway API, and policy attachment mechanisms makes it a powerful tool for organizations seeking to federate services while maintaining strict security and access controls.