Mcp42. Session
(mcp42 v0.1.1)
Copy Markdown
A session process created per Streamable HTTP connection.
The inbox holds server-initiated messages (notifications/request from
server) until the transport's SSE stream drains them. Bounded: pushing
beyond @inbox_cap intentionally crashes the session (fail-fast
backpressure) — the transport observes the :DOWN and tears the stream.
Summary
Functions
Returns a specification to start this module under a supervisor.
Return queued messages in order and empty the inbox.
The session's UUID v4 id (Mcp-Session-Id header value).
Negotiated MCP protocol version (nil until initialize).
Queue a server-initiated message. Fails the session (crash) when the
inbox is full; the caller receives {:error, :inbox_full} first.
Record the negotiated protocol version (called on initialize).
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Return queued messages in order and empty the inbox.
The session's UUID v4 id (Mcp-Session-Id header value).
Negotiated MCP protocol version (nil until initialize).
Queue a server-initiated message. Fails the session (crash) when the
inbox is full; the caller receives {:error, :inbox_full} first.
Record the negotiated protocol version (called on initialize).