-
-
Notifications
You must be signed in to change notification settings - Fork 48
(feat) Add stream-http support #128
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
base: main
Are you sure you want to change the base?
Conversation
mcp-hub had stream-http support between itself and mcp-servers, but not between mcp-hub and clients. This commit adds this support and updates the SDK spec version. This is specially important for Codex, which DOOES NOT support SSE at all.
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.
Pull Request Overview
This PR adds Streamable HTTP transport support for client connections to mcp-hub, implementing the MCP 2025-03-26 specification while maintaining backward compatibility with existing SSE-based clients. This addresses the critical need for Codex client support, which doesn't support SSE.
- Added unified
/mcpendpoint supporting both POST and GET requests with automatic transport detection - Implemented session management with UUID-based session IDs and proper lifecycle callbacks
- Updated MCP SDK from v1.15.1 to v1.20.0 to support new transport features
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/server.js | Added unified MCP endpoint with transport detection logic for Streamable HTTP and legacy SSE |
| src/mcp/server.js | Implemented handleStreamableHTTP method with session management and transport lifecycle |
| package.json | Updated version to 5.0.2 and upgraded MCP SDK and dev dependencies |
| CHANGELOG.md | Added comprehensive changelog entries documenting the new features and fixes |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
I need this as well. Please approve, author. Thank you in advance.. |
|
I'm using this in my daily workflow both with SSE and Streamable HTTP clients without issues. I can create a release in my fork while the maintainer is unable to review this PR if anyone's interested. |
Definitely much appreciated to do so. I am using your version of the code. Thank you! |
|
Thank you @bcdonadio , using your fork now. |
mcp-hub had stream-http support between itself and mcp-servers, but not between mcp-hub and clients. This commit adds this support and updates the SDK spec version.
This is specially important for Codex, which DOES NOT support SSE at all.