mcp-routing-gateway
An MCP routing proxy that prevents LLMs from executing unintended tools. It securely curates, filters, and routes tools from multiple backend MCP servers. (LLMが意図しないツールを実行するのを防ぐMCPルーティングプロキシ。複数のバックエンドMCPサーバーからのツールを安全にキュレーション、フィルタリング、ルーティングします。)
README
MCP Routing Gateway
The MCP Routing Gateway is a stateless router and Pure Proxy designed to solve the problem of "LLMs selecting tools unintended by the user," which is a common issue faced by current mainstream AI agents (e.g., Claude Desktop, Cline).
🌟 Why MCP Routing Gateway?
When multiple MCP servers are registered directly to a standard AI agent, the LLM can freely browse and execute all tools, posing the risk of triggering unexpected destructive operations or unnecessary tool calls.
This project sits between the AI agent and the actual group of MCP servers, mediating the communication to provide a control layer that "presents only safely curated (filtered and virtualized) tools to the LLM."
🏗️ Architecture
This project incorporates both "MCP Server" and "MCP Client" functionalities internally.
AI Agent (MCP Client) → | [MCP Server] Gateway [MCP Client] | → Backend MCP Servers
- Frontend (MCP Server): Acts as a "single, secure MCP server" to the AI agent, accepting connections via standard input/output (
stdio). - Backend (MCP Client): Reads
mcp_config.jsonand automatically launches and manages multiple MCP servers defined within it (viastdiospawned processes).
🎯 Design Philosophy
This project is built on the strict philosophy of being a "Router and Pure Proxy."
- Zero Payload Interference (Pass-through): It does not interfere with payloads such as request IDs or arguments. It focuses entirely on relaying communication, functioning as a pure pipe.
- Facade Pattern (Filtering and Tool Overrides):
The Gateway only intervenes in the routing of
tools/list(presenting the tool list) andtools/call(tool invocation). Based on the configuration file, it hides dangerous tools or replaces them with secure virtual tools.
⚙️ Configuration
All configurations are entirely managed in JSON format. By default, the gateway looks for these files in the working directory ~/.mcp-gateway. You can change this directory using the --work-dir CLI option.
mcp_config.json(Backend Definition): The standard configuration file format for MCP clients. It defines the group of MCP servers that the Gateway connects to and launches in the background.gateway_config.json(Routing and Filter Definition): A rule configuration file unique to the Gateway. It defines "which tools to hide (Blocked Tools)" and "which tools to virtualize (Virtual Tools)."
For detailed usage and CLI options, please see the User Manual.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.