Logo vun mcp-proxy

mcp-proxy

Communautéit
stephenlacy

Fast rust MCP proxy between stdio and SSE

Editeurstephenlacy
Repositorymcp-proxy
SproochRust
Forks
8
Stären
33
Disponibel Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    mcp-proxy stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    33 Stären an 8 Forks aus dem verlinkte Repository.

mcp-proxy

A Rust bidirectional MCP proxy supporting SSE and Streamable HTTP transports with OAuth.

Features

  • Multiple transports: SSE and Streamable HTTP
  • OAuth authentication: Full OAuth flow with automatic token refresh
  • Bidirectional proxy: Connect remote servers to local clients or expose local servers remotely
  • Fast and lightweight: Built in rust for performance

Usage

Installing

bash
# from crates.io
cargo install rmcp-proxy
# from github
cargo install --git https://github.com/stephenlacy/mcp-proxy

Building

bash
cargo build --release

Running

The proxy can operate in two modes:

1. Remote Client Mode

Connect to a remote MCP server and expose it as a local stdio server. Supports both SSE and Streamable HTTP transports with automatic detection.

Transport Detection:

  • URLs containing /sse → Uses SSE transport
  • All other URLs → Uses Streamable HTTP transport
  • Override with --transport flag
Basic Examples
bash
# Streamable HTTP
mcp-proxy http://localhost:9090/mcp/instances_abc123

# SSE transport
mcp-proxy http://localhost:8080/sse
mcp-proxy --transport sse http://localhost:8080/events

# Specific
mcp-proxy --transport streamable-http http://localhost:9090/api
Using with Claude or Cursor
json
{
  "mcpServers": {
    "my-remote-server": {
      "command": "mcp-proxy",
      "args": ["http://example.com/mcp/instances_abc123"]
    },
    "sse-server": {
      "command": "mcp-proxy", 
      "args": ["--transport", "sse", "http://example.com/sse"]
    }
  }
}

2. Local Server Mode

Connect to a local MCP server via stdio and expose it as a remote server. Supports both SSE and Streamable HTTP endpoints.

bash
# Expose as SSE server
mcp-proxy --port 8080 -- your-command --arg1 value1 --arg2 value2
mcp-proxy --port 8080 python mcp_server.py
mcp-proxy --port 8080 -- npx -y @modelcontextprotocol/server-everything

# Or http+streamable
mcp-proxy --port 9090 --transport streamable-http -- python mcp_server.py

mcp-proxy --port 8080 -e KEY VALUE -e ANOTHER_KEY ANOTHER_VALUE -- your-command

Authentication Management

Clearing Auth Cache

If you encounter authentication issues, clear the auth cache:

bash
# Clear all auth data
mcp-proxy reset

# Or manually delete the directory
rm -rf ~/.mcp-auth

Command Line Options

bash
# Transport selection
--transport <TRANSPORT>    # sse, streamable-http, or auto (default: auto)

# Server mode options
--port <PORT>             # Port for local server mode (default: random)
--host <HOST>             # Host to bind to (default: 127.0.0.1)

# Environment variables (server mode)
-e, --env <KEY> <VALUE>   # Set environment variable
--pass-environment        # Pass through all environment variables

# Headers (client mode) 
-H, --headers <KEY> <VALUE>  # Add custom headers

# Reset auth
mcp-proxy reset           # Clear all stored auth data

Logging

The upstream rmcp crate dumps noisy logs unfortunately

Control log verbosity with the RUST_LOG environment variable:

bash
# Minimal logging
RUST_LOG=error mcp-proxy http://example.com/mcp
RUST_LOG=debug mcp-proxy http://example.com/mcp
RUST_LOG=info mcp-proxy http://example.com/mcp

Library Usage

rust
use rmcp_proxy::{
    sse_client::run_sse_client,
    streamable_http_client::run_streamable_http_client,
    StreamableHttpClientConfig, SseClientConfig
};

// Streamable HTTP client
let config = StreamableHttpClientConfig {
    url: "http://example.com/mcp/instances_abc123".to_string(),
    headers: HashMap::new(),
};
run_streamable_http_client(config).await?;

// SSE client  
let config = SseClientConfig {
    url: "http://example.com/sse".to_string(),
    headers: HashMap::new(),
};
run_sse_client(config).await?;

License

MIT

Installatioun

TypingMind
{
  "mcpServers": {
    "mcp-proxy": {
      "command": "mcp-proxy",
      "args": []
    }
  }
}

mcp-proxy MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal mcp-proxy verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

mcp-proxy als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu mcp-proxy an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "mcp-proxy": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu mcp-proxy. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu mcp-proxy.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat mcp-proxy?
mcp-proxy
Jo. Ech hunn et gelies.
Dat hunn ech mat mcp-proxy fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server mcp-proxy benotzt?

mcp-proxy ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech mcp-proxy MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir mcp-proxy mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat mcp-proxy MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann mcp-proxy verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech mcp-proxy MCP mat TypingMind?

mcp-proxy leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt mcp-proxy MCP an TypingMind zur Verfügung?

mcp-proxy stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir mcp-proxy MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann mcp-proxy eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇