Skip to main content

Module http

Module http 

Source
Expand description

Reusable inbound HTTP MCP transport lifecycle helpers.

Computes the RMCP Streamable HTTP allow-listed Host/Origin values and builds the transport config/service from primitive bind/config values — no product config type required. A product adapter owns extracting those primitives from its own config struct; this module owns the deterministic computation and the RMCP transport wiring.

Structs§

AllowedHostsInput
Inputs needed to compute the allow-listed Host header values for an inbound MCP HTTP server.
AllowedOriginsInput
Inputs needed to compute the allow-listed Origin header values for an inbound MCP HTTP server.

Functions§

allowed_hosts
allowed_origins
streamable_http_config
streamable_http_service
Build a [StreamableHttpService] for any [ServerHandler], given a factory that produces a fresh handler per session and a transport config (see streamable_http_config).