mcp-routing-gateway
MCP Routing Gateway
MCP Routing Gatewayは、現在の主流なAIエージェント(Claude Desktop、Clineなど)が直面する一般的な課題である**「LLMがユーザーの意図しないツールを選択してしまう問題」を解決する**ために設計された、ステートレスなルーター兼ピュアプロキシです。
🌟 なぜMCP Routing Gatewayなのか?
複数のMCPサーバーを標準のAIエージェントに直接登録すると、LLMはすべてのツールを自由に閲覧・実行できてしまい、予期せぬ破壊的な操作や不要なツール呼び出しをトリガーするリスクがあります。
このプロジェクトはAIエージェントと実際のMCPサーバー群の間に位置し、通信を仲介することで**「安全にキュレーション(フィルタリングおよび仮想化)されたツールのみをLLMに提示する」**という制御レイヤーを提供します。
Related MCP server: cordon
🏗️ アーキテクチャ
このプロジェクトは内部に「MCPサーバー」と「MCPクライアント」の両方の機能を組み込んでいます。
AI Agent (MCP Client) → | [MCP Server] Gateway [MCP Client] | → Backend MCP Serversフロントエンド(MCPサーバー): AIエージェントに対して「単一の安全なMCPサーバー」として振る舞い、標準入出力(
stdio)経由で接続を受け付けます。バックエンド(MCPクライアント):
mcp_config.jsonを読み込み、その中で定義された複数のMCPサーバーを自動的に起動・管理します(stdioでプロセスを生成)。
🎯 設計哲学
このプロジェクトは、**「ルーター兼ピュアプロキシ」**であるという厳格な哲学に基づいて構築されています。
ゼロ・ペイロード干渉(パススルー): リクエストIDや引数などのペイロードには一切干渉しません。純粋なパイプとして機能し、通信の中継に完全に集中します。
ファサードパターン(フィルタリングとツールオーバーライド): ゲートウェイは
tools/list(ツールリストの提示)とtools/call(ツールの呼び出し)のルーティングにのみ介入します。設定ファイルに基づき、危険なツールを隠蔽したり、安全な仮想ツールに置き換えたりします。
⚙️ 設定
すべての設定は完全にJSON形式で管理されます。デフォルトでは、ゲートウェイは作業ディレクトリ~/.mcp-gateway内のファイルを参照します。--work-dir CLIオプションを使用してこのディレクトリを変更できます。
mcp_config.json(バックエンド定義): MCPクライアントの標準的な設定ファイル形式です。ゲートウェイが接続し、バックグラウンドで起動するMCPサーバーのグループを定義します。gateway_config.json(ルーティングおよびフィルタ定義): ゲートウェイ固有のルール設定ファイルです。「どのツールを隠すか(ブロックされたツール)」や「どのツールを仮想化するか(仮想ツール)」を定義します。
詳細な使用方法やCLIオプションについては、ユーザーマニュアルを参照してください。
Maintenance
Related MCP Connectors
Security & DLP proxy for MCP: tool-poisoning scans, PII redaction on tool args/results. Beta.
Find, vet, and run MCP tools through a secure audited gateway with prompt-injection risk scoring
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Security firewall for AI agents — scans MCP calls for injection, secrets, and risks.
Related MCP Servers
AlicenseNot gradedqualityAmaintenanceOpen-source MCP proxy that enforces security policies, content scanning, and audit logging between AI agents and tool servers25AGPL 3.0- AlicenseNot gradedqualityAmaintenanceSecurity gateway for MCP tool calls. Sits between your LLM client and MCP servers, enforcing per-tool policies (allow/block/approve/read-only), logging every call, and pausing dangerous operations for human approval in terminal or Slack.4 npm1MIT
- AlicenseNot gradedqualityDmaintenanceA drop-in proxy that guards MCP servers with policy enforcement, secret redaction, prompt-injection screening, rug-pull detection, rate limiting, and audit logging.8 npmApache 2.0
- FlicenseNot gradedqualityBmaintenanceRuntime security gateway and FastMCP server that protects MCP clients from tool poisoning, prompt injection, and unauthorized tool schema changes through policy enforcement, fail-closed scanning, and human approval gates.-