/ Verzeichnis / Playground / mcphub
● Community samanhappy ⚡ Sofort

mcphub

von samanhappy · samanhappy/mcphub

Run all your MCP servers behind one endpoint — group them, smart-route by vector search, hot-swap configs without downtime.

MCPHub is a TypeScript hub that mounts many MCP servers under a single HTTP endpoint with routing by group, by server, or via a vector-search 'smart' router. OAuth, social login, PostgreSQL mode for production. Docker is the recommended deploy.

Warum nutzen

Hauptfunktionen

Live-Demo

In der Praxis

mcphub.replay ▶ bereit
0/0

Installieren

Wählen Sie Ihren Client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "mcphub": {
      "command": "npx",
      "args": [
        "-y",
        "mcphub"
      ],
      "_inferred": true
    }
  }
}

Öffne Claude Desktop → Settings → Developer → Edit Config. Nach dem Speichern neu starten.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "mcphub": {
      "command": "npx",
      "args": [
        "-y",
        "mcphub"
      ],
      "_inferred": true
    }
  }
}

Cursor nutzt das gleiche mcpServers-Schema wie Claude Desktop. Projektkonfiguration schlägt die globale.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "mcphub": {
      "command": "npx",
      "args": [
        "-y",
        "mcphub"
      ],
      "_inferred": true
    }
  }
}

Klicken Sie auf das MCP-Servers-Symbol in der Cline-Seitenleiste, dann "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "mcphub": {
      "command": "npx",
      "args": [
        "-y",
        "mcphub"
      ],
      "_inferred": true
    }
  }
}

Gleiche Struktur wie Claude Desktop. Windsurf neu starten zum Übernehmen.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "mcphub",
      "command": "npx",
      "args": [
        "-y",
        "mcphub"
      ]
    }
  ]
}

Continue nutzt ein Array von Serverobjekten statt einer Map.

~/.config/zed/settings.json
{
  "context_servers": {
    "mcphub": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "mcphub"
        ]
      }
    }
  }
}

In context_servers hinzufügen. Zed lädt beim Speichern neu.

claude mcp add mcphub -- npx -y mcphub

Einzeiler. Prüfen mit claude mcp list. Entfernen mit claude mcp remove.

Anwendungsfälle

Praxisnahe Nutzung: mcphub

How to expose 20 MCP servers through one URL for your team

👤 Platform engineers, team leads ⏱ ~30 min intermediate

Wann einsetzen: Engineers keep copy-pasting local configs and breaking each other's setups.

Voraussetzungen
  • Docker and a server with a DNS name — Any cheap VPS works; use Caddy or nginx for TLS
  • mcp_settings.json listing your servers — Start from the MCPHub sample and add one entry per MCP
Ablauf
  1. Deploy the hub
    Run: docker run -p 3000:3000 -v $PWD/mcp_settings.json:/app/mcp_settings.json samanhappy/mcphub✓ Kopiert
    → Admin login URL + generated password in logs
  2. Create groups
    In the admin UI, create groups 'dev' (github, filesystem, postgres) and 'data' (postgres, bigquery).✓ Kopiert
    → Groups visible at /mcp/dev and /mcp/data
  3. Distribute the URL
    Share https://mcp.yourco.internal/mcp/dev with the team; they add it as a single HTTP MCP in their client.✓ Kopiert
    → Team members connect with one config line

Ergebnis: A single operable endpoint replaces 20 per-machine setups.

Fallstricke
  • Leaking the admin password from Docker logs — Set ADMIN_PASSWORD env var explicitly; rotate on first login
  • Exposing the hub to the public internet — Put it behind a VPN or require bearer tokens per user

How to let $smart pick the right MCP for a prompt automatically

👤 Teams running too many tools to fit in a single context ⏱ ~15 min advanced

Wann einsetzen: You have 200+ tools across MCPs and blow past your model's tool budget.

Ablauf
  1. Enable the $smart endpoint
    Point your client at https://hub.example.com/mcp/$smart instead of a specific server.✓ Kopiert
    → Single meta-tool exposed that routes on intent
  2. Prompt naturally
    Find PRs in github.com/org/repo that are waiting on me and put them on my calendar as a 30-min review slot.✓ Kopiert
    → Hub picks github + google-calendar tools behind the scenes

Ergebnis: Fewer tools in context, same capability.

Fallstricke
  • Smart router picks the wrong MCP on ambiguous prompts — Keep the per-group endpoints available as a fallback

How to add a new MCP server to the hub without downtime

👤 Operators ⏱ ~5 min beginner

Wann einsetzen: A new MCP just dropped and you want it live today without kicking everyone off.

Ablauf
  1. Edit mcp_settings.json via the UI
    In the MCPHub dashboard, add a new server entry and save.✓ Kopiert
    → Hot reload notification, new tools appear
  2. Assign to a group
    Add the new server to the 'data' group.✓ Kopiert
    → /mcp/data now includes the new tools

Ergebnis: New MCP online in under a minute, no client reconnects required.

Kombinationen

Mit anderen MCPs für 10-fache Wirkung

mcphub + toolhive

Use ToolHive to containerize the individual MCPs, MCPHub to route to them

Register my ToolHive-run github MCP in MCPHub under the 'dev' group.✓ Kopiert
mcphub + proxy

Expose stdio-only MCPs over HTTP for the hub

Use mcp-proxy to bridge my local stdio MCP to HTTP so MCPHub can mount it.✓ Kopiert

Werkzeuge

Was dieses MCP bereitstellt

WerkzeugEingabenWann aufrufenKosten
(meta) route-by-group HTTP path /mcp/{group} Regular use — narrow your blast radius free
(meta) route-by-server /mcp/{server} When you want exactly one server's surface free
(meta) $smart semantic router /mcp/$smart When you have too many tools for context 1 vector search per call

Kosten & Limits

Was der Betrieb kostet

API-Kontingent
None imposed by the hub; downstream MCPs keep their own quotas
Tokens pro Aufruf
Adds ~50 tokens of tool metadata overhead
Kosten in €
Free (open source, Apache 2.0)
Tipp
Use group routes, not $smart, for deterministic behavior and zero extra vector-search cost.

Sicherheit

Rechte, Secrets, Reichweite

Minimale Scopes: Bearer token per user Network-level restriction to trusted clients
Credential-Speicherung: ADMIN_PASSWORD env var; downstream MCP secrets via mcp_settings.json or secret manager
Datenabfluss: The hub only proxies — your data goes wherever each downstream MCP sends it
Niemals gewähren: Public exposure without auth Admin UI on the open internet

Fehlerbehebung

Häufige Fehler und Lösungen

Cannot log in / password unknown

Check the container logs on first boot for the generated password or set ADMIN_PASSWORD.

Prüfen: docker logs mcphub | grep -i password
New MCP shows up but no tools

The downstream MCP probably failed to start. Click 'Logs' on the server card.

Smart router returns 'no matching tool'

Reindex the vector store from Settings > Index tools.

OAuth redirect mismatch

Register the exact callback URL in your OAuth provider (must match hub's public URL).

Alternativen

mcphub vs. andere

AlternativeWann stattdessenKompromiss
Unla (MCP Gateway)You want YAML-driven REST-to-MCP conversion plus multi-tenantGo-based, different operator model
ToolHiveYou want container-level isolation per MCPFocuses on running MCPs, less on routing/aggregation
mcp-proxyYou just need transport bridging, not multi-server aggregationSingle-server; no UI

Mehr

Ressourcen

📖 Offizielle README auf GitHub lesen

🐙 Offene Issues ansehen

🔍 Alle 400+ MCP-Server und Skills durchsuchen