Provides optional Prometheus metrics support for monitoring the gateway's performance, health status, and backend operations.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Gatewaylist all the connected servers and their tools"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Gateway
Universal Model Context Protocol (MCP) Gateway - Single-port multiplexing with Meta-MCP for ~95% context token savings.
The Problem
MCP is powerful, but scaling to many servers creates problems:
Without Gateway | With Gateway |
100+ tool definitions in context | 4 meta-tools |
~15,000 tokens overhead | ~400 tokens |
Multiple ports to manage | Single port |
Session loss on reconnect | Persistent proxy |
The Solution
Quick Start
Installation
Basic Usage
Configuration
Create servers.yaml:
Client Configuration
Point your MCP client to the gateway:
Features
Meta-MCP Mode (~95% Token Savings)
Instead of loading 100+ tool definitions, Meta-MCP exposes 4 meta-tools:
Meta-Tool | Purpose |
| List available backends |
| List tools from a specific backend |
| Search tools by keyword across all backends |
| Invoke any tool on any backend |
Token Math:
Traditional: 100 tools × 150 tokens = 15,000 tokens
Meta-MCP: 4 tools × 100 tokens = 400 tokens
Savings: 97%
Transport Support
Transport | Description | Example |
stdio | Subprocess with JSON-RPC |
|
http | HTTP POST |
|
sse | Server-Sent Events |
|
Operational Features
Lazy Loading: Backends start on first access
Idle Timeout: Hibernate unused backends (configurable)
Auto-Reconnect: Survives client context compaction
Health Aggregation: Single
/healthendpointTool Caching: Cached for session persistence
API Reference
HTTP Endpoints
Endpoint | Description |
| Health check with backend status |
| Meta-MCP mode (dynamic discovery) |
| Direct backend access |
Environment Variables
Configuration values support environment variable expansion:
CLI Options
Programmatic Usage
Production Deployment
systemd Service
macOS launchd
Docker
Metrics & Monitoring
Health Endpoint
Prometheus Metrics (Optional)
Install with metrics support:
Troubleshooting
Backend Won't Start
Check the command is correct:
npx -y @package/nameVerify environment variables are set
Check logs with
--log-level DEBUG
Tool Not Found
Use
gateway_search_toolsto verify tool existsCheck backend is running:
gateway_list_serversVerify backend has started: check
/health
Session Issues
The gateway caches tool lists on startup. If a backend restarts:
Tools are re-cached automatically
Check
restart_countin health endpoint
Contributing
License
MIT License - see LICENSE for details.
Credits
Created by Mikko Parkkola
Inspired by the need to scale MCP beyond a handful of servers without drowning in context tokens.