/ Verzeichnis / Playground / mcp-proxy
● Community sparfenyuk ⚡ Sofort

mcp-proxy

von sparfenyuk · sparfenyuk/mcp-proxy

Bridge stdio MCPs to SSE/Streamable HTTP and vice versa — one tiny Python tool that makes transports interoperate.

sparfenyuk/mcp-proxy is a transport bridge. Two modes: (1) stdio client connecting to a remote SSE/HTTP MCP — lets Claude Desktop talk to a remote server; (2) SSE server wrapping a local stdio MCP — exposes it over HTTP with CORS, auth, multiple named servers.

Warum nutzen

Hauptfunktionen

Live-Demo

In der Praxis

proxy.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": {
    "proxy": {
      "command": "uvx",
      "args": [
        "mcp-proxy"
      ],
      "_inferred": true
    }
  }
}

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

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

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

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "proxy": {
      "command": "uvx",
      "args": [
        "mcp-proxy"
      ],
      "_inferred": true
    }
  }
}

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

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "proxy": {
      "command": "uvx",
      "args": [
        "mcp-proxy"
      ],
      "_inferred": true
    }
  }
}

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

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "proxy",
      "command": "uvx",
      "args": [
        "mcp-proxy"
      ]
    }
  ]
}

Continue nutzt ein Array von Serverobjekten statt einer Map.

~/.config/zed/settings.json
{
  "context_servers": {
    "proxy": {
      "command": {
        "path": "uvx",
        "args": [
          "mcp-proxy"
        ]
      }
    }
  }
}

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

claude mcp add proxy -- uvx mcp-proxy

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

Anwendungsfälle

Praxisnahe Nutzung: mcp-proxy

How to use a remote SSE MCP server inside Claude Desktop

👤 Devs with a team-hosted MCP gateway ⏱ ~10 min beginner

Wann einsetzen: Your team runs a gateway at https://mcp.team.internal but Claude Desktop only speaks stdio.

Voraussetzungen
  • uv or pipx — brew install uv
Ablauf
  1. Install mcp-proxy
    Run: uv tool install mcp-proxy✓ Kopiert
    → mcp-proxy on PATH
  2. Configure Claude Desktop
    Add an MCP entry: command=mcp-proxy, args=['--headers','Authorization','Bearer $TOKEN','https://mcp.team.internal/sse'].✓ Kopiert
    → Claude Desktop connects on restart
  3. Verify
    In Claude, ask: what tools do you have?✓ Kopiert
    → Remote tools listed

Ergebnis: Remote server usable from stdio-only clients.

Fallstricke
  • Auth header not picked up — Use --headers syntax exactly; some clients mangle env var interpolation — expand the token yourself
Kombinieren mit: mcphub

How to expose a local stdio MCP over HTTP for remote teammates

👤 Devs sharing a local tool temporarily ⏱ ~15 min intermediate

Wann einsetzen: You built a custom stdio MCP and a remote colleague wants to try it.

Ablauf
  1. Run proxy in inbound mode
    mcp-proxy --sse-host 0.0.0.0 --sse-port 3333 --named-server my-tool 'uvx my-tool-mcp'✓ Kopiert
    → SSE endpoint at :3333/my-tool/sse
  2. Tunnel it
    Use ngrok or cloudflared to expose 3333 on a public URL.✓ Kopiert
    → Shareable URL
  3. Teammate connects
    They add the URL to their client (via mcp-proxy or directly if their client supports SSE).✓ Kopiert
    → Shared session working

Ergebnis: Ad-hoc sharing of local tools.

Fallstricke
  • No auth by default — Use --bearer-token or put it behind Caddy basic auth

How to serve multiple local MCPs from one proxy port

👤 Homelab tinkerers ⏱ ~15 min intermediate

Wann einsetzen: You want one gateway serving github, filesystem, and postgres MCPs.

Ablauf
  1. Start with multiple --named-server args
    mcp-proxy --sse-port 3333 --named-server gh 'uvx mcp-server-github' --named-server fs 'uvx mcp-server-filesystem ~/src'✓ Kopiert
    → Endpoints /gh/sse and /fs/sse
  2. Connect each in your client
    Add each as a separate server in your MCP client.✓ Kopiert
    → Tools from both appear

Ergebnis: One process, many MCPs.

Fallstricke
  • Named servers share the proxy's resource budget — Don't put heavyweight MCPs in the same proxy as lightweight ones
Kombinieren mit: mcphub

Kombinationen

Mit anderen MCPs für 10-fache Wirkung

proxy + mcphub

Use mcp-proxy to expose stdio MCPs that MCPHub can then aggregate over HTTP

Bridge my local github stdio MCP to HTTP with mcp-proxy, then register it in MCPHub's 'dev' group.✓ Kopiert
proxy + unla

Use Unla's public-facing gateway on top of mcp-proxy's last-mile stdio bridge

Bridge stdio MCPs with mcp-proxy and put Unla in front for OAuth + multi-tenancy.✓ Kopiert

Werkzeuge

Was dieses MCP bereitstellt

WerkzeugEingabenWann aufrufenKosten
(proxy) stdio-to-sse remote_url, headers?, bearer? Connect stdio client to remote SSE server free
(proxy) sse-to-stdio named_server spec Expose a stdio MCP over HTTP free

Kosten & Limits

Was der Betrieb kostet

API-Kontingent
None
Tokens pro Aufruf
No measurable overhead
Kosten in €
Free (MIT)
Tipp
Skip proxy when your client natively supports the other transport — fewer moving parts.

Sicherheit

Rechte, Secrets, Reichweite

Minimale Scopes: Network egress to the remote URL (outbound mode) Inbound port binding (inbound mode)
Credential-Speicherung: Headers/tokens passed via CLI args or env
Datenabfluss: Whatever the bridged MCP does; proxy itself is transparent
Niemals gewähren: Don't expose inbound mode on 0.0.0.0 without auth Don't log tokens in shell history — use env vars

Fehlerbehebung

Häufige Fehler und Lösungen

Connection closed immediately

The remote URL path is wrong — SSE endpoints typically end in /sse.

Prüfen: curl -N <url>
CORS error in browser client

Start mcp-proxy with --allow-origin or put it behind a reverse proxy with CORS headers.

401 even with --bearer-token

The remote expects the token on a different header (e.g., X-API-Key). Use --headers to customize.

SSE drops after 60s

Load balancer idle timeout. Raise it or use Streamable HTTP.

Alternativen

mcp-proxy vs. andere

AlternativeWann stattdessenKompromiss
MCPHubYou need multi-server aggregation + routing, not just a bridgeHeavier — UI, DB, OAuth all bundled
UnlaYou want REST-to-MCP conversion + gatewayDifferent problem space
supergatewayYou prefer a JavaScript stdio-to-SSE bridgeNode dependency

Mehr

Ressourcen

📖 Offizielle README auf GitHub lesen

🐙 Offene Issues ansehen

🔍 Alle 400+ MCP-Server und Skills durchsuchen