Skip to content

Comments

Remove batching support from StreamableHttpServerTransport#372

Merged
halter73 merged 1 commit intomodelcontextprotocol:mainfrom
halter73:no-batching
May 1, 2025
Merged

Remove batching support from StreamableHttpServerTransport#372
halter73 merged 1 commit intomodelcontextprotocol:mainfrom
halter73:no-batching

Conversation

@halter73
Copy link
Contributor

@halter73 halter73 commented May 1, 2025

I closed #158 which was our issue tracking support for JSON-RPC batching because the requirement has been removed from the draft specification as of modelcontextprotocol/modelcontextprotocol#416, and the feature didn't seem particularly useful. The SDK never sent batched messages.

I removed the batching support from the client in my Streamable HTTP client PR (#356), and this follows up to do the same thing for the server.

@stephentoub We could now more conveniently update the StreamableHttpServerTransport.HandlePostRequest(IDuplexPipe httpBodies, CancellationToken cancellationToken) method to take a duplex Stream instead of an IDuplexPipe without introducing extra copying if you also want to do that as part of this change.

@stephentoub
Copy link
Contributor

We could now more conveniently update the StreamableHttpServerTransport.HandlePostRequest(IDuplexPipe httpBodies, CancellationToken cancellationToken) method to take a duplex Stream instead of an IDuplexPipe without introducing extra copying if you also want to do that as part of this change.

Sounds good, either in this PR or a follow-up. Thanks!

We should also consider having ctors on StreamServer/ClientTransport, accepting a single duplex Stream rather than one for each direction, but that can also be a separate thing.

@halter73 halter73 merged commit bac97ef into modelcontextprotocol:main May 1, 2025
19 of 21 checks passed
@jeffhandley jeffhandley added the breaking-change This issue or PR introduces a breaking change label Feb 20, 2026
@jeffhandley
Copy link
Collaborator

Adding the breaking-change label retroactively during release notes revision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change This issue or PR introduces a breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[2025-03-26 spec] Implement JSON-RPC batching

3 participants