mcp-gway
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-gwaylist all connected MCP servers"
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
A standalone CLI gateway that aggregates multiple MCP (Model Context Protocol) servers behind a single HTTP/SSE endpoint with Code Mode — reducing LLM input token usage by up to 92% when using multiple MCP servers.
Features
Multi-Server Aggregation — Connect to multiple MCP servers (HTTP, SSE, Stdio, Streamable HTTP) and expose them through a single endpoint
Code Mode — 4 meta-tools that let LLMs discover and use tools dynamically without loading all schemas upfront
OAuth 2.0 Support — Built-in OAuth flow with dynamic client registration (RFC 7591) and token storage
Hermetic Sandbox — Starlark-based sandbox for safe code execution
MCP Protocol Compliant — Works with Claude Desktop, Cursor, and any MCP-compatible client
Related MCP server: MCP Server Proxy
Installation
pip install mcp-gwayOr with mise:
mise install
uv syncQuick Start
# Add an MCP server
mcp-gway add youtube --type http --url http://localhost:3001/mcp
# Add a stdio server
mcp-gway add filesystem --type stdio --command npx --args '["-y", "@anthropic/mcp-filesystem"]'
# Add a server requiring OAuth
mcp-gway add supabase --type streamable-http --url https://mcp.supabase.com/mcp
# List all servers
mcp-gway list
# Start the gateway
mcp-gway serve --port 8080Connect from Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"gateway": {
"url": "http://localhost:8080/mcp"
}
}
}Commands
Command | Description |
| Add an MCP server and generate |
| Remove an MCP server |
| Update tools for a server |
| List all connected servers |
| Show tool signatures for a server |
| Refresh connection and re-discover tools |
| Start the gateway server |
Code Mode
When connected, the gateway exposes 4 meta-tools:
Tool | Description |
| List all available |
| Read function signatures from a stub |
| Get detailed documentation for a tool |
| Execute code in a sandboxed Starlark interpreter |
OAuth Authentication
For servers requiring OAuth (e.g., Supabase):
# Trigger OAuth flow
mcp-gway refresh supabase --auth
# Or store token manually
mkdir -p ~/.config/mcp-gway/tokens
echo '{"access_token": "YOUR_TOKEN"}' > ~/.config/mcp-gway/tokens/supabase.jsonDevelopment
# Install dependencies
mise install
uv sync
# Run tests
uv run pytest -v
# Lint and format
uv run ruff check src/ tests/
uv run ruff format src/ tests/Architecture
┌─────────────────────────────────────────────────────────┐
│ MCP Gateway │
├─────────────────────────────────────────────────────────┤
│ CLI (click) │ HTTP/SSE Server (Starlette) │
│ - add │ - POST /mcp (JSON-RPC) │
│ - remove │ - GET /mcp (SSE stream) │
│ - list │ - POST /mcp/messages │
│ - refresh │ │
├─────────────────────────────────────────────────────────┤
│ Code Mode (4 meta-tools) │ Starlark Sandbox │
│ - listToolFiles │ - Hermetic execution │
│ - readToolFile │ - Server injection │
│ - getToolDocs │ │
│ - executeToolCode │ │
├─────────────────────────────────────────────────────────┤
│ Registry (.pyi files) │ OAuth2 (RFC 7591) │
│ - servers/*.pyi │ - Dynamic registration│
│ - Tool signatures │ - Token storage │
└─────────────────────────────────────────────────────────┘
│ │ │
┌────┴────┐ ┌────┴────┐ ┌────┴────┐
│ Server1 │ │ Server2 │ │ Server3 │
│ (HTTP) │ │ (SSE) │ │ (Stdio) │
└─────────┘ └─────────┘ └─────────┘License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceAggregates multiple MCP servers behind a single, secure endpoint with unified tool/resource discovery, OAuth authentication, and resilient request routing. Enables users to manage and interact with multiple MCP backends through one centralized interface with load balancing and circuit breakers.2
- AlicenseNot gradedqualityDmaintenanceAggregates multiple MCP servers into a single endpoint, enabling LLM clients to access tools, resources, and prompts from various backends through one connection.15MIT
- AlicenseBqualityBmaintenanceAggregates multiple MCP servers via a single interface with token optimization and multiple operating modes (Gateway, Meta, Proxy, Search, Code).78MIT
- FlicenseNot gradedqualityCmaintenanceAggregates multiple MCP servers into a single unified endpoint with hot-plugging, multi-protocol support, and management via web and CLI.9
Related MCP Connectors
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Self-hosted federated MCP gateway: one OAuth 2.1 MCP server in front of N apps, user-level scopes.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/deuriib/mcp-gateway'
If you have feedback or need assistance with the MCP directory API, please join our Discord server