Skip to content

SSE reconnect does not include Last-Event-ID header #723

@Yeaury

Description

@Yeaury

Describe the bug
When using mcp-inspector with a MCP server over Streamable HTTP (SSE), the client does not send the Last-Event-ID header during reconnects. As a result, the server cannot resume the stream from the last delivered event, which breaks the MCP protocol’s resume functionality.

To Reproduce
Steps to reproduce the behavior:

  1. Start a MCP server that supports SSE and emits events with an id: field.
  2. Connect to the server using mcp-inspector.
  3. Interrupt the connection (e.g. restart the server or disable/re-enable network).
  4. Inspector automatically reconnects, but the HTTP request does not include the Last-Event-ID header.

Expected behavior
On SSE reconnect, mcp-inspector should include the Last-Event-ID header with the last received event id, so the server can continue sending events from the correct position.

Logs
Observed server logs show reconnect attempts, but Last-Event-ID is missing in the request headers.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp2-mediumMedium priority - normal timeline

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions