← Back to Leaderboard
Mmicrosoft

microsoft/mcp-gateway

Kubernetes MCP gateway for stateless routing and managed server lifecycles

Engineering Health (Methodology)
A+ · 91/100
Maintenance Activity
● Updated 3d ago
Latest Release
v1.0.1
Commercial License Check
MIT · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption16/25
Release Cadence20/20
License Clarity20/20
DockerSelf-HostedMCPAPI
Total Stars
★ 931
24h Growth
+1
7d Growth
+3
Forks
97

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

microsoft/mcp-gateway Star History (2025-06-09 - 2026-12-03) ALL-TIME STAR HISTORY (2025-06 – 2026-12) +930 in 542d · avg +2/day 983 492 0 2025-06-09: ★ 12025-07-12: ★ 522025-08-16: ★ 1082025-09-20: ★ 1992025-10-25: ★ 2652025-11-29: ★ 3522026-01-03: ★ 3932026-02-07: ★ 4502026-03-14: ★ 5172026-04-18: ★ 5852026-05-23: ★ 6452026-06-27: ★ 7112026-08-01: ★ 7612026-09-05: ★ 8132026-10-10: ★ 8702026-11-12: ★ 9172026-12-03: ★ 931 ★ 931 2025-06 2026-03 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

A C#/.NET 8 gateway separates the MCP data plane from the Kubernetes lifecycle control plane. POST /adapters/{name}/mcp sends each independently authorized request to a ready instance of a named adapter, returning JSON or request-scoped SSE. POST /mcp instead reaches a replicated tool router that selects a registered backend using the tool definition and its configured execution endpoint.

The /adapters and /tools APIs feed deployment and metadata managers. Workloads use StatefulSets and headless services, while resource metadata lives in Redis for local Kubernetes or Cosmos DB in the cloud. Stateless routing means the gateway stores no MCP transport sessions; it does not mean the control plane has no persistence.

Key Capabilities & Differentiators

Adapters can proxy local or remote MCP servers. Tool registration captures the container image and version, input schema, execution port and path, replica count, and environment variables. The built-in React portal exposes resource management, pod logs, and a JSON-RPC test console. In Entra ID mode, the creator and mcp.admin can read and write; configured resource roles can grant read access.

The optional Azure Foundry integration adds agent runs with SSE event streaming. Agents can invoke registered MCP tools and delegate to other agents. gpt-4o is an example deployment; any agent configured with tools needs a model that can emit tool calls. Built-in shell execution and file read/write operations are disabled for all callers, including administrators.

Trade-offs & Limitations

Compared with direct client-to-server connections or a generic Kubernetes ingress, the gateway adds API-driven workload lifecycle management, resource-level access control, and a common endpoint for registered tools. In return, operators own a Kubernetes deployment, a metadata store, container image publishing, and identity configuration. That is a substantial setup cost for one or two fixed backends.

The protocol cutover is a hard compatibility boundary: clients and adapters must support MCP 2026-07-28, and there is no legacy initialization, transport-session support, or downgrade. Keep that separate from agent run sessions: the preview stores session working directories on the serving pod and is intended for single-replica evaluation, not a multi-replica or multi-tenant production rollout without changes to storage and workload isolation.

Hardware & Deployment Guide

The local build path uses the .NET 8 SDK, Docker Desktop with Kubernetes enabled, and a registry on port 5000. Build and push a sample MCP server image, then publish the gateway and tool-router images. The default target namespace is adapter and can be changed with Kubernetes__Namespace. Use an isolated namespace for end-to-end testing rather than replacing an existing deployment.

Plan for Redis locally or Cosmos DB in the cloud, and configure Entra ID application roles before exposing a shared deployment. The portal's development mode allows anonymous access. The core gateway does not require Foundry; that dependency applies to preview agent execution. Deploy v1.0.1 or later for the fix that stops tool invocations from following HTTP redirects returned by tool pods.

Routing: /adapters/{name}/mcp targets a named server; /mcp uses a replicated router for registered tools.
Protocol: Requires MCP 2026-07-28; requests route independently without transport-session affinity.
Lifecycle: /adapters and /tools expose CRUD, deployment status, and running logs.
Access control: Entra ID resource roles can grant reads; writes are reserved for the creator or mcp.admin.
Operations: The gateway serves a React portal at /portal/ with resource management, pod logs, and an in-browser JSON-RPC console.
Release security: v1.0.1 stops registered-tool invocations from following HTTP redirects, including during agent runs.
Best For

Platform teams already running Kubernetes that need one place to deploy MCP backends, control access, and route tool calls, and can upgrade clients and adapters together.

Skip If

You only need to connect to a fixed server, must retain legacy MCP clients, or need a production-ready multi-replica agent runtime.

Reviewed on 2026-12-03 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

DockerSelf-HostedMCPAPI
docker run -d -p 5000:5000 --name registry registry:2.7

Comparison vs. Top Coding, Skills & MCP Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
mcp-gateway ★931+3C#MITKubernetes MCP gateway for stateless routing and managed server lifecycles
rea488.8k+7.6kTypeScriptMITA local CLI and MCP server for evidence-backed app and binary analysis
skills338.7k+4.4kShellMITComposable Markdown skills that bring engineering workflows to coding agents
superpowers332.4k+4.2kShellMITA skills framework that gives coding agents a test-first development workflow

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/microsoft/mcp-gateway.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

microsoft/mcp-gateway Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about mcp-gateway

Which endpoint should an MCP client use?

Use POST /adapters/{name}/mcp to address one MCP server by name. Use POST /mcp when the client should discover and invoke registered tools through the tool router. Both paths require MCP 2026-07-28 compatibility; legacy initialization, transport sessions, and protocol downgrade are not supported.

Does the gateway need a GPU, and what should I size first?

There is no documented GPU or VRAM requirement for the C# routing layer. Size the gateway and router for request concurrency and active streams, and size the metadata store and backend containers separately. Preview agent runs use an Azure Foundry endpoint for inference; any GPU requirement for a separately hosted tool depends on that tool.

Can we self-host the gateway for commercial use?

The gateway is MIT-licensed, which permits commercial use and self-hosting. Retain the required copyright and license notices when distributing copies or substantial portions. The license does not cover the terms of third-party tool images or cloud services, and self-hosting alone does not establish compliance.

When is this a better fit than direct MCP connections or a generic ingress?

If clients already know their server URLs and you only need HTTP forwarding, direct connections or a generic Kubernetes ingress are simpler. Choose MCP Gateway when you also need to deploy and manage adapters and tools through an API, control access per resource, or expose registered tools through a common MCP endpoint.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining microsoft/mcp-gateway? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature microsoft/mcp-gateway on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare