Skip to main content
Streamable HTTP connection management for MCP implementations. This module provides a connection manager for streamable HTTP-based MCP connections that ensures proper task isolation and resource cleanup.

StreamableHttpConnectionManager

from mcp_use.task_managers.streamable_http import StreamableHttpConnectionManager

method init

Initialize a new streamable HTTP connection manager.Parameters
url
str
required
The HTTP endpoint URL
headers
dict[str, str] | None
default:"None"
Optional HTTP headers
timeout
float
default:"5"
Timeout for HTTP operations in seconds
read_timeout
float
default:"300"
Timeout for HTTP read operations in seconds
auth
httpx.Auth | None
default:"None"
Optional httpx.Auth instance for authentication
Signature
def __init__(url: str, headers: dict[str, str] | None = None, timeout: float = 5, read_timeout: float = 300, auth: httpx.Auth | None = None):
I