Skip to main content

MAX_MCP_CONCURRENCY

Constant MAX_MCP_CONCURRENCY 

Source
pub const MAX_MCP_CONCURRENCY: usize = 4_096;
Expand description

Upper bound on mcp_concurrency (R71). Each admitted MCP call can buffer up to MAX_TOOL_RESPONSE_BYTES = 16 MiB in read_limited_tool_response (routes.rs), so the cap × 16 MiB bounds worst-case MCP resident memory. 4 096 × 16 MiB = 64 GiB worst case — a soft ceiling: operators typically want much less, and a fat-finger config like mcp_concurrency = 100_000 would otherwise silently commit the runtime to a memory pressure model no real host survives. Defence-in-depth like MAX_WORKER_CHANNEL_CAPACITY.