PM 

ptbsare/mcp-proxy-server
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
196 stars 17 forks Качество 67 Тренд 0MIT
ptbsare/mcp-proxy-server — это кандидат на MCP-сервер, импортированный из https://github.com/ptbsare/mcp-proxy-server.
Обзор
ptbsare/mcp-proxy-server — это кандидат на MCP-сервер, импортированный из https://github.com/ptbsare/mcp-proxy-server.
Обзор (машинный перевод)
简体中文
✨ Ключевые особенности
- ** 🌐 Управление веб-интерфейсом:** Легко управлять всеми подключёнными MCP-серверами через интуитивно понятный веб-интерфейс (необязательно, требуется включение).
- ** 🔧 Детальное управление инструментами:** Включить или отключить отдельные инструменты, а также переопределить имена/описания через веб-интерфейс.
- ** 🛡️ Гибкая аутентификация конечных точек:** Защитите свои HTTP-ориентированные конечные точки (
/sse, [/mcp) с помощью гибких опций аутентификации (Authorization: BearerилиX-API-Key:). - ** 🔄 Надёжная обработка сессий и параллельность**:
- Улучшена обработка сессий SSE для повторных подключений клиентов (с использованием серверных событий
endpoint) и поддержка параллельных соединений. - Потоковая HTTP-конечная точка (
/mcp) также поддерживает одновременные взаимодействия с клиентами. - ** 🚀 Универсальные операции MCP (сервер и прокси):**
- Действует как прокси: Подключается и агрегирует несколько серверов MCP разных типов (Stdio, SSE, Streamable HTTP).
- Действует как сервер: Предоставляет эти агрегированные возможности через собственные кончаточные точки Streamable HTTP ([[T6]) и SSE (
/sse). Также может работать в чистом режиме Stdio. - ** ✨ Вывод установки в реальном времени**: Отслеживайте ход установки Stdio сервера (stdout/stderr) непосредственно в веб-интерфейсе.
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
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: BearerorX-API-Key:). - 🔄 Robust Session Handling & Concurrency:
- Improved SSE session handling for client reconnections (relying on server-sent
endpointevents) and support for concurrent connections. - Streamable HTTP endpoint (
/mcp) also supports concurrent client interactions.
- Improved SSE session handling for client reconnections (relying on server-sent
- 🚀 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).
Установка
docker run -d \Конфигурация
{
"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...'"]
}
}
}