Skip to content

SSE transport: connection succeeds then marked 'Failed' after first event, works fine with raw curl #2783

Closed

Description

@tarun-amagian

Describe the bug

Connecting to a remote MCP server using the legacy SSE (Server Sent Events) [deprecated] transport: the initial GET /sse request succeeds (200, correct event: endpoint frame delivered with a valid session_id), but the Inspector UI then marks the server connection status as "Failed" and never proceeds to list tools/resources. The History panel shows the single GET transport request as 200 SSE, with the response body described as "Long-lived stream — 1 event delivered, closed; body not captured".

Driving the exact same server by hand with raw curl (bypassing Inspector entirely) completes the full handshake correctly: GET /sse stays open indefinitely, and POSTing initialize → notifications/initialized → tools/list → tools/call to the returned /messages/?session_id=... endpoint all return correct JSON-RPC responses on the SSE stream, with no server-side errors. This confirms the target server, TLS, and auth header are all fine — the failure is isolated to Inspector's own legacy SSE client path.

Steps to reproduce

  1. Start Inspector against a remote MCP server using the Python MCP SDK's SSE transport (uvicorn-based, /sse + /messages/?session_id=... pattern):
    npx @modelcontextprotocol/inspector \
      --transport sse \
      --server-url "https://<your-server>/sse" \
      --header "Authorization: Bearer <redacted>"
  2. Open the printed Inspector UI URL, confirm Transport = SSE, Server URL ends in /sse, Authorization header populated.
  3. Click Connect.
  4. UI shows "Connecting..." then settles on "Failed".
  5. In the Requests panel, the single GET transport request shows 200 SSE with 1 event delivered, then the connection is reported closed.

Expected behavior

Inspector should keep the SSE stream open (the same way a direct curl -N connection to the identical endpoint stays open indefinitely) and proceed to auto-initialize / allow listing tools, since the server is fully spec-compliant and responds correctly when driven manually.

Environment

  • Inspector version: latest via npx @modelcontextprotocol/inspector (package version 2.12.0 as of testing)
  • OS: macOS (darwin)
  • Target server: Python MCP SDK, SSE transport, fronted by a cloud load balancer (TLS terminated there)

Additional context

Manually replayed protocol trace (via curl) against the same server, for reference, showing a fully successful initialize → tools/list → tools/call exchange with no errors — confirming the server side is healthy and the bug is isolated to Inspector's legacy SSE client:

event: endpoint
data: /messages/?session_id=<redacted>

event: message
data: {"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2024-11-05","capabilities":{...},"serverInfo":{"name":"<server-name>","version":"<x.y.z>"}}}

event: message
data: {"jsonrpc":"2.0","id":2,"result":{"tools":[{"name":"tool_a", ...}, {"name":"tool_b", ...}, {"name":"tool_c", ...}]}}

event: message
data: {"jsonrpc":"2.0","id":3,"result":{"content":[{"type":"text","text":"<tool output>"}],"isError":false}}

Happy to provide a full HAR/network export or more detail if useful — the server itself cannot be shared since it's a private internal instance.

Activity

  1. added
    v2Issues and PRs for v2
    bugSomething isn't working
    on Oct 25, 2026
  2. cliffhall commented on Oct 25, 2026

    @cliffhall
    Member

    Triage: Priority Medium (total 8)

    • Severity 4 — connecting over the legacy SSE transport fails outright, so the server is unusable in the Inspector
    • Urgency 3 — reported against the published 2.12.0, but a single report on the deprecated transport behind a load balancer; not yet confirmed as general
    • Bonuses: +1 bug label

    Labels applied at triage: v2, bug. Board: #28, Status Incoming (awaiting maintainer review — no milestone yet).

  3. added this to the v2.13.0 milestone on Oct 25, 2026
  4. self-assigned this
    on Oct 25, 2026
  5. added a commit that references this issue on Oct 25, 2026
  6. cliffhall commented on Oct 25, 2026

    @cliffhall
    Member

    Shipped in #2801. The root cause wasn't reproducible, but a failed connect now keeps its reason on the server card. If it still fails for you, please open a new issue with the error text shown under "Failed".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingv2Issues and PRs for v2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions