Skip to content

Provide an option to increase request payload size in server implementation #626

Open
@siwachabhi

Description

@siwachabhi

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 fix 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
https://github.com/modelcontextprotocol/python-sdk/blob/544176770b53e6a0ae8c413d3b6c5116421f67df/src/mcp/server/streamable_http.py#L337-L344

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions