mcp-gateway
MCP OAuth Proxy incl. dynamic client registration (DCR), MCP prompt analytics and MCP firewall to build enterprise grade MCP servers.
claude mcp add --transport stdio hyprmcp-mcp-gateway docker run -i hyprmcp/mcp-gateway \ --env PORT="8080" \ --env LOG_LEVEL="info" \ --env OAUTH_CLIENT_ID="OAuth client ID" \ --env UPSTREAM_MCP_URL="URL of the upstream MCP server" \ --env OAUTH_CLIENT_SECRET="OAuth client secret"
How to use
Hypr MCP Gateway provides an OAuth2-enabled gateway for MCP servers, adding dynamic client registration, single-sign-on flow, and prompt telemetry to MCP requests. It acts as a proxy between end-user MCP clients and your MCP backend, handling OAuth authorization and logging MCP requests for analytics and debugging. With dynamic client registration, you can onboard new clients without manual configuration and observe prompts and authorization states via the gateway’s telemetry features. Use the gateway to keep your MCP server lean while offloading authentication and telemetry concerns to this dedicated component.
To use it, deploy the gateway (via Docker in the provided configuration) and point your MCP upstream to the gateway URL. Configure the gateway’s environment variables to integrate with your OAuth provider and upstream MCP. Once running, clients will authenticate through the gateway, receive dynamic client registrations as needed, and MCP requests will be logged and instrumented for analytics.
How to install
Prerequisites:
- Docker installed and running
- Access to an OAuth 2.0 provider for client registration
Option 1: Run with Docker (recommended)
- Pull and run the gateway container using the provided configuration:
# If you’re using the default image name in mcp_config
docker run -i hyprmcp/mcp-gateway
- Ensure environment variables are configured (PORT, OAuth credentials, upstream MCP URL) as shown in mcp_config.
Option 2: Build from source (Go)
- Install Go (1.18+).
- Clone the repository and build:
git clone https://github.com/hyprmcp/mcp-gateway.git
cd mcp-gateway
go build ./...
- Run the binary with required flags or environment variables (port, OAuth config, upstream MCP URL).
Option 3: Docker compose (advanced)
- Create a docker-compose.yml that mirrors the docker run configuration with the necessary environment variables.
- Start with:
docker-compose up -d
Additional notes
Notes and tips:
- Ensure your OAuth provider supports dynamic client registration if you rely on that feature.
- The gateway logs MCP requests and payloads; consider adjusting log levels to balance observability with sensitivity of data.
- If you encounter connection issues to the upstream MCP, verify UPSTREAM_MCP_URL is reachable from the gateway container.
- Environment variables can be extended as needed; refer to the gateway’s docs for a complete list of supported options (e.g., enabling telemetry, configuring prompt analytics).
- For local testing, the default PORT is 8080; expose or map this port as needed in your deployment environment.
- When using Docker, make sure the container has network access to your OAuth provider and the upstream MCP server.
Related MCP Servers
mcp-context-forge
An AI Gateway, registry, and proxy that sits in front of any MCP, A2A, or REST/gRPC APIs, exposing a unified endpoint with centralized discovery, guardrails and management. Optimizes Agent & Tool calling, and supports plugins.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
mcp -code-execution-mode
An MCP server that executes Python code in isolated rootless containers with optional MCP server proxying. Implementation of Anthropic's and Cloudflare's ideas for reducing MCP tool definitions context bloat.
k8s
K8s-mcp-server is a Model Context Protocol (MCP) server that enables AI assistants like Claude to securely execute Kubernetes commands. It provides a bridge between language models and essential Kubernetes CLI tools including kubectl, helm, istioctl, and argocd, allowing AI systems to assist with cluster management, troubleshooting, and deployments
mcp-gateway
Model Context Protocol (MCP) Gateway & Registry - Central hub for managing tools, resources, and prompts for MCP-compatible LLMs. Translates REST APIs into MCP, builds virtual MCP servers with security and observability, and bridges multiple transports (stdio, SSE, streamable HTTP).
homebutler
🏠 Manage your homelab from chat. Single binary, zero dependencies.