- Explore MCP Servers
- mcp-superassistant-proxy
Mcp Superassistant Proxy
What is Mcp Superassistant Proxy
MCP SuperAssistant Proxy is a robust proxy server designed for the Model Context Protocol (MCP) that aggregates multiple MCP servers while ensuring memory safety and providing reliable HTTP/SSE transport. It aims to facilitate better communication and data exchange for applications, especially Chrome extensions, by preventing memory leaks and optimizing data flow.
Use cases
The proxy can be employed in various scenarios including aggregating multiple MCP servers into a single endpoint, bridging different transport types (such as stdio and HTTP/SSE), and ensuring robust data exchange for applications needing seamless integration with AI tools. It is particularly useful for developers building browser extensions or web applications that require reliable communication with MCP-compatible servers.
How to use
To use MCP SuperAssistant Proxy, install it globally with npm or via npx for direct execution. Set up a configuration file to specify MCP servers to connect to, including stdio and remote HTTP/SSE servers. Run the proxy with the specified configuration and port, and connect your client applications to the provided endpoints for data communication.
Key features
Key features of the MCP SuperAssistant Proxy include comprehensive memory safety with automatic cleanup, robust error handling, support for both HTTP and SSE transports, cross-platform compatibility, data flow optimization to avoid caching, and specifically tailored functionality for Chrome extensions.
Where to use
The proxy can be utilized in any environment that requires MCP server communication, such as web applications, Chrome extensions, and other client-side applications needing stable data exchange with AI tools. It is suitable for developers looking to manage multiple MCP servers efficiently and maintain high-performance data flow while minimizing resource consumption.
Overview
What is Mcp Superassistant Proxy
MCP SuperAssistant Proxy is a robust proxy server designed for the Model Context Protocol (MCP) that aggregates multiple MCP servers while ensuring memory safety and providing reliable HTTP/SSE transport. It aims to facilitate better communication and data exchange for applications, especially Chrome extensions, by preventing memory leaks and optimizing data flow.
Use cases
The proxy can be employed in various scenarios including aggregating multiple MCP servers into a single endpoint, bridging different transport types (such as stdio and HTTP/SSE), and ensuring robust data exchange for applications needing seamless integration with AI tools. It is particularly useful for developers building browser extensions or web applications that require reliable communication with MCP-compatible servers.
How to use
To use MCP SuperAssistant Proxy, install it globally with npm or via npx for direct execution. Set up a configuration file to specify MCP servers to connect to, including stdio and remote HTTP/SSE servers. Run the proxy with the specified configuration and port, and connect your client applications to the provided endpoints for data communication.
Key features
Key features of the MCP SuperAssistant Proxy include comprehensive memory safety with automatic cleanup, robust error handling, support for both HTTP and SSE transports, cross-platform compatibility, data flow optimization to avoid caching, and specifically tailored functionality for Chrome extensions.
Where to use
The proxy can be utilized in any environment that requires MCP server communication, such as web applications, Chrome extensions, and other client-side applications needing stable data exchange with AI tools. It is suitable for developers looking to manage multiple MCP servers efficiently and maintain high-performance data flow while minimizing resource consumption.
Content
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
Recommended Setup
# 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 <path>
: (required) Path to a JSON configuration file (see below)--port <number>
: Port to run the HTTP server on (default:3006
)--logLevel <info|none>
: Set logging level (default:info
)--timeout <ms>
: Connection timeout in milliseconds (default:30000
)
Available Endpoints
When running, the proxy exposes:
- Modern HTTP:
http://localhost:<port>/mcp
- Streamable HTTP transport (recommended) - Legacy SSE:
http://localhost:<port>/sse
- Server-Sent Events transport - Health Check:
http://localhost:<port>/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": "<your_notion_token_here>"
}
},
"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 optionallyenv
- 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:
π‘οΈ Memory Management
- Automatic session cleanup - Stale sessions cleaned every 2 minutes
- Data flow optimization - Data passes through without being cached in memory
- Resource tracking - All intervals, timeouts, and connections tracked
- Graceful shutdown - Complete cleanup on exit
- Reference clearing - Explicit garbage collection hints
β‘ Reliability Features
- Connection stability - Robust error handling and recovery
- Timeout protection - All operations have timeouts to prevent hanging
- Transport fallback - Automatic fallback from modern to legacy transports
- Process monitoring - Automatic cleanup of disconnected child processes
- Error boundaries - Isolated error handling prevents cascading failures
π Data Flow Optimization
- Zero data caching - Large data objects pass through without being stored
- Immediate cleanup - References cleared immediately after data transfer
- Memory monitoring - Proactive memory leak prevention
- Performance tracking - Built-in performance monitoring
Transport Compatibility
The proxy provides automatic backwards compatibility between different MCP transport versions:
Client-Side Compatibility
- Modern clients β Connect to
/mcp
for Streamable HTTP transport - Legacy clients β Connect to
/sse
for Server-Sent Events transport - Automatic fallback β Clients can try modern first, fall back to legacy
Server-Side Compatibility
- Remote HTTP servers β Tries Streamable HTTP first, falls back to SSE
- Stdio servers β Native subprocess communication
- Mixed environments β Seamlessly handles different server types
Quick Example
-
Create a config file:
mkdir -p ~/.mcp-superassistant cat > ~/.mcp-superassistant/config.json << 'EOF' { "mcpServers": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"] } } } EOF
-
Run the proxy:
npx -y @leeroy/mcp-superassistant-proxy@latest --config ~/.mcp-superassistant/config.json --port 3006
-
Connect your client to
http://localhost:3006/mcp
Why MCP?
Model Context Protocol standardizes how AI tools exchange data. This proxy allows you to:
- Aggregate multiple MCP servers behind a single endpoint
- Bridge different transports (stdio β HTTP/SSE)
- Ensure reliability with bulletproof memory management
- Scale safely with built-in monitoring and limits
Advanced Features
Automatic Protocol Detection
- JSON-RPC version automatically derived from requests
- Transport negotiation between client and server
- Backwards compatibility maintained across MCP versions
Production Ready
- Memory leak prevention - Comprehensive resource management
- Error isolation - Failures donβt cascade between servers
- Performance monitoring - Built-in metrics and logging
- Graceful degradation - Continues working when individual servers fail
Chrome Extension Optimized
- Content script proxy pattern - Reliable browser networking
- Zero data retention - Large data flows through without caching
- Timeout handling - No hanging requests
- Reference cleanup - Explicit garbage collection
Version History
v0.1.0 - Memory Safety Release
- β Comprehensive memory leak fixes
- β WebSocket removal (HTTP/SSE only)
- β Data flow optimization - No data caching/retention
- β Bulletproof resource management
- β Chrome extension reliability improvements
For more details, see the Model Context Protocol documentation.