mcp-proxy
A Rust bidirectional MCP proxy between stdio and SSE. Based initially on sparfenyuk/mcp-proxy
Features
- Connect to a remote server over SSE and expose it as a stdio server
- Connect to a local server using stdio and expose it as an SSE server
- Fast startup with minimal memory usage
Usage
Installing
# from crates.io
Building
Running
The proxy can operate in two modes:
1. SSE Client Mode
Connect to a remote MCP server over SSE and expose it as a stdio server.
This allows a local client such as Claude or Cursor connect to a remote server running on SSE.
Example
Using with Claude or Cursor
2. Stdio Client Mode
Connect to a local command using stdio and expose it as an SSE server.
This allows remote SSE connections to a local stdio server.
Using as a library
use ;
use ProxyHandler;
// Create SSE transport
let transport = start.await?;
let client_info = ClientInfo ;
// Create client service with transport
let client = client_info.serve.await?;
// Get server info
let server_info = client.peer_info;
info!;
// Create proxy handler
let proxy_handler = new;
// Create stdio transport
let stdio_transport = stdio;
// Create server with proxy handler and stdio transport
let server = proxy_handler.serve.await?;
License
MIT