mcp-streamable-proxy 0.1.5

Streamable HTTP proxy implementation for MCP protocol using rmcp 0.12
Documentation

MCP Streamable HTTP Proxy Module

This module provides a proxy implementation for MCP (Model Context Protocol) using Streamable HTTP transport with stateful session management.

Features

  • Streamable HTTP Support: Uses rmcp 0.12 with enhanced Streamable HTTP transport
  • Stateful Sessions: Custom SessionManager with backend version tracking
  • Hot Swap: Supports backend connection replacement without downtime
  • Version Control: Automatically invalidates sessions when backend reconnects
  • High-level Client API: Simple connection interface hiding transport details

Architecture

Client → Streamable HTTP → ProxyAwareSessionManager → ProxyHandler → Backend MCP Service
                                   ↓
                           Version Tracking
                           (DashMap<SessionId, BackendVersion>)

Example

use mcp_streamable_proxy::{StreamClientConnection, McpClientConfig};

// Connect to an MCP server
let config = McpClientConfig::new("http://localhost:8080/mcp");
let conn = StreamClientConnection::connect(config).await?;

// List available tools
let tools = conn.list_tools().await?;