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.
File Explorer
Download Latest Version (.zip)- image.yml
- main.yml
- dependabot.yml
- azure-deployment.bicep
- azure-deployment.json
- README.md
- cloud-deployment-template.yml
- local-deployment.yml
- Deploy-McpGateway.ps1
- entra-app-roles.md
- BuiltinToolAuthorizer.cs
- BuiltinToolSettings.cs
- ForwardedIdentityHeaders.cs
- IBuiltinToolAuthorizer.cs
- IPermissionProvider.cs
- IWorkloadIdentityAuthorizer.cs
- Operation.cs
- SimplePermissionProvider.cs
- WorkloadIdentityAuthorizer.cs
- WorkloadIdentitySettings.cs
- AdapterData.cs
- AdapterResource.cs
- AdapterStatus.cs
- AgentData.cs
- AgentResource.cs
- IManagedResource.cs
- ResourcePermission.cs
- ResourceType.cs
- SessionData.cs
- SessionMessage.cs
- SessionResource.cs
- SessionStatus.cs
- ToolData.cs
- ToolDefinition.cs
- ToolResource.cs
- IAdapterDeploymentManager.cs
- IKubeClientWrapper.cs
- IKubernetesClientFactory.cs
- KubeClient.cs
- KubernetesAdapterDeploymentManager.cs
- LocalKubernetesClientFactory.cs
- IdentityExtensions.cs
- LoggingExtensions.cs
- AgentRunner.cs
- AgentToolRegistry.cs
- BuiltinToolExecutor.cs
- FoundryChatClient.cs
- FoundrySettings.cs
- IFoundryChatClient.cs
- SessionEvent.cs
- SubAgentInvoker.cs
- AdapterManagementService.cs
- AdapterRichResultProvider.cs
- AgentManagementService.cs
- IAdapterManagementService.cs
- IAdapterRichResultProvider.cs
- IAgentManagementService.cs
- ISessionManagementService.cs
- IToolManagementService.cs
- SessionManagementService.cs
- ToolManagementService.cs
- CosmosAdapterResourceStore.cs
- CosmosAgentResourceStore.cs
- CosmosSessionResourceStore.cs
- CosmosSystemTextJsonSerializer.cs
- CosmosToolResourceStore.cs
- IAdapterResourceStore.cs
- IAgentResourceStore.cs
- InMemoryAdapterResourceStore.cs
- InMemoryAgentResourceStore.cs
- InMemorySessionResourceStore.cs
- InMemoryToolResourceStore.cs
- ISessionResourceStore.cs
- IToolResourceStore.cs
- RedisAdapterResourceStore.cs
- RedisToolResourceStore.cs
- Microsoft.McpGateway.Management.csproj
- AdapterManagementServiceTests.cs
- AdapterRichResultProviderTests.cs
- AgentManagementServiceTests.cs
- AgentToolRegistryTests.cs
- BuiltinToolAuthorizerTests.cs
- BuiltinToolExecutorTests.cs
- KubernetesAdapterDeploymentManagerTests.cs
- Microsoft.McpGateway.Management.Tests.csproj
- SimplePermissionProviderTests.cs
- ToolManagementServiceTests.cs
- WorkloadIdentityAuthorizerTests.cs
- DevelopmentAuthenticationHandler.cs
- AdapterReverseProxyController.cs
- AgentManagementController.cs
- ManagementController.cs
- PingController.cs
- PortalConfigController.cs
- SessionManagementController.cs
- ToolManagementController.cs
- github.pubxml
- localhost_5000.pubxml
- launchSettings.json
- AdapterKubernetesNodeInfoProvider.cs
- IServiceNodeInfoProvider.cs
- AdapterSessionRoutingHandler.cs
- DistributedMemorySessionStore.cs
- IAdapterSessionStore.cs
- ISessionRoutingHandler.cs
- SessionInfo.cs
- appsettings.Development.json
- appsettings.json
- Constants.cs
- HttpProxy.cs
- McpSubPathAwareAuthenticationHandler.cs
- Microsoft.McpGateway.Service.csproj
- Program.cs
- AdapterSessionRoutingHandlerTests.cs
- HttpProxyTests.cs
- Microsoft.McpGateway.Service.Tests.csproj
- SessionStoreTests.cs
- IToolDefinitionProvider.cs
- IToolExecutor.cs
- github.pubxml
- localhost_5000.pubxml
- launchSettings.json
- DummyToolExecutor.cs
- HttpToolExecutor.cs
- StorageToolDefinitionProvider.cs
- appsettings.Development.json
- appsettings.json
- Microsoft.McpGateway.Tools.csproj
- Program.cs
- Microsoft.McpGateway.Tools.Tests.csproj
- StorageToolDefinitionProviderTests.cs
- Directory.Packages.props
- Microsoft.McpGateway.sln
- mcp-gateway.openapi.json
- client.ts
- types.ts
- config.ts
- devIdentity.ts
- msal.ts
- PortalProvider.tsx
- AdapterFormFields.tsx
- Layout.tsx
- McpTestPanel.tsx
- PageHeader.tsx
- StatusBadge.tsx
- ToolForm.tsx
- useAsync.ts
- AdapterCreatePage.tsx
- AdapterDetailPage.tsx
- AdaptersPage.tsx
- ToolCreatePage.tsx
- ToolDetailPage.tsx
- ToolsPage.tsx
- App.tsx
- main.tsx
- styles.css
- vite-env.d.ts
- index.html
- package-lock.json
- package.json
- README.md
- tsconfig.app.json
- tsconfig.json
- tsconfig.node.json
- vite.config.ts
- main.py
- Dockerfile
- requirements.txt
- main.py
- Dockerfile
- README.md
- requirements.txt
- app.py
- Dockerfile
- requirements.txt
- .gitignore
- CODE_OF_CONDUCT.md
- infra-diagram.png
- LICENSE
- NOTICE
- README.md
- SECURITY.md
# Installation Guide
git clone https://github.com/microsoft/mcp-gateway
Downloads the entire project code from GitHub to your computer.
cd mcp-gateway
Moves into the project folder you just downloaded.
2. Docker
Easy Recommended- Git Needed to download the project code from GitHub.
- Docker Desktop Needed to build and run containers. Install it and keep it running in the background.
docker run -d -p 5000:5000 --name registry registry:2.7
Runs the built image as an actual container.
docker build -f sample-servers/mcp-example/Dockerfile sample-servers/mcp-example -t localhost:5000/mcp-example:1.0.0
Builds a runnable image based on the Dockerfile.
docker push localhost:5000/mcp-example:1.0.0
Type this command into your terminal and run it.
docker build -f sample-servers/tool-example/Dockerfile sample-servers/tool-example -t localhost:5000/weather-tool:1.0.0
Builds a runnable image based on the Dockerfile.
docker push localhost:5000/weather-tool:1.0.0
Type this command into your terminal and run it.
Pulled directly from this repo's README.
3. .NET
Mediumdotnet publish dotnet/Microsoft.McpGateway.Service/src/Microsoft.McpGateway.Service.csproj -c Release /p:PublishProfile=localhost_5000.pubxml
Type this command into your terminal and run it.
dotnet publish dotnet/Microsoft.McpGateway.Tools/src/Microsoft.McpGateway.Tools.csproj -c Release /p:PublishProfile=localhost_5000.pubxml
Type this command into your terminal and run it.
Pulled directly from this repo's README.
4. Node.js
Easycd portal
This project's files live in a subfolder, so move into it first.
npm install
Downloads and installs the libraries listed in package.json.
npm start
Starts the development/run server.
5. Python
Easypip install -r sample-servers/mcp-example/requirements.txt
Installs the Python libraries listed in requirements.txt (or similar).
python <μ€νν νμΌλͺ
>.py # READMEμμ μ νν μ€ν νμΌλͺ
μ νμΈνμΈμ
Runs the Python script (or module).
