Skip to content

feat: add legacy SSE transport support for MCP servers#18801

Closed
Gmatrix2022 wants to merge 1 commit into
NousResearch:mainfrom
Gmatrix2022:feat/mcp-sse-transport
Closed

feat: add legacy SSE transport support for MCP servers#18801
Gmatrix2022 wants to merge 1 commit into
NousResearch:mainfrom
Gmatrix2022:feat/mcp-sse-transport

Conversation

@Gmatrix2022

Copy link
Copy Markdown

Summary

Adds transport: sse config 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_client for HTTP transport, causing 405 Method Not Allowed errors when connecting to these servers.

Solution

When transport: sse is set in the MCP server config, Hermes uses mcp.client.sse.sse_client instead of mcp.client.streamable_http.streamablehttp_client.

Config

mcp_servers:
  windows-mcp:
    url: "http://host.docker.internal:8899/sse"
    transport: sse  # Use legacy SSE transport
    connect_timeout: 15
    timeout: 60

Changes

  • Import mcp.client.sse.sse_client with _MCP_SSE_AVAILABLE 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

Testing

Verified against Windows-MCP v3.2.4 (SSE transport on port 8899). Connection succeeds with transport: sse, fails with 405 Method Not Allowed without it.

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
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have tool/mcp MCP client and OAuth labels May 2, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #5981, #3976, #11647 — same MCP SSE transport feature. Three competing PRs already exist for this.

@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #5981, #3976, #11647

@teknium1

Copy link
Copy Markdown
Contributor

This looks implemented on current main now. Automated hermes-sweeper review found the legacy MCP SSE transport path already landed, with tests and follow-up hardening.

Evidence:

  • tools/mcp_tool.py:203 imports mcp.client.sse.sse_client behind an optional SDK guard.
  • tools/mcp_tool.py:1597 routes transport: sse configs into sse_client(...) and a ClientSession, rather than the Streamable HTTP client.
  • tools/mcp_tool.py:33 documents the transport: sse config shape in the MCP server example.
  • tests/tools/test_mcp_sse_transport.py:1 contains regression coverage for the SSE transport path.
  • The core SSE support commit is 12289c2630548b35575e289ba215a4541dd8ec72 (feat: add SSE transport support for MCP client), and it is contained in v2026.5.7. Follow-up hardening/tests landed in dd2dc2bddf43d72e24e61fd306206c696298df47.

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.

@teknium1 teknium1 closed this Jun 10, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low — cosmetic, nice to have sweeper:implemented-on-main Sweeper: behavior already present on current main tool/mcp MCP client and OAuth type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants