MCP Gateway
Unify multiple MCP Servers & Skills into a single gateway — with proxy forwarding, authentication, and a management API. Typical use: expose local stdio servers as remote MCP endpoints, then use them in any web-based AI chat via a browser extension.
What is MCP Gateway?
MCP Gateway is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to unify multiple mcp servers & skills into a single gateway — with proxy forwarding, authentication, and a management api. typical use: expose local stdio servers as remote mcp endpoints, then use them ...
Unify multiple MCP Servers & Skills into a single gateway — with proxy forwarding, authentication, and a management API. Typical use: expose local stdio servers as remote MCP endpoints, then use them in any web-based AI chat via a browser extension.
This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Unify multiple MCP Servers & Skills into a single gateway —
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-gatewayConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use MCP Gateway
MCP Gateway is a self-hosted Node.js/TypeScript gateway that aggregates multiple MCP servers — whether running locally as stdio processes or remotely over HTTP — into a single unified endpoint, with API key authentication, a web dashboard, and a management REST API. It namespaces tools from each upstream server (e.g., ceph_alpha__get_health_summary) so AI agents see one flat tool list rather than managing multiple server connections. DevOps teams and platform engineers use it to expose local stdio-based MCP servers as remote HTTP endpoints accessible from web-based AI chat tools, CI pipelines, or agent frameworks via a browser extension or direct API.
Prerequisites
- Node.js 18+ and npm (for local development)
- Docker and Docker Compose (for the recommended containerized deployment)
- Upstream MCP servers already running or accessible (stdio, SSE, or Streamable HTTP)
- An MCP-compatible client or agent framework to connect through the gateway
- Basic familiarity with JSON configuration for defining upstream server connections
Clone the repository
Clone the MCP Gateway repository from GitHub to your server or local machine.
git clone https://github.com/devops-autotools/devops-project-mcp-gateway.git
cd devops-project-mcp-gatewayConfigure environment variables
Set the gateway port, API key, and config file path. These can be set via environment variables or edited directly in docker-compose.yaml.
export PORT=3010
export API_KEY=your-secure-api-key-here
export SERVERS_CONFIG=/app/servers.jsonDefine your upstream MCP servers in servers.json
Create or edit servers.json to list the MCP servers the gateway should proxy. Supports streamable-http, sse, fastmcp, and stdio transports.
[
{
"id": "my-database-server",
"transport": "streamable-http",
"url": "http://localhost:4000/mcp"
},
{
"id": "local-filesystem",
"transport": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
}
]Start the gateway with Docker Compose
Launch the gateway using Docker Compose. It will start on port 3010 (or your configured PORT) and be accessible at http://localhost:3010.
docker compose up -d --buildConfigure your MCP client to connect through the gateway
Point your MCP client at the gateway SSE endpoint with the API key as a query parameter. All upstream server tools are aggregated and namespaced automatically.
{
"mcpServers": {
"mcp-gateway": {
"url": "http://localhost:3010/sse?apiKey=your-secure-api-key-here"
}
}
}Manage servers via the REST API or dashboard
Add, remove, or inspect upstream servers at runtime using the management API, or visit http://localhost:3010 for the web dashboard.
# List aggregated tools
curl -X POST "http://localhost:3010/sse?apiKey=your-secure-api-key-here" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":1,"params":{}}'MCP Gateway Examples
Client configuration
MCP client configuration to connect through the MCP Gateway SSE endpoint with API key authentication.
{
"mcpServers": {
"mcp-gateway": {
"url": "http://localhost:3010/sse?apiKey=your-secure-api-key-here"
}
}
}Prompts to try
Example prompts once your AI agent is connected to the MCP Gateway with upstream servers aggregated.
- "List all available tools across all connected MCP servers"
- "Use the my-database-server tools to query the users table"
- "Call the local-filesystem__read_file tool to read /tmp/config.json"
- "Show the health status of all upstream MCP servers connected to the gateway"
- "Add a new MCP server at http://analytics-service:8080 to the gateway"Troubleshooting MCP Gateway
Upstream server tools are not appearing in the aggregated tool list
Check that the upstream server is reachable from the gateway container. If using Docker, ensure the upstream server is on the same Docker network or accessible via the host network. Verify the id, transport, and url fields in servers.json are correct and that the upstream server is running.
API key authentication fails with 401 Unauthorized
Confirm the API_KEY environment variable matches exactly what you are passing as the apiKey query parameter. The default key is mcp_gateway_secret_123 — change it to a secure value in production by setting the API_KEY environment variable before starting the gateway.
Docker Compose build fails or the gateway crashes on startup
Run `npm install && npm run build` locally to verify the build succeeds before Docker. Check `docker compose logs -f` for the specific error. Ensure Node.js 18+ is used in the Docker image. If servers.json is missing or has invalid JSON, the gateway will fail to start — validate the JSON with `node -e "require('./servers.json')"`.
Frequently Asked Questions about MCP Gateway
What is MCP Gateway?
MCP Gateway is a Model Context Protocol (MCP) server that unify multiple mcp servers & skills into a single gateway — with proxy forwarding, authentication, and a management api. typical use: expose local stdio servers as remote mcp endpoints, then use them in any web-based ai chat via a browser extension. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install MCP Gateway?
Follow the installation instructions on the MCP Gateway GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with MCP Gateway?
MCP Gateway works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is MCP Gateway free to use?
Yes, MCP Gateway is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
MCP Gateway Alternatives — Similar Cloud Services Servers
Looking for alternatives to MCP Gateway? Here are other popular cloud services servers you can use with Claude, Cursor, and VS Code.
Open WebUI
★ 138.2kUser-friendly AI Interface (Supports Ollama, OpenAI API, ...)
Anything LLM
★ 60.4kThe all-in-one AI productivity accelerator. On device and privacy first with no annoying setup or configuration.
LocalAI
★ 46.4kLocalAI is the open-source AI engine. Run any model - LLMs, vision, voice, image, video - on any hardware. No GPU required.
Nacos
★ 33.0kan easy-to-use dynamic service discovery, configuration and service management platform for building AI cloud native applications.
Xiaozhi ESP32
★ 26.7k本项目为xiaozhi-esp32提供后端服务,帮助您快速搭建ESP32设备控制服务器。Backend service for xiaozhi-esp32, helps you quickly build an ESP32 device control server.
Gateway
★ 11.8kA blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.
Browse More Cloud Services MCP Servers
Explore all cloud services servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up MCP Gateway in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use MCP Gateway?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.