Context
Found by the MCP server conformance suite added in #1722. The server-sse-polling scenario emits two SHOULD-level warnings against the McpAgent endpoint:
- Server SHOULD send priming event with id and empty data on POST SSE streams
- Server SHOULD send retry field to control client reconnection timing
Both are SEP-1699 (SSE resumability/polling) recommendations.
Details
McpAgent's internal transport (packages/agents/src/mcp/transport.ts — the WebSocket-bridged StreamableHTTPServerTransport) has no support for priming events or the retry field, for any protocol version. It also lacks closeSSEStream(), so SEP-1699 mid-call stream closure can't be exercised either.
- By contrast,
WorkerTransport (used via createMcpHandler) extends the SDK's web-standard transport and does emit priming events with event IDs for protocol ≥ 2025-11-25 clients when an event store is configured, and supports retryInterval.
- Note: the conformance harness (0.1.16) probes with protocol version
2025-03-26, and the pinned MCP SDK deliberately suppresses priming events for pre-2025-11-25 clients (they can't parse empty SSE data: frames). So the warning fires for the createMcpHandler variant too, even though it implements the feature — that part looks like a harness inconsistency worth reporting upstream to modelcontextprotocol/conformance.
Acceptance
McpAgent POST SSE streams send a priming event (id + empty data) for protocol ≥ 2025-11-25 clients when resumability is available, plus a retry field.
- Remove
server-sse-polling from packages/agents/conformance/baseline-server-mcp-agent.yml (and baseline-server-handler.yml if the upstream harness probe is fixed) — the baseline check will flag the entries as stale once this works.
Possible alternative: migrate McpAgent's streamable-http path onto WorkerTransport instead of patching the legacy transport.
Context
Found by the MCP server conformance suite added in #1722. The
server-sse-pollingscenario emits two SHOULD-level warnings against theMcpAgentendpoint:Both are SEP-1699 (SSE resumability/polling) recommendations.
Details
McpAgent's internal transport (packages/agents/src/mcp/transport.ts— the WebSocket-bridgedStreamableHTTPServerTransport) has no support for priming events or theretryfield, for any protocol version. It also lackscloseSSEStream(), so SEP-1699 mid-call stream closure can't be exercised either.WorkerTransport(used viacreateMcpHandler) extends the SDK's web-standard transport and does emit priming events with event IDs for protocol ≥ 2025-11-25 clients when an event store is configured, and supportsretryInterval.2025-03-26, and the pinned MCP SDK deliberately suppresses priming events for pre-2025-11-25 clients (they can't parse empty SSEdata:frames). So the warning fires for thecreateMcpHandlervariant too, even though it implements the feature — that part looks like a harness inconsistency worth reporting upstream to modelcontextprotocol/conformance.Acceptance
McpAgentPOST SSE streams send a priming event (id + empty data) for protocol ≥ 2025-11-25 clients when resumability is available, plus aretryfield.server-sse-pollingfrompackages/agents/conformance/baseline-server-mcp-agent.yml(andbaseline-server-handler.ymlif the upstream harness probe is fixed) — the baseline check will flag the entries as stale once this works.Possible alternative: migrate
McpAgent's streamable-http path ontoWorkerTransportinstead of patching the legacy transport.