You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Limit HTTP request bodies before MCP middleware parsing #3102
HTTP middleware reads request bodies before the SDK request-size guard applies. Large bodies can therefore consume substantially more memory than necessary. Apply a bounded read before parsing in every middleware path that consumes the body, and return a clear request-too-large response.
Affected version
Current main as of 2026-08-19.
Steps to reproduce the behavior
Run the HTTP transport.
Send an oversized MCP request body.
Observe that middleware reads the complete body before downstream size enforcement.
Expected vs actual behavior
Expected: HTTP request bodies are bounded before any middleware reads or buffers them.
Actual: middleware can buffer an unbounded body first.
Activity
Limit HTTP request bodies before MCP middleware parsing