Connects to GitHub MCP servers to provide tools for searching repositories and managing issues.
Integrates with Kubernetes MCP servers to expose tools for managing and inspecting cluster resources, such as listing pods.
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 Gatewayfind tools for searching kubernetes pods"
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
MCP Gateway is a server aggregation tool that connects multiple Model Context Protocol (MCP) servers into a single gateway, exposing all tools from connected servers through unified search, describe, and invoke interfaces and it exposes only 5 tools.
The Context Limit Problem
When connecting an client (Claude Code, Opencode, etc.) to multiple MCP servers, each server lists all its tools. With 10+ MCPs each exposing 10-50 tools, you can easily exceed 500+ tool descriptions in the system prompt:
This creates two problems:
Context overflow: Many LLMs hit their context limit before any conversation happens
Cognitive overload: LLMs struggle to choose the right tool from hundreds of options
The Gateway Solution
MCP Gateway solves this by providing tool search instead of dumping all tool schemas:
How It Works
MCP Gateway operates as both an MCP client (connecting to upstream servers) and an MCP server (exposing tools to downstream clients):
Gateway starts and reads configuration
For each configured upstream server, Gateway connects via stdio (local) or HTTP/WebSocket (remote)
Gateway fetches the tool catalog from each server
All tools are indexed in a unified catalog with search capabilities
AI clients connect to Gateway and use
gateway.searchto find relevant toolsOnly the tools the client actually needs are invoked
You will notice around ~40% reduction of initial token used.
Installation
Claude Code
Add to your Claude MCP configuration:
OpenCode
Add to your OpenCode MCP configuration:
You may append your global AGENTS.md (~/.config/opencode/AGENTS.md) with this template
Configuration
MCP Gateway reads configuration from a JSON file. By default, it looks for:
Path provided as first command-line argument
MCP_GATEWAY_CONFIGenvironment variable~/.config/mcp-gateway/config.json
Configuration Format
Each entry specifies:
type:"local"or"remote"command(local only): Array with command and arguments to spawn the upstream serverurl(remote only): Full URL of the remote MCP servertransport(optional, remote only): Override transport detection ("streamable_http"or"websocket"). Usually auto-detected from URL protocol.enabled: Set to false to skip connecting to this server
Remote Server Configuration
Remote servers are auto-detected based on the URL protocol:
http://orhttps://→ Streamable HTTP (recommended)ws://orwss://→ WebSocket
Available Tools
gateway.search
Search for tools across all connected servers.
Returns matching tools with relevance scores. Tools matching in name are boosted.
gateway.describe
Get detailed information about a specific tool.
Returns the full tool schema including inputSchema.
gateway.invoke
Execute a tool synchronously and get immediate results.
gateway.invoke_async
Start an asynchronous tool execution. Returns a job ID for polling.
gateway.invoke_status
Check the status of an async job.
Tool ID Format
All gateway tools use the format serverKey::toolName to identify tools:
The serverKey is the key name in your configuration file.
Architecture
Components
MCPGateway class: Main orchestrator
Upstream connection manager: Manages connections to MCP servers (stdio for local, HTTP/WebSocket for remote)
Tool catalog: In-memory index of all available tools with metadata
Job queue: Handles async tool invocations with priority ordering and concurrency limits (max 3 concurrent by default)
Search engine: MiniSearch with BM25 scoring and fuzzy matching
Search Algorithm
The search uses MiniSearch with BM25 ranking:
BM25 scoring: Relevance algorithm
Field boosting: Name matches (3x), title matches (2x), description/server matches (1x)
Fuzzy matching: Handles typos with 0.2 threshold (e.g., "kubenetes" → finds "kubernetes")
Prefix search: Partial word matching (e.g., "pod" matches "pods_list")
Contributing
License
MIT License. See the LICENSE.