-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
Description
Is your feature request related to a problem? Please describe.
When building a server which can accept larger than 4MB payload size, current implementation has a fixed limit to reject it.
Describe the solution you'd like
Make this a configurable parameter, so servers can configure
Describe alternatives you've considered
Workaround is to use something like this: https://stackoverflow.com/questions/12496089/how-can-i-override-a-constant-in-an-imported-python-module, which can backward incompatible.
Other options is to provide a separate path for larger file I/O, but that seems redundant.
Additional context
python-sdk/src/mcp/server/streamable_http.py
Lines 337 to 344 in 5441767
body = await request.body() | |
if len(body) > MAXIMUM_MESSAGE_SIZE: | |
response = self._create_error_response( | |
"Payload Too Large: Message exceeds maximum size", | |
HTTPStatus.REQUEST_ENTITY_TOO_LARGE, | |
) | |
await response(scope, receive, send) | |
return |
References
No response
Metadata
Metadata
Assignees
Labels
No labels