PM

ptbsare/mcp-proxy-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

196 stars 17 forks 品質 67 トレンド 0MIT

ptbsare/mcp-proxy-serverは、https://github.com/ptbsare/mcp-proxy-server.からインポートされたMCPサーバー候補です。

概要

ptbsare/mcp-proxy-serverは、https://github.com/ptbsare/mcp-proxy-server.からインポートされたMCPサーバー候補です。

概要(AI 翻訳)

简体中文

✨ 主な特徴 ハイライト

  • ** 🌐 Web UI管理:直感的なウェブインターフェースを通じて接続されたすべてのMCPサーバーを簡単に管理できます(オプションで有効化が必要です)。
  • ** 🔧 細かいツール制御:** 個々のツールを有効または無効にし、WebUIを通じて名前や説明を上書きできます。
  • ** 🛡️ 柔軟なエンドポイント認証:** HTTPベースのエンドポイント(/sse、/mcp)を柔軟な認証オプション(Authorization: Bearer またはX-API-Key: ])で保護しましょう。
  • ** 🔄 堅牢なセッション処理と並行性**:
  • クライアント再接続のためのSSEセッション処理の改善(サーバー送信endpointイベントに依存)および同時接続のサポート。
  • Streamable HTTPエンドポイント(/mcp)も並行クライアントのやり取りをサポートします。
  • ** 🚀 多用途MCP運用(サーバーおよびプロキシ):**
  • プロキシとして機能: 複数のバックエンドMCPサーバー(Stdio、SSE、Streamable HTTP)に接続し、集約します。
  • サーバーとして機能: これらの集約された機能を独自のStreamable HTTP(/mcp)およびSSE(/sse)エンドポイントを通じて公開します。純粋なStdioモードでも動作可能です。
  • ** ✨ リアルタイムインストール出力**:Web UI上でStdioサーバーのインストール進捗(stdout/stderr)を直接監視。

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

MCP Proxy Server

简体中文

✨ Key Features Highlight

  • 🌐 Web UI Management: Easily manage all connected MCP servers through an intuitive web interface (optional, requires enabling).
  • 🔧 Granular Tool Control: Enable or disable individual tools, and override names/descriptions via the Web UI.
  • 🛡️ Flexible Endpoint Authentication: Secure your HTTP-based endpoints (/sse, /mcp) with flexible authentication options (Authorization: Bearer or X-API-Key: ).
  • 🔄 Robust Session Handling & Concurrency:
    • Improved SSE session handling for client reconnections (relying on server-sent endpoint events) and support for concurrent connections.
    • Streamable HTTP endpoint (/mcp) also supports concurrent client interactions.
  • 🚀 Versatile MCP Operations (Server & Proxy):
    • Acts as a Proxy: Connects to and aggregates multiple backend MCP servers of various types (Stdio, SSE, Streamable HTTP).
    • Acts as a Server: Exposes these aggregated capabilities through its own Streamable HTTP (/mcp) and SSE (/sse) endpoints. Can also run in a pure Stdio mode.
  • ✨ Real-time Install Output: Monitor Stdio server installation progress (stdout/stderr) directly in the Web UI.
  • ✨ Web Terminal: Access a command-line terminal within the Admin UI for direct server interaction (optional, use with caution due to security risks).

This server acts as a central hub for Model Context Protocol (MCP) resource servers. It can:

  • Connect to and manage multiple backend MCP servers (Stdio, SSE, and Streamable HTTP types).
  • Expose their combined capabilities (tools, resources) through a single, unified SSE interface, a Streamable HTTP interface, or act as a single Stdio-based MCP server itself.
  • Handle routing of requests to the appropriate backend servers.
  • Aggregate responses if needed (though primarily acts as a proxy).
  • Support multiple simultaneous SSE client connections with optional API key authentication.

Features

Resource & Tool Management via Proxy

  • Discovers and connects to multiple MCP resource servers defined in config/mcp_server.json.
  • Aggregates tools and resources from all connected active servers.
  • Routes tool calls and resource access requests to the correct backend server.
  • Maintains consistent URI schemes.

✨ Optional Web Admin UI (ENABLE_ADMIN_UI=true)

Provides a browser-based interface for managing the proxy server configuration and connected tools. Features include:

  • Server Configuration: View, add, edit, and delete server entries (mcp_server.json). Supports Stdio, SSE, and HTTP server types with relevant options (type, command, args, env, url, apiKey, bearerToken, install config).
  • Tool Configuration: View all tools discovered from active backend servers. Enable or disable specific tools. Override the display name and description for each tool (tool_config.json).
GitHub で README 全文を見る

インストール

docker run -d \
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "unique-server-key1": { "type": "stdio", "name": "My Stdio Server", "active": true, "command": "/path/to/server/executable", "args": ["--port", "1234"], "env": { "API_KEY": "server_specific_key" }, "installDirectory": "/custom_install_path/unique-server-key1", "installCommands": [ "git clone https://github.com/some/repo unique-server-key1", "cd unique-server-key1 && npm install && npm run build" ] }, "another-sse-server": { "type": "sse", "name": "My SSE Server", "active": true, "url": "http://localhost:8080/sse", "apiKey": "sse_server_api_key" }, "http-mcp-server": { "type": "http", "name": "My Streamable HTTP Server", "active": true, "url": "http://localhost:8081/mcp", "bearerToken": "some_secure_token_for_http_server" }, "stdio-default-install": { "type": "stdio", "name": "Stdio Server with Default Install Path", "active": true, "command": "my_other_server", "installCommands": ["echo 'Installing to default location...'"] } } }