class

MCP::Client::SseClientTransport

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

Constructors

new(endpoint : String)

endpoint is the full URL (e.g. http://host:port/sse).

Source

Instance methods

close

Close the reader fiber (signalled via @done channel) and the underlying HTTP client.

Source
endpoint
Source

Send a client-to-server message via HTTP POST. The POST URL is either the extracted endpoint (from an event: endpoint frame) or the original GET URL.

Source
start

Start the SSE connection. Spawns a long-lived fiber that reads the event stream and, when the stream ends, reconnects with exponential backoff.

Source
with_header(key : String, value : String) : self
Source