Expand description
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
§Architecture
Client → Streamable HTTP → ProxyAwareSessionManager → ProxyHandler → Backend MCP Service
↓
Version Tracking
(DashMap<SessionId, BackendVersion>)Re-exports§
pub use proxy_handler::ProxyHandler;pub use session_manager::ProxyAwareSessionManager;pub use server::run_stream_server;pub use server::run_stream_server_from_config;
Modules§
- config
- Configuration types for Streamable HTTP proxy
- proxy_
handler - server
- Streamable HTTP server implementation
- session_
manager - Session Manager with backend version tracking
Structs§
- McpService
Config - MCP 服务配置
- Peer
- An interface to fetch the remote client or server
- Role
Client - Role
Server - Running
Service - Tool
Filter - 工具过滤配置