-
Notifications
You must be signed in to change notification settings - Fork 892
Add support for MCP's Streamable HTTP transport #1716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🙌🏽 Waiting for this to get merged soon |
@BrandonShar Thanks Brandon, this looks great! My only concern is that GitHub shows that |
Hey @DouweM thanks for the review! Turns out I needed to upgrade my version of |
@BrandonShar Thanks, the code looks good. Can you please update https://ai.pydantic.dev/mcp/client/#sse-client as well? It currently says "The name "HTTP" is used since this implemented will be adapted in future to use the new Streamable HTTP currently in development.", which should be dropped, and it should be made explicit that we support both the older SSE and newer MCP endpoints. |
very much looking forward to it! @BrandonShar , you need some help? |
@BrandonShar Note that we have some conflicts from some other changes we just merged |
fc539da
to
a8ed6e1
Compare
PR Change SummaryAdded support for the Streamable HTTP transport in MCP, ensuring compatibility with existing functionality while introducing new capabilities.
Modified Files
How can I customize these reviews?Check out the Hyperlint AI Reviewer docs for more information on how to customize the review. If you just want to ignore it on this PR, you can add the Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add |
@DouweM I tweaked the docs a bit and resolved the conflicts. Just an FYI, a few were just formatting, but the linter seems happy with what I already had. |
@DouweM changes made. Good call on the docs improvements, I appreciate your attention to detail there! |
@@ -75,7 +75,7 @@ tavily = ["tavily-python>=0.5.0"] | |||
# CLI | |||
cli = ["rich>=13", "prompt-toolkit>=3", "argcomplete>=3.5.0"] | |||
# MCP | |||
mcp = ["mcp>=1.6.0; python_version >= '3.10'"] | |||
mcp = ["mcp>=1.8.0; python_version >= '3.10'"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note that I think this may need to be 1.9.0 as the protocol version in 1.8.0 is still the 2024-11-05 one. we want the 2025-03-26 one (latest) as that's where the streamable HTTP protocol is defined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think tagging 1.9.0 works great, but I'm not seeing why we needed to. The 1.8.0 release is what introduced streamable http.
This adds support for the new Streamable HTTP transport that was just added to MCP in v1.8. I based the implementation off of how FastMCP handled it here.
I set it up to be a non-breaking change (with deprecations) and updated the tests accordingly, but there wasn't an SSE integration test that I noticed. I did test this in my project locally and it worked well. Happy to collaborate on some additional testing!
Resolves #1632