# MCP Gateway — Route and Manage MCP Servers > MCP Gateway is a .NET-based gateway that helps you deploy, route, and manage MCP servers behind a unified API surface, with local and Azure paths. ## Install Merge the JSON below into your `.mcp.json`: ## Quick Use 1. Prereqs: .NET 8 SDK + Docker Desktop + Kubernetes enabled. 2. Run a local registry: ```bash docker run -d -p 5000:5000 --name registry registry:2.7 ``` 3. Verify: - Follow the README "Getting Started - Local Deployment" and confirm you can port-forward the gateway service locally. ## Intro MCP Gateway is a .NET-based gateway that helps you deploy, route, and manage MCP servers behind a unified API surface, with local and Azure paths. - **Best for:** platform teams who need a managed gateway for multiple MCP servers - **Works with:** Docker, Kubernetes, .NET 8; MCP server images; clients consuming a unified API - **Setup time:** 45–120 minutes ## Practical Notes - Quant: start with 1 sample MCP server image and measure rollout time end-to-end. - Quant: define SLOs (p95 latency, error rate) for gateway vs direct stdio usage. ## Pattern: separate tool hosting from tool use A gateway becomes useful when you have multiple MCP servers and multiple clients. Operational guidance: - Treat MCP servers as deployable artifacts (images) with versioning. - Use the gateway as the control plane for discovery and routing. - Keep auth/network policies at the gateway boundary. ## Migration tip Start by routing a single non-critical tool through the gateway, then expand coverage once observability and failure handling are solid. ### FAQ **Q: Is this only for Kubernetes?** A: The README focuses on Docker + Kubernetes deployments, plus an Azure deployment path. **Q: What should I gateway first?** A: A low-risk tool with clear success criteria and measurable latency. **Q: How do I keep versions sane?** A: Version images, pin gateway releases, and roll out with canaries + metrics. ## Source & Thanks > Source: https://github.com/microsoft/mcp-gateway > License: MIT > GitHub stars: 630 · forks: 66 --- ## 快速使用 1. 前置条件:.NET 8 SDK + Docker Desktop,并启用 Kubernetes。 2. 启动本地镜像仓库: ```bash docker run -d -p 5000:5000 --name registry registry:2.7 ``` 3. 验证: - 按 README 的本地部署章节跑通一次,并确认能在本地完成 gateway 的端口转发与访问。 ## 简介 MCP Gateway 是一个基于 .NET 的网关方案,用统一的 API 面向 MCP servers 做部署、路由与管理;既支持本地 Docker/K8s,也提供面向云环境的部署路径,便于团队规范化接入。 - **适合谁:** 需要统一托管多套 MCP servers 的平台/基础设施团队 - **可搭配:** Docker、Kubernetes、.NET 8;MCP server 镜像;通过统一 API 接入的客户端 - **准备时间:** 45–120 分钟 ## 实战建议 - 量化建议:先用 1 个 sample MCP server 镜像跑通全链路,记录上线耗时。 - 量化建议:为网关设 SLO(p95 延迟、错误率),对比直连 stdio 的差异。 ## 常用打法:把工具托管与工具使用分层 当你有多套 MCP servers、又有多个客户端时,网关的价值会很明显。 运维建议: - 把 MCP servers 当作可部署产物(镜像)并版本化。 - 用网关做发现与路由的控制面。 - 认证与网络策略尽量放在网关边界统一管理。 ## 迁移建议 先把一个低风险工具接入网关跑通,再在可观测性与故障处理成熟后扩大覆盖面。 ### FAQ **只能用在 Kubernetes 吗?** 答:README 主要围绕 Docker + Kubernetes,也提供 Azure 部署路径。 **先接入哪类工具?** 答:低风险且成功标准清晰、能量化延迟的工具。 **如何管理版本?** 答:镜像版本化、网关版本固定,并用灰度 + 指标来发布。 ## 来源与感谢 > Source: https://github.com/microsoft/mcp-gateway > License: MIT > GitHub stars: 630 · forks: 66 --- Source: https://tokrepo.com/en/workflows/mcp-gateway-route-and-manage-mcp-servers Author: MCP Hub