Skip to main content

Module server

Module server 

Source

Structs§

MCPServer

Constants§

MAX_REQUEST_BYTES
Maximum size of a single inbound JSON-RPC message (shared by all transports).

Functions§

dispatch_http_body
Dispatch a Streamable-HTTP POST body, which may be a single JSON-RPC message or a batch array. Ok(None) means the body held only notifications (HTTP 202, empty body); Err means the body was not valid JSON.
dispatch_line
Dispatch one framed line (stdio / tcp). Returns the serialized response, or None for a notification.
process_value
Process one parsed JSON-RPC message. None means “no reply” — the message was a notification (no id), per JSON-RPC.
token_matches
Constant-time bearer-token check. Accepts the raw token or a Bearer <token> form; surrounding whitespace is trimmed.