-
Notifications
You must be signed in to change notification settings - Fork 8.2k
feat: adds streamable http instead of sse on mcp client #10157
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
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughReplaces SSE-based MCP transport with a Streamable HTTP client across backend utilities, agents, starter project payload, frontend modal, and end-to-end tests. Updates session/transport selection, state, and UI/test identifiers accordingly. Adds dev dependency "@types/node". Adjusts method signatures and caching to support Streamable HTTP with SSE fallback. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant UI as Frontend UI (Add MCP Server)
participant LFX as LFX Agent/Orchestrator
participant Util as MCP Util
participant HTTP as MCPStreamableHttpClient
participant SSE as (fallback) SSE Client
participant STDIO as MCPStdioClient
User->>UI: Select type=HTTP, enter name/url/headers/env
UI->>LFX: Submit server config (HTTP)
LFX->>Util: update_tools(config)
Util->>HTTP: connect_to_server(url, headers, sse_read_timeout_seconds)
alt Streamable HTTP succeeds
HTTP-->>Util: session established
Util-->>LFX: tools list + transport_used=Streamable_HTTP
else Streamable HTTP fails
Util->>SSE: connect_to_server(url, headers, read_timeout)
alt SSE succeeds
SSE-->>Util: session established
Util-->>LFX: tools list + transport_used=SSE
else Both fail
Util-->>LFX: error
LFX-->>UI: surface error
end
end
Note over Util,LFX: Cache transport preference per server
User->>UI: Run tool
UI->>LFX: execute(tool, args)
LFX->>Util: get_session(server)
Util-->>LFX: session + transport_used
LFX->>HTTP: run(tool, args) Note right of LFX: if transport_used=HTTP
LFX->>SSE: run(tool, args) Note right of LFX: if transport_used=SSE
LFX-->>UI: result
sequenceDiagram
autonumber
participant Agent as MCPToolsComponent (Agent)
participant Util as MCP Util
participant HTTP as MCPStreamableHttpClient
participant STDIO as MCPStdioClient
Agent->>Util: update_tools(mcp_streamable_http_client=HTTP, mcp_stdio_client=STDIO, config)
Util->>HTTP: ensure session context
Util-->>Agent: updated tool registry
Agent->>Agent: build_output() uses session context from HTTP/STDIO
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 3 inconclusive)
✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
a875248 to
f869703
Compare
|
Outdated
|
helllo @lucaseduoli !! Did this PR also update the docker image on the hub ? Just pushed, but I still see the old version (without the streamable http support) Thank you! |
nvm, I see it was not released yet :) |



This pull request refactors the MCP server connection logic to replace the "SSE" (Server-Sent Events) transport type with a more general "Streamable HTTP" (or "HTTP") transport type throughout both the frontend and backend codebases. The changes include renaming variables, updating validation logic, and refactoring session management to support the new transport type, as well as improving HTTP endpoint validation.
Frontend updates:
AddMcpServerModalcomponent are replaced with "HTTP/SSE", including state variables, form fields, and tab labels. [1] [2] [3] [4] [5] [6] [7]Backend updates:
Transport type and session management refactor:
streamablehttp_clientinstead of an SSE client. [1] [2] [3] [4] [5] [6] [7] [8] [9]Frontend: HTTP replaces SSE in server modal
AddMcpServerModalare renamed to "HTTP/SSE", including state, tab labels, and form fields. [1] [2] [3] [4] [5] [6] [7]Backend: Transport type and session management
streamablehttp_client. [1] [2] [3] [4] [5] [6] [7] [8] [9]Backend: HTTP endpoint validation
Summary by CodeRabbit
New Features
Tests
Chores