class

MCPC::HttpTransport

Inherits MCPC::Transport < Reference < Object

MCP HTTP modern transport that uses a single POST connection to carry request and responses

Constructors

new(url : String | URI, tracing = false, auth_token = nil)
Source

Instance methods

close

Clean up the transport and close all underlying client connections; renders the transport unusable permanently

Source
mcp_protocol_version
Source
mcp_protocol_version=(mcp_protocol_version : String | Nil)
Source
mcp_session_id
Source
notify(body, & : JSON::Any | ErrorDetails -> )

Send a notification. Yields a JSON::Any for valid data: in the response, or ErrorDetails for unknown response.

Source
post(body, & : JSON::Any | ErrorDetails -> )

Send a request. Yields a JSON::Any for valid data: in the response, or ErrorDetails for unknown response.

Source