Skip to main content
Glama
globalpocket

mcp-routing-gateway

by globalpocket

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
  1. フロントエンド(MCPサーバー): AIエージェントに対して「単一の安全なMCPサーバー」として振る舞い、標準入出力(stdio)経由で接続を受け付けます。

  2. バックエンド(MCPクライアント): mcp_config.jsonを読み込み、その中で定義された複数のMCPサーバーを自動的に起動・管理します(stdioでプロセスを生成)。

🎯 設計哲学

このプロジェクトは、**「ルーター兼ピュアプロキシ」**であるという厳格な哲学に基づいて構築されています。

  1. ゼロ・ペイロード干渉(パススルー): リクエストIDや引数などのペイロードには一切干渉しません。純粋なパイプとして機能し、通信の中継に完全に集中します。

  2. ファサードパターン(フィルタリングとツールオーバーライド): ゲートウェイはtools/list(ツールリストの提示)とtools/call(ツールの呼び出し)のルーティングにのみ介入します。設定ファイルに基づき、危険なツールを隠蔽したり、安全な仮想ツールに置き換えたりします。

⚙️ 設定

すべての設定は完全にJSON形式で管理されます。デフォルトでは、ゲートウェイは作業ディレクトリ~/.mcp-gateway内のファイルを参照します。--work-dir CLIオプションを使用してこのディレクトリを変更できます。

  1. mcp_config.json(バックエンド定義): MCPクライアントの標準的な設定ファイル形式です。ゲートウェイが接続し、バックグラウンドで起動するMCPサーバーのグループを定義します。

  2. gateway_config.json(ルーティングおよびフィルタ定義): ゲートウェイ固有のルール設定ファイルです。「どのツールを隠すか(ブロックされたツール)」や「どのツールを仮想化するか(仮想ツール)」を定義します。

詳細な使用方法やCLIオプションについては、ユーザーマニュアルを参照してください。

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    Open-source MCP proxy that enforces security policies, content scanning, and audit logging between AI agents and tool servers
    25
    AGPL 3.0
  • A
    license
    Not graded
    quality
    A
    maintenance
    Security 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 npm
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A drop-in proxy that guards MCP servers with policy enforcement, secret redaction, prompt-injection screening, rug-pull detection, rate limiting, and audit logging.
    8 npm
    Apache 2.0
  • F
    license
    Not graded
    quality
    B
    maintenance
    Runtime 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.
    -