Skip to content

mcp: improve http transports error handling and make transport work with any size message#734

Merged
maciej-kisiel merged 4 commits intomodelcontextprotocol:mainfrom
alexbumbacea:handling-large-messages-and-surface-errors
Feb 5, 2026
Merged

mcp: improve http transports error handling and make transport work with any size message#734
maciej-kisiel merged 4 commits intomodelcontextprotocol:mainfrom
alexbumbacea:handling-large-messages-and-surface-errors

Conversation

@alexbumbacea
Copy link
Contributor

We have a use case for messages larger than 1MB, hence making this configurable would help.
In order to discover the source of our problems we had to spend some time investigating, as errors were silently discarded. So we also included changes to improving surfacing errors .

Copy link
Contributor

@findleyr findleyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's discuss this change in #726. I'm not sure we shouldn't just remove the buffering.

@alexbumbacea alexbumbacea force-pushed the handling-large-messages-and-surface-errors branch from 91f93af to ee3d418 Compare December 24, 2025 21:59
@alexbumbacea alexbumbacea force-pushed the handling-large-messages-and-surface-errors branch from ee3d418 to 85a4340 Compare January 3, 2026 09:48
@alexbumbacea alexbumbacea changed the title mcp: improve http transports error handling and make buffer size configurable mcp: improve http transports error handling and make transport work with any size message Jan 3, 2026
@alexbumbacea
Copy link
Contributor Author

@findleyr current proposal (no fixed buffer size) approach is inline with most sdks. Can we get this merged?

@findleyr
Copy link
Contributor

findleyr commented Jan 9, 2026

@alexbumbacea sorry for the delay, will review tomorrow.

@alexbumbacea alexbumbacea force-pushed the handling-large-messages-and-surface-errors branch from 85a4340 to 7ba1c9a Compare January 12, 2026 10:44
@alexbumbacea
Copy link
Contributor Author

@findleyr all comments have been either replied to or addressed. are there any other concerns?

@alexbumbacea alexbumbacea force-pushed the handling-large-messages-and-surface-errors branch 2 times, most recently from 3577e96 to 377a108 Compare January 14, 2026 07:19
@alexbumbacea alexbumbacea force-pushed the handling-large-messages-and-surface-errors branch from 377a108 to 8f634ce Compare January 15, 2026 10:28
@alexbumbacea
Copy link
Contributor Author

@findleyr is there anything else?

@alexbumbacea alexbumbacea force-pushed the handling-large-messages-and-surface-errors branch from 8f634ce to 9fc710b Compare January 20, 2026 13:42
@alexbumbacea
Copy link
Contributor Author

@findleyr can we get this merged?

@findleyr
Copy link
Contributor

@alexbumbacea very sorry, I thought I had merged this. Total oversight on my part.

@maciej-kisiel we may want to cherry-pick this into the release, or do a second prerelease.

@findleyr
Copy link
Contributor

Apologies again for this getting lost in the weeds: I think there are a few things that need to be addressed before merging.

@alexbumbacea alexbumbacea force-pushed the handling-large-messages-and-surface-errors branch from da1ac52 to d534f57 Compare January 28, 2026 17:04
@alexbumbacea alexbumbacea requested a review from findleyr January 28, 2026 17:06
@alexbumbacea alexbumbacea force-pushed the handling-large-messages-and-surface-errors branch from d534f57 to 0416a3a Compare January 30, 2026 07:30
@alexbumbacea alexbumbacea force-pushed the handling-large-messages-and-surface-errors branch from 0416a3a to 636995a Compare January 30, 2026 07:41
findleyr
findleyr previously approved these changes Feb 3, 2026
Copy link
Contributor

@findleyr findleyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like my comments were addressed. However could you please also address @maciej-kisiel's before we merge?

Thanks for this change, this is a good cleanup.

Co-authored-by: Maciej Kisiel <macio92@gmail.com>
@alexbumbacea alexbumbacea force-pushed the handling-large-messages-and-surface-errors branch from cfa78c5 to 3409d32 Compare February 3, 2026 09:17
@alexbumbacea
Copy link
Contributor Author

alexbumbacea commented Feb 4, 2026

@findleyr @maciej-kisiel can we get this merged and included in a prerelease? Thanks!

@maciej-kisiel
Copy link
Contributor

It looks good to me, I wanted to give @findleyr some time to take a look since there was a small change from the version he approved. But I think we can merge it and adjust as a follow-up if needed.

With regard to the release, I think I would prefer to only include fixes to bugs that were introduced with a given pre-release. 1.3.0-pre.1 is already soaking some time and I wouldn't like to prolong the release more than necessary. This change will then be included in 1.4.0 which is planned ~in the last week of February.

@maciej-kisiel maciej-kisiel merged commit 1fb6e20 into modelcontextprotocol:main Feb 5, 2026
5 checks passed
@alexbumbacea alexbumbacea deleted the handling-large-messages-and-surface-errors branch February 6, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants