Skip to content

mcp: remove support for batching on streamable connections#948

Open
wucm667 wants to merge 1 commit into
modelcontextprotocol:mainfrom
wucm667:feat/remove-streamable-batching
Open

mcp: remove support for batching on streamable connections#948
wucm667 wants to merge 1 commit into
modelcontextprotocol:mainfrom
wucm667:feat/remove-streamable-batching

Conversation

@wucm667

@wucm667 wucm667 commented May 7, 2026

Copy link
Copy Markdown
Contributor

Fixes #911

Batching was already deprecated and rejected for protocol versions >= 2025-06-18.
Remove it entirely to simplify the streamable transport code.

Replaces readBatch calls with single message decoding, removes batch-related
checks and comments, and deletes batch-specific tests. No behavioral change for
single-message requests.

@maciej-kisiel

Copy link
Copy Markdown
Contributor

Thanks for the contribution. We're still analyzing our backwards compatibility stance on this and when exactly we would like to remove it. I'll update you when this is resolved.

@piyushbag

Copy link
Copy Markdown
Contributor

Conceptually this looks right for #911: dropping readBatch and the batch-only branches simplifies servePOST without changing the single-message path.

GitHub shows the branch as conflicting with current main (recent streamable changes landed since May). Could you rebase onto latest main and push? Happy to take another look once CI is green.

After rebase, one thing I'd sanity-check: any remaining callers that still assumed batch decode on the stateless POST probe path.

Batching was already deprecated and rejected for protocol versions >=
2025-06-18. Remove it entirely to simplify the streamable transport code.

Replace readBatch calls with single message decoding, remove batch-related
checks and comments, and delete batch-specific tests.

Closes modelcontextprotocol#911

Signed-off-by: wucm667 <stevenwucongmin@gmail.com>
@wucm667 wucm667 force-pushed the feat/remove-streamable-batching branch from 28dce5c to 3840846 Compare June 29, 2026 02:01
@wucm667

wucm667 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto latest main and pushed. All CI checks are green.

Regarding the stateless POST probe path — ephemeralConnectOpts now uses jsonrpc2.DecodeMessage directly instead of readBatch, so there's no batch decode assumption left.

@maciej-kisiel mentioned they're still evaluating the backwards compatibility stance. Let me know if you have any other concerns.

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.

Remove support for batching on streamable connection

3 participants