
oliverye7/mcp-gateway
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
モデルコンテキストプロトコル(MCP)サーバーへのエージェントトラフィックのルーティングプロキシ。 このゲートウェイは、AIエージェントとMCPサーバー間のシームレスな統合を可能にし、インテリジェントなリクエストルーティング、セッション...
概要
モデルコンテキストプロトコル(MCP)サーバーへのエージェントトラフィックのルーティングプロキシ。 このゲートウェイは、AIエージェントとMCPサーバー間のシームレスな統合を可能にし、インテリジェントなリクエストルーティング、セッション管理、および利用分析を提供します。 より関与するバージョンの非常に興味深いダウンストリームアプリケーションがありますが、私はちょうど非常に軽量で拡張可能なバージョンをリリースしたいです:) : 最小限の依存関係を持つ単一のPythonファイル展開 : 特定のニーズを拡張、変更、カスタマイズが容易 : インフラストラクチャとデータの完全な制御 - : OpenAIを搭載したツールマッチングを使用して、適切なMCPサーバーへのルート要求 - : ステートフルなインタラクションのための永続的なセッション処理 - : Redisバックエンドでキューベースのリクエスト処理 - : エージェントのランタイムと簡単に統合するためのRESTfulインターフェイス - : 組み込みのメトリックと監視機能 - : 新しいMCPサーバーとカスタムルーティングロジックを追加する簡単 MCP Gateway は、シンプルでモジュラーなアーキテクチャを採用しています.
概要(AI 翻訳)
A 軽量、モジュラー、セルフホスト可能 エージェントのトラフィックをモデルコンテキストプロトコル(MCP)サーバーにルーティングプロキシ。 このゲートウェイは、AIエージェントとMCPサーバー間のシームレスな統合を可能にし、インテリジェントなリクエストルーティング、セッション管理、および利用分析を提供します。 より関与するバージョンの非常に興味深いダウンストリームアプリケーションがありますが、私はちょうど非常に軽量で拡張可能なバージョンをリリースしたいです:)
Self-Host Ready:最小限の依存関係を持つ単一のPythonファイル展開 非常にモジュラー:あなたの特定の必要性のために拡張し、変更し、そしてカスタマイズすること容易 ゼロ ロックイン: インフラストラクチャとデータを完全に制御
##特徴
-Intelligent Routing:OpenAIを搭載したツールマッチングを使用して、適切なMCPサーバーへのルート要求
- セッション管理: ステートフルなインタラクションのための永続的なセッション処理
- Redisの統合: Redis バックエンドによるキューベースリクエスト処理 -HTTP API:任意のエージェントのランタイムと簡単に統合するためのRESTfulインターフェイス -Usage Analytics:組み込みのメトリックと監視機能 -Extensible:新しいMCPサーバーとカスタムルーティングロジックを簡単に追加
アーキテクチャ
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
MCP Gateway
A lightweight, modular, and self-hostable routing proxy for agent traffic to Model Context Protocol (MCP) servers. This gateway enables seamless integration between AI agents and MCP servers, providing intelligent request routing, session management, and usage analytics. There are some very interesting downstream applications of a more involved version of this but I wanted to just release a very lightweight and extendable version :)
Self-Host Ready: Single Python file deployment with minimal dependencies
Highly Modular: Easy to extend, modify, and customize for your specific needs
Zero Lock-in: Full control over your infrastructure and data
Features
- Intelligent Routing: Routes requests to appropriate MCP servers using OpenAI-powered tool matching
- Session Management: Persistent session handling for stateful interactions
- Redis Integration: Queue-based request processing with Redis backend
- HTTP API: RESTful interface for easy integration with any agent runtime
- Usage Analytics: Built-in metrics and monitoring capabilities
- Extensible: Easy to add new MCP servers and custom routing logic
Architecture
The MCP Gateway uses a simple, modular architecture designed for easy self-hosting and customization:
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ AI Agents │ │ MCP Gateway │ │ Any Tool │
│ │ │ │ │ │
│ • Claude Code │◄──►│ • Smart Routing │◄──►│ • MCP │
│ • Custom Agents │ │ • Session Mgmt │ │ • Other Agents │
│ • LLM Apps │ │ • HTTP/MCP APIs │ │ • (any endpoint)│
│ │ │ │ │ │
└─────────────────┘ └─────────────────┘ └─────────────────┘
Two Integration Paths
-
HTTP API Mode: Direct REST API calls to the gateway
- Perfect for web apps, microservices, and custom integrations
- Simple HTTP POST/GET requests
- Session management via headers
-
MCP Server Mode: Gateway acts as an MCP server itself
- Use
mcp_remote.pyto expose gateway as an MCP server - Native MCP protocol support
- Seamless integration with MCP-compatible agents
- Use
Core Components
gateway.py: Main routing engine with intelligent tool matching (currently supports all MCPs, can be extended to generic tools)session.py: Stateful session management for multi-turn conversationsmcp_remote.py: MCP server wrapper for native protocol supportmcp_servers/: Example server implementations you can extendservers.txt: List of any MCPs you want to support
🚀 Quick Start (30 seconds)
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →