pub struct StreamableHttpClientConfig {
pub base_url: String,
pub endpoint_path: String,
pub timeout: Duration,
pub retry_policy: RetryPolicy,
pub auth_token: Option<String>,
pub headers: HashMap<String, String>,
pub user_agent: Option<String>,
pub protocol_version: String,
pub limits: LimitsConfig,
pub tls: TlsConfig,
pub sse_read_timeout: Duration,
}Expand description
Streamable HTTP client configuration
Fields§
§base_url: StringBase URL (e.g., https://api.example.com)
endpoint_path: StringMCP endpoint path (e.g., “/mcp”)
timeout: DurationRequest timeout
retry_policy: RetryPolicyAuto-reconnect policy
auth_token: Option<String>Authentication token
headers: HashMap<String, String>Custom headers
user_agent: Option<String>User agent string (set to None to disable User-Agent header)
Default: TurboMCP-Client/{version}
§Security Note
The User-Agent header can expose client version information. Consider:
- Setting to
Noneto disable User-Agent header entirely - Using a generic string like “MCP-Client” to minimize fingerprinting
- Keeping the default to aid server-side debugging and analytics
protocol_version: StringProtocol version to use
limits: LimitsConfigSize limits for requests and responses (v2.2.0+)
tls: TlsConfigTLS/HTTPS configuration (v2.2.0+)
sse_read_timeout: DurationIdle timeout between SSE chunks.
Guards against a silent TCP half-open where the server stops writing without closing the connection. If no chunk arrives within this window, the SSE task breaks and the reconnect loop takes over. Set generously — the SSE protocol tolerates long idle periods between events. Default: 5 minutes.
Trait Implementations§
Source§impl Clone for StreamableHttpClientConfig
impl Clone for StreamableHttpClientConfig
Source§fn clone(&self) -> StreamableHttpClientConfig
fn clone(&self) -> StreamableHttpClientConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more