Hermes.Transport.Behaviour behaviour (hermes_mcp v0.10.2)
Defines the behavior that all transport implementations must follow.
Summary
Callbacks
Returns the list of MCP protocol versions supported by this transport.
Types
@type message() :: String.t()
The JSON-RPC message encoded
@type reason() :: term() | Hermes.MCP.Error.t()
@type t() :: GenServer.server()
Callbacks
@callback start_link(keyword()) :: GenServer.on_start()
@callback supported_protocol_versions() :: [String.t()]
Returns the list of MCP protocol versions supported by this transport.
Examples
iex> MyTransport.supported_protocol_versions()
["2024-11-05", "2025-03-26"]