MCP Gateway

v1.0.0Cloud Servicesstable

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.

aiapi-gatewayarm-deploymentsasp-net-coreazure
Share:
645
Stars
0
Downloads
0
Weekly
0/5

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

Unify multiple MCP servers
Proxy forwarding with authentication
Web-based AI chat deployment
LicenseMIT
Languagec#
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-gateway

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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-gateway
2

Configure 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.json
3

Define 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"]
  }
]
4

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 --build
5

Configure 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"
    }
  }
}
6

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.

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.

Quick Config Preview

{ "mcpServers": { "mcp-gateway": { "command": "npx", "args": ["-y", "mcp-gateway"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides