feat: add legacy SSE transport support for MCP servers#18801
Closed
Gmatrix2022 wants to merge 1 commit into
Closed
feat: add legacy SSE transport support for MCP servers#18801Gmatrix2022 wants to merge 1 commit into
Gmatrix2022 wants to merge 1 commit into
Conversation
Add 'transport: sse' config option for HTTP MCP servers that use
the legacy Server-Sent Events transport (GET /sse + POST /messages/)
instead of StreamableHTTP (POST-only).
Some MCP servers (e.g. Windows-MCP, older community servers) only
support the old SSE protocol. This patch adds an sse_client path
alongside the existing streamablehttp_client, selected via:
mcp_servers:
my_server:
url: http://host:8899/sse
transport: sse
Changes:
- Import mcp.client.sse.sse_client with availability flag
- Add _is_sse() config check method
- Add _run_sse() transport method using SSE client
- Route to SSE path in run() when transport: sse is set
Collaborator
Collaborator
This was referenced May 3, 2026
Contributor
|
This looks implemented on current Evidence:
Thanks for the contribution and the Windows-MCP validation notes. The prior maintainer comments calling out related competing SSE PRs were accurate; the capability has since been incorporated on main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
transport: sseconfig option for HTTP MCP servers that use the legacy Server-Sent Events transport (GET /sse+POST /messages/) instead of StreamableHTTP.Problem
Some MCP servers (e.g. Windows-MCP, older community servers) only implement the old SSE protocol. Hermes currently only uses
streamablehttp_clientfor HTTP transport, causing405 Method Not Allowederrors when connecting to these servers.Solution
When
transport: sseis set in the MCP server config, Hermes usesmcp.client.sse.sse_clientinstead ofmcp.client.streamable_http.streamablehttp_client.Config
Changes
mcp.client.sse.sse_clientwith_MCP_SSE_AVAILABLEavailability flag_is_sse()config check method_run_sse()transport method using SSE clientrun()whentransport: sseis setTesting
Verified against Windows-MCP v3.2.4 (SSE transport on port 8899). Connection succeeds with
transport: sse, fails with405 Method Not Allowedwithout it.