Skip to content

fix: decode MCP SSE events and select matching replies - #16

Open
rudycelekli wants to merge 1 commit into
firecrawl:mainfrom
rudycelekli:fix/preflight-sse-replies
Open

rudycelekli wants to merge 1 commit into
firecrawl:mainfrom
rudycelekli:fix/preflight-sse-replies

Conversation

@rudycelekli

Copy link
Copy Markdown

HTTP MCP preflight currently parses the last data line, so a JSON-RPC response followed by a progress notification becomes an empty tool list. A valid SSE event with multiline JSON data also fails to decode. Parse complete data events and select the reply matching the initialize/tools-list request id, retaining ordinary JSON responses.

Validation: actual localhost HTTP peers reproduce both defects on unchanged main (2 fail, 1 JSON control pass). Fixed branch: all135 repository tests pass, including all three public list_http wire scenarios. git diff --check passes. No provider/model calls or scoring changes. This handles finite HTTP response bodies; it does not claim a live vendor/network run.

Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
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.

1 participant