class LittleGhost::MCP::HTTPTransport

HTTPTransport sends MCP JSON-RPC messages over Streamable HTTP. It applies time and response-size limits and keeps the negotiated MCP session ID.

Security and trust

HTTPS is required by default. allow_insecure_http is only for an explicitly trusted local development endpoint. Scope caller-supplied credential headers to the target server. Response bodies and negotiated session IDs are validated before use.

One transport instance retains one negotiated MCP session ID and sends it with later requests. Scope the transport and its Client to one trusted server and one authenticated principal; never share that pair across tenants. LittleGhost does not send MCP session-termination DELETE requests, so configure server-side expiry or manage that lifecycle outside this transport when the server requires explicit cleanup.