LM

leeroybrun/mcp-superassistant-proxy

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

11 stars 5 forks 质量 52 趋势 8

A **bulletproof proxy server** for MCP (Model Context Protocol) that aggregates multiple MCP servers with comprehensive memory leak prevention and reliable HTTP/SSE transport.

概览

A for MCP (Model Context Protocol) that aggregates multiple MCP servers with comprehensive memory leak prevention and reliable HTTP/SSE transport. Perfect for Chrome extensions and web applications. - - Comprehensive memory leak prevention and automatic cleanup - - Robust error handling and resource management - - HTTP and SSE support for maximum compatibility - - Works on macOS, Linux, and Windows - - Data passes through without being cached in memory - - Optimized for browser extension communication - --config, -c : Path to a JSON configuration file (see below) - --port : Port to run the HTTP server on (default: 3006) - --logLevel : Set logging level (default: info) - --timeout : Connection timeout in milliseconds (default: 30000) When running, the proxy exposes: - : http://localhost: /mcp - Streamable HTTP transport (recommended) - : http://localhost: /sse - Server-Sent Events transport - : http://localhost: /health - Returns server status The configuration file is a JSON file...

README

以下为原文 README 节选,完整内容请查看原文。

MCP SuperAssistant Proxy

A bulletproof proxy server for MCP (Model Context Protocol) that aggregates multiple MCP servers with comprehensive memory leak prevention and reliable HTTP/SSE transport. Perfect for Chrome extensions and web applications.

🚀 Features:

  • 🛡️ Memory-Safe - Comprehensive memory leak prevention and automatic cleanup
  • ⚡ Bulletproof - Robust error handling and resource management
  • 🌐 Multi-Transport - HTTP and SSE support for maximum compatibility
  • 🔧 Cross-Platform - Works on macOS, Linux, and Windows
  • 📊 Data Flow Optimization - Data passes through without being cached in memory
  • 🎯 Chrome Extension Ready - Optimized for browser extension communication

Installation & Usage

Quick Start

# Install globally for easy access
npm install -g @leeroy/mcp-superassistant-proxy

# Or run directly with npx
npx -y @leeroy/mcp-superassistant-proxy@latest --config config.json --port 3006
# Create config directory
mkdir -p ~/.mcp-superassistant

# Create your config file
echo '{"mcpServers": {}}' > ~/.mcp-superassistant/config.json

# Run the proxy
mcp-superassistant-proxy --config ~/.mcp-superassistant/config.json --port 3006

CLI Options

  • --config, -c : (required) Path to a JSON configuration file (see below)
  • --port : Port to run the HTTP server on (default: 3006)
  • --logLevel : Set logging level (default: info)
  • --timeout : Connection timeout in milliseconds (default: 30000)

Available Endpoints

When running, the proxy exposes:

  • Modern HTTP: http://localhost:/mcp - Streamable HTTP transport (recommended)
  • Legacy SSE: http://localhost:/sse - Server-Sent Events transport
  • Health Check: http://localhost:/health - Returns server status

Configuration File

The configuration file is a JSON file specifying which MCP servers to connect to. Each server can be either a stdio-based server (run as a subprocess) or a remote HTTP/SSE server.

Example config.json

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
      "env": {}
    },
    "notion": {
      "command": "npx",
      "args": ["-y", "@suekou/mcp-notion-server"],
      "env": {
        "NOTION_API_TOKEN": ""
      }
    },
    "remote-server": {
      "url": "https://your-remote-mcp-server.com/mcp"
    },
    "desktop-commander": {
      "command": "npx",
      "args": ["-y", "@wonderwhy-er/desktop-commander"]
    }
  }
}

Configuration Options

  • For stdio servers: Use command, args, and optionally env
  • For remote servers: Use url pointing to the MCP endpoint
  • Each key under mcpServers is a unique name for the server

Memory Safety & Reliability

This proxy is designed to be bulletproof with comprehensive memory leak prevention:

在 GitHub 查看完整 README

安装

npx -y @modelcontextprotocol/server-filesystem /tmp
新手?先看 mcpskill.org 教程 →

配置

# Create config directory mkdir -p ~/.mcp-superassistant # Create your config file echo '{"mcpServers": {}}' > ~/.mcp-superassistant/config.json # Run the proxy mcp-superassistant-proxy --config ~/.mcp-superassistant/config.json --port 3006