Hermes.Transport.SSE (hermes_mcp v0.14.1)
A transport implementation that uses Server-Sent Events (SSE) for receiving messages and HTTP POST requests for sending messages back to the server.
Deprecated
This transport has been deprecated as of MCP specification 2025-03-26 in favor
of the Streamable HTTP transport (Hermes.Transport.StreamableHTTP).
The HTTP+SSE transport from protocol version 2024-11-05 has been replaced by the more flexible Streamable HTTP transport which supports optional SSE streaming on a single endpoint.
For new implementations, please use Hermes.Transport.StreamableHTTP instead.
This module is maintained for backward compatibility with servers using the
2024-11-05 protocol version.
Notes
For initialization and setup, check our Installation & Setup and the Transport options guides for reference.
Summary
Functions
Returns a specification to start this module under a supervisor.
Types
@type option() :: {:name, GenServer.name()} | {:client, GenServer.server()} | {:server, server()} | {:headers, map()} | {:transport_opts, keyword()} | {:http_options, Finch.request_opts()} | GenServer.option()
The options for the SSE transport.
:name- The name of the transport process, respecting theGenServer"Name Registration" section.:client- The client to send the messages to, respecting theGenServer"Name Registration" section.:server- The server configuration.:headers- The headers to send with the HTTP requests.:transport_opts- The underlying HTTP transport options to pass to the HTTP client. You can check on the Mint docs:http_options- The underlying HTTP client options to pass to the HTTP client. You can check on the Finch docs
@type params_t() :: Enumerable.t(option())
@type server() :: Enumerable.t( {:base_url, String.t()} | {:base_path, String.t()} | {:sse_path, String.t()} )
The options for the MCP server.
:base_url- The base URL of the MCP server (e.g. http://localhost:8000) (required).:base_path- The base path of the MCP server (e.g. /mcp).:sse_path- The path to the SSE endpoint (e.g. /mcp/sse) (default:base_path+/sse).
@type t() :: GenServer.server()
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.