Title: Limit HTTP request bodies before MCP middleware parsing · Issue #3102 · github/github-mcp-server · GitHub
Open Graph Title: Limit HTTP request bodies before MCP middleware parsing · Issue #3102 · github/github-mcp-server
X Title: Limit HTTP request bodies before MCP middleware parsing · Issue #3102 · github/github-mcp-server
Description: Describe the bug 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 th...
Open Graph Description: Describe the bug 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 be...
X Description: Describe the bug 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 be...
Opengraph URL: https://github.com/github/github-mcp-server/issues/3102
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Limit HTTP request bodies before MCP middleware parsing","articleBody":"### Describe the bug\n\nHTTP 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.\n\n### Affected version\n\nCurrent `main` as of 2026-08-19.\n\n### Steps to reproduce the behavior\n\n1. Run the HTTP transport.\n2. Send an oversized MCP request body.\n3. Observe that middleware reads the complete body before downstream size enforcement.\n\n### Expected vs actual behavior\n\nExpected: HTTP request bodies are bounded before any middleware reads or buffers them.\n\nActual: middleware can buffer an unbounded body first.\n\n### Logs\n\nN/A","author":{"url":"https://github.com/SamMorrowDrums","@type":"Person","name":"SamMorrowDrums"},"datePublished":"2026-08-19T12:06:24Z","url":"https://github.com/github/github-mcp-server/issues/3102"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:aeca8809-4d21-8777-22ec-ee4cfa1229a0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EE12:138048:1C7A479:2578E39:6B068578 |
| html-safe-nonce | c81439eb4208fdf3365e0a8ef862666faa6cc1a510dc08b41689312735455742 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRTEyOjEzODA0ODoxQzdBNDc5OjI1NzhFMzk6NkIwNjg1NzgiLCJ2aXNpdG9yX2lkIjoiMjg2MTg3NDM4MjAwMjA5NTQ4MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9349cc2ee8bc27f73b5025526c608741ce05823f49d5f6bbf57e4537971ff320 |
| hovercard-subject-tag | issue:5192424421 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github/github-mcp-server/3102/issue_layout |
| twitter:image | https://opengraph.githubassets.com/24e32ccaa252086a953cbf5a20c0438c834235b587dddc5fdc9e545dd5ceeb2a/github/github-mcp-server/issues/3102 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/24e32ccaa252086a953cbf5a20c0438c834235b587dddc5fdc9e545dd5ceeb2a/github/github-mcp-server/issues/3102 |
| og:image:alt | Describe the bug 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 be... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | SamMorrowDrums |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4462ff7ebfd3d551f202659f2423dae617b6849d23b1df6465dc504ef497d14a |
| turbo-cache-control | no-preview |
| go-import | github.com/github/github-mcp-server git https://github.com/github/github-mcp-server.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 942771284 |
| octolytics-dimension-repository_nwo | github/github-mcp-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 942771284 |
| octolytics-dimension-repository_network_root_nwo | github/github-mcp-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6d3909414814ff86ce7da4c51a0f4918a13fb41b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width