Skip to main content

MCP_MAX_RESPONSE_BYTES

Constant MCP_MAX_RESPONSE_BYTES 

Source
pub const MCP_MAX_RESPONSE_BYTES: usize = _; // 16_777_216usize
Expand description

Hardening cap (Fable-5 review, memory-DoS-from-a-hostile-configured- server finding): the maximum size of a single non-streaming HTTP response body (McpClient::http_roundtrip) this client will buffer before erroring out. 16 MiB is generous for real tool-call/initialize responses (the actual payloads this transport carries) while bounding how much memory a misbehaving or malicious configured MCP server can force this process to allocate for one response.