Mcp Gateway

MCP Gateway is a reverse proxy and management layer for MCP servers, enabling scalable, session-aware stateful routing and lifecycle management of MCP servers in Kubernetes environments.

Blockchain & Cloud ComputingC#MIT

Abstract

Mcp Gateway is an open-source Blockchain & Cloud Computing project. MCP Gateway is a reverse proxy and management layer for MCP servers, enabling scalable, session-aware stateful routing and lifecycle management of MCP servers in Kubernetes environments. It is built using C#, Kubernetes. Key capabilities include: Support for Proxying Local & Remote MCP Servers. See examples and usage; Stateless reverse proxy with a distributed session store (production mode); Kubernetes-native deployment using StatefulSets and headless services. The complete source code is publicly available on GitHub under the MIT License, making it a useful reference for students building a Blockchain & Cloud Computing mini project or final-year project.

1. Introduction

MCP Gateway is a reverse proxy and management layer for MCP servers, enabling scalable, session-aware stateful routing and lifecycle management of MCP servers in Kubernetes environments.

2. Objective

MCP Gateway is a reverse proxy and management layer for MCP servers, enabling scalable, session-aware stateful routing and lifecycle management of MCP servers in Kubernetes environments.

This project demonstrates how C#, Kubernetes can be applied to a real-world Blockchain & Cloud Computing problem.

3. Key Features / Modules

  • Support for Proxying Local & Remote MCP Servers. See examples and usage.
  • Stateless reverse proxy with a distributed session store (production mode).
  • Kubernetes-native deployment using StatefulSets and headless services.
  • Management portal (React SPA) served by the gateway itself at

4. Technology Stack

C#Kubernetes
  • A regex denylist for clearly dangerous shell operations (sudo, network egress, mounts, package managers, etc.). This is defense-in-depth, not a sandbox.
  • 30s default / 120s max bash timeout; 16 KiB output cap per stream; 256 KiB max file size; 4 MiB total writes per session.
  • Path resolution rejects absolute paths and .. traversal.

5. System Requirements

General requirements for this technology stack — check the README for exact versions.

  • .NET SDK / Visual Studio
  • Git (to clone the repository)

6. Installation & Setup

git clone https://github.com/microsoft/mcp-gateway.git
cd mcp-gateway
  1. Deploy Azure infrastructure via Bicep templates
  2. Deploy Kubernetes resources (including mcp-gateway) to the provisioned AKS cluster
kubectl apply -f deployment/k8s/local-deployment.yml
GET http://localhost:8000/tools/weather/status
GET http://<resourceLabel>.<location>.cloudapp.azure.com/tools/weather/status
Authorization: Bearer <token>

Full setup instructions are in the project README.

7. Future Enhancements

Suggested extensions you can add to make this your own project.

  • Add a CI/CD pipeline with GitHub Actions
  • Deploy to a public test network or cloud free tier
  • Add monitoring and cost alerts

8. Viva / Review Questions

Common questions examiners ask for projects in this domain.

  1. Why does this problem need a blockchain or cloud-native design?
  2. Explain the smart contract / infrastructure components and how they interact.
  3. How are gas costs or cloud costs kept under control?
  4. How is the system secured (keys, IAM, access control)?
  5. How would the solution scale to many more users?

9. Source Code & License

This project is developed by microsoft and published on GitHub under the MIT License. Please follow the license terms and credit the original author when you use or modify this code.

Want to build this as your internship project?

Work on a Blockchain & Cloud Computing project like this with mentor guidance, weekly reviews and an internship certificate from Training Trains, Erode — online or offline.

Apply for Blockchain & Cloud Computing Internship