Skip to content

Support Streamable HTTP MCP servers #1384

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

Merged
merged 6 commits into from
May 27, 2025

Conversation

albertvillanova
Copy link
Member

@albertvillanova albertvillanova commented May 26, 2025

Support Streamable HTTP MCP servers.

Close #1354.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Collaborator

@aymeric-roucher aymeric-roucher left a comment

Choose a reason for hiding this comment

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

With Streamable HTTP, don't we have the option now to completely get rid of context managers and just have a client object that we call when needed, without a need to close it at the end?

@albertvillanova
Copy link
Member Author

Good question.

Streamable HTTP transport supports both stateful and stateless operations.

I think the MCPClient should be adapted to handle the stateless case.

@albertvillanova albertvillanova merged commit 9ceb35a into huggingface:main May 27, 2025
4 checks passed
@albertvillanova albertvillanova deleted the fix-1354 branch May 27, 2025 10:13
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.

Support Streamable stateless MCP Servers
3 participants