Skip to content

Stateless StreamableHTTPServerTransport: per-request requirement is invisible through the Node wrapper (500 with empty body) #2704

Description

@qiyueqiu

Problem

The WebStandard core throws a clear assertion when a stateless transport is reused:

Stateless transport cannot be reused across requests. Create a new transport per request.

The Node wrapper (StreamableHTTPServerTransport via @hono/node-server) converts that assertion into a bare 500 with an empty body — no onerror, no rejection. Combined with Client.connect() unconditionally sending notifications/initialized, a stock official-client <-> official-stateless-server pair fails with an opaque 500, giving no signal that the per-request assembly pattern is required.

Suggestion

  1. Surface the assertion through onerror (or reject from handleRequest) so the failure is observable and debuggable.
  2. Document the per-request pattern ("create a new transport per request") prominently in the stateless guide — it is currently invisible through the Node wrapper.

Context

Observed while integrating the 2026-07-28 stateless core (@modelcontextprotocol/sdk 1.30.0) as an official protocol face. Our workaround (per-request assembly + a notification-dropping client transport) is documented in our project's known-issues log.

Metadata

Metadata

Assignees

No one assigned

    Labels

    v1Issues / PRs related to v1.xv2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions