Summary
HttpMcpTransport reads HTTP request bodies to the end and uses an unbounded request queue. Even though the transport is intended for local/single-tenant use, this can allow local memory pressure or denial-of-service behavior.
Evidence
Relevant code paths:
src/CodeIndex/Mcp/HttpMcpTransport.cs:36 uses Channel.CreateUnbounded<PendingRequest>().
src/CodeIndex/Mcp/HttpMcpTransport.cs:273 reads the entire request with reader.ReadToEndAsync(cancellationToken).
- A search for
MaxRequest under src/ returned no request-size limit.
Expected
HTTP MCP should enforce bounded resource usage, for example:
- reject requests over a configured max body size before reading them fully;
- use a bounded channel or backpressure for queued requests;
- return an appropriate 413/429-style response where applicable;
- expose defaults and tuning knobs in docs/help if user-visible.
Impact
A local process can send very large or many HTTP requests and force the MCP server to allocate unbounded memory or queue work faster than it can be processed.
Summary
HttpMcpTransportreads HTTP request bodies to the end and uses an unbounded request queue. Even though the transport is intended for local/single-tenant use, this can allow local memory pressure or denial-of-service behavior.Evidence
Relevant code paths:
src/CodeIndex/Mcp/HttpMcpTransport.cs:36usesChannel.CreateUnbounded<PendingRequest>().src/CodeIndex/Mcp/HttpMcpTransport.cs:273reads the entire request withreader.ReadToEndAsync(cancellationToken).MaxRequestundersrc/returned no request-size limit.Expected
HTTP MCP should enforce bounded resource usage, for example:
Impact
A local process can send very large or many HTTP requests and force the MCP server to allocate unbounded memory or queue work faster than it can be processed.