McpHub
Health Uyari
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Gecti
- Code scan — Scanned 3 files during light audit, no dangerous patterns found
Permissions Gecti
- Permissions — No dangerous permissions requested
This Rust-based proxy acts as a central gateway between AI editors and your MCP servers. It reduces context token usage by exposing only two generalized tools (discover and execute) to the AI instead of loading every tool directly.
Security Assessment
Overall risk: Medium. The server runs as a persistent background daemon on localhost (port 24680) and requires authorization via a Bearer token, which is an excellent security practice. However, because it serves as a proxy to dynamically route commands, it inherently facilitates the execution of shell commands and arbitrary operations through your underlying MCP servers. The light code scan found no dangerous patterns or hardcoded secrets, and the project requests no overly broad system permissions itself. Users must still trust the backend servers being routed through this proxy.
Quality Assessment
Overall quality: Early stage. The project is highly active (last updated today) but suffers from extremely low community visibility, having only 5 stars. It is properly licensed under the permissive MIT license. The single-binary architecture written in Rust is appealing for performance and easy distribution. While the codebase passed the automated security scan, the low visibility means it has not undergone widespread community auditing or battle-testing.
Verdict
Use with caution. The code itself is clean and utilizes safe authentication practices, but the lack of community vetting combined with its role as a central execution proxy warrants careful oversight.
One proxy to rule all your MCP servers. Web dashboard, BM25 discovery, 99% token savings. Single binary.
One proxy to rule all your MCP servers.
SSE transport · Auth · Connection pooling · Dashboard with metrics · ~99% context savings · Zero dependencies
What is McpHub?
McpHub is a single Rust binary that sits between your AI editor (Cursor, Claude Desktop, Windsurf) and all your MCP servers. Instead of loading 20+ servers with 200+ tool definitions into every prompt (~20,000 tokens), the editor sees only 2 tools: discover and execute. Token savings: ~99%.
McpHub runs as a persistent daemon. Your editor connects via SSE URL instead of spawning a process. If Cursor crashes or restarts, McpHub stays alive and reconnects instantly. No manual refresh, no lost state.
Install
From source
git clone https://github.com/Soflution1/McpHub.git
cd McpHub
./install.sh
The install script builds the release binary (~1MB), installs to ~/.local/bin/McpHub, codesigns for macOS, and generates the tool cache.
Pre-built binaries
Download from GitHub Releases for macOS (ARM/Intel), Linux (amd64/arm64), and Windows.
Setup (SSE mode, recommended)
# 1. Generate tool cache (one-time, ~60s)
McpHub generate
# 2. Install as auto-start daemon
McpHub install
# 3. Configure your editor
Cursor (~/.cursor/mcp.json):
{
"mcpServers": {
"McpHub": {
"url": "http://127.0.0.1:24680/sse",
"headers": {
"Authorization": "Bearer <your-token>"
}
}
}
}
Your auth token is auto-generated on first run and stored in ~/.McpHub/auth-token. All SSE and API endpoints require it.
Setup (stdio mode)
If you prefer the editor to manage the process lifecycle:
{
"mcpServers": {
"McpHub": {
"command": "/Users/you/.local/bin/McpHub"
}
}
}
In this mode, McpHub also starts the HTTP server on :24680 in the background.
How It Works
Cursor (sees only 2 tools: discover + execute)
↓ SSE (http://127.0.0.1:24680/sse)
McpHub daemon (BM25 search, auth, connection pool)
↓ stdio (pooled connections)
Your MCP servers (spawned on demand, killed when idle)
Discover mode (default)
- LLM calls
discover("send email") - McpHub searches across all tools using BM25 ranking
- Returns matching tools with full schemas
- LLM calls
execute("resend", "send-email", {to: "...", ...}) - McpHub routes to the right server, calls the tool, returns result
Server names are resolved case-insensitively.
Passthrough mode
All tools exposed directly with server__tool prefix. Full visibility, higher token cost. Set "mode": "passthrough" in settings.
Dashboard
Open http://127.0.0.1:24680 or run McpHub dashboard.
Features:
- Add/edit/enable/disable servers with syntax-highlighted JSON
- Real-time metrics: calls per server, latency, error rates, uptime
- Live log streaming with server and level filters
- Rebuild cache in one click
- Token savings counter
Transport Modes
| Mode | Command | Editor config | Survives editor crash |
|---|---|---|---|
| SSE (recommended) | McpHub serve or McpHub install |
"url": "http://127.0.0.1:24680/sse" |
Yes |
| stdio | McpHub (default) |
"command": "/path/to/McpHub" |
No |
SSE uses TCP keepalive (15s probe, 5s interval, 3 retries), a session reaper for stale connections, and non-blocking sends to prevent slow clients from blocking the server.
CLI
McpHub # Start proxy (stdio + HTTP server on :24680)
McpHub serve # Start HTTP-only server (SSE daemon)
McpHub install # Register auto-start at login
McpHub uninstall # Remove auto-start
McpHub generate # Rebuild tool cache
McpHub dashboard # Open web dashboard
McpHub status # Show detected servers and cache info
McpHub search "git" # Test BM25 search
McpHub doctor # Full diagnostic (binary, config, cache, ports, daemon)
McpHub logs # Tail daemon logs (--server, --level filters)
McpHub add # Interactive wizard to add a server
McpHub benchmark # Measure start time, ping latency, tool count, RAM
McpHub export # Export config as encrypted bundle for sharing
McpHub import <file> # Import config bundle
McpHub update # Self-update from GitHub Releases
McpHub version # Show version
Security
McpHub generates a unique auth token on first run, stored in ~/.McpHub/auth-token. All HTTP endpoints (SSE, API, dashboard) require Authorization: Bearer <token>. CORS preflight is handled automatically.
If a server crashes during a tools/call, McpHub auto-restarts it and retries the call once before returning an error.
Connection Pooling
McpHub can maintain multiple instances of a server for parallel request handling. Configure per server:
{
"servers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_TOKEN": "ghp_xxx" },
"pool_size": 3
}
}
}
Requests are routed round-robin across pool instances. Default pool size is 1.
Protocol Support
McpHub implements the full MCP protocol as a proxy:
- Tools:
tools/list,tools/call(aggregated from all servers) - Resources:
resources/list,resources/read(aggregated) - Prompts:
prompts/list,prompts/get(aggregated) - Cancellation:
notifications/cancelledforwarded to child servers - Logging:
notifications/messagecaptured and forwarded - Version negotiation: Adapts to each server's supported protocol version
Configuration
Config lives in ~/.McpHub/config.json:
{
"servers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_TOKEN": "ghp_xxx" }
}
},
"settings": {
"mode": "discover",
"idleTimeout": 300,
"health": {
"checkInterval": 30,
"autoRestart": true,
"notifications": true
}
}
}
Health monitoring
McpHub pings running servers periodically. If one crashes, you get a native OS notification and the server is auto-restarted with exponential backoff (up to 3 attempts).
Hot reload
Edit config.json while the daemon is running. McpHub detects changes, diffs the config, stops removed servers, and starts new ones without a restart.
Performance
| Metric | Value |
|---|---|
| Binary size | ~1 MB |
| Startup | <5 ms |
| BM25 search (460 tools) | <0.01 ms |
| Context token savings | ~99% |
| RAM usage | ~5 MB |
| SSE keepalive overhead | ~40 bytes/15s |
| Runtime dependencies | None |
Cross-platform auto-start
McpHub install detects your OS and creates the appropriate auto-start entry:
| OS | Method | Location |
|---|---|---|
| macOS | LaunchAgent | ~/Library/LaunchAgents/com.soflution.mcphub.plist |
| Linux | systemd user service | ~/.config/systemd/user/mcphub.service |
| Windows | Registry Run key | HKCU\Software\Microsoft\Windows\CurrentVersion\Run |
Pre-built binaries available for macOS ARM, macOS Intel, Linux amd64, Linux arm64, and Windows x64.
Uninstall
McpHub uninstall
rm ~/.local/bin/McpHub
rm -rf ~/.McpHub
License
MIT - SOFLUTION LTD
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi