Reverse proxy that refuses to forget your MCP session
It treats MCP servers like Kubernetes microservices, but remembers which pod owns every session.

What it does MCP Gateway is a reverse proxy and control plane built specifically for Model Context Protocol servers running in Kubernetes. It handles session-aware traffic routing, deploys and tears down server instances via RESTful APIs, and can optionally run LLM-driven agents that call registered tools over Server-Sent Events. Think of it as an API gateway that understands MCP’s conversational state and lifecycle.
The interesting bit
Most gateways treat requests as anonymous and stateless; this one pins every session_id to a specific pod so stateful MCP conversations do not wander off mid-stream. It also layers a tool registry on top: developers publish tool definitions, and an internal Tool Gateway Router figures out which backend actually executes the request so callers do not have to.
Key highlights
- Session affinity routes all requests sharing a
session_idto the same MCP server instance. - Control-plane CRUD for adapters, tools, and (optionally) agents, plus deployment status and log access.
- Kubernetes-native architecture using StatefulSets and headless services.
- Entra ID authentication and RBAC via application roles such as
mcp.admin. - Stateless data-plane mode backed by a distributed session store for production.
Caveats
- The agents-and-sessions subsystem is preview-only, single-replica, and stores working state inside the gateway pod; the README explicitly warns against enabling it in multi-replica or multi-tenant production.
Verdict Worth evaluating if you are running MCP servers in Kubernetes and want session-aware routing with a unified control plane. Less compelling if you need a production-grade agent runtime today or an identity provider other than Entra ID, since the documented authorization model is built around Azure AD application roles.
Frequently asked
- What is microsoft/mcp-gateway?
- It treats MCP servers like Kubernetes microservices, but remembers which pod owns every session.
- Is mcp-gateway open source?
- Yes — microsoft/mcp-gateway is open source, released under the MIT license.
- What language is mcp-gateway written in?
- microsoft/mcp-gateway is primarily written in C#.
- How popular is mcp-gateway?
- microsoft/mcp-gateway has 749 stars on GitHub.
- Where can I find mcp-gateway?
- microsoft/mcp-gateway is on GitHub at https://github.com/microsoft/mcp-gateway.