class

MCP::Client::StreamableHttpClientTransport

Inherits MCP::Shared::AbstractTransport < MCP::Shared::Transport < Reference < Object

Constants

JSON_MIME = "application/json"
MCP_SESSION_ID = "Mcp-Session-Id"
PROTOCOL_VERSION = "MCP-Protocol-Version"
SSE_MIME = "text/event-stream"

Constructors

from_uri(url : String) : self
Source
new(uri : URI)
Source
new(url : String)
Source

Instance methods

close

Close the done channel. The actor fiber will drain the inbox, clean up the session, and call _on_close. If start was never called, close immediately.

Source

Enqueue a message for the actor fiber to POST. Non-blocking.

Source
start

Spawns the actor fiber that owns all transport state (HTTP client, session ID) and runs the for-select event loop.

Source