Skip to content

Conversation

@pcarleton
Copy link
Member

@pcarleton pcarleton commented Nov 24, 2025

3 changes to the test:

  • Adds more logging (via INFO checks), so it's easier to tell from a run what happened / what went wrong
  • Fixed an issue where the out-of-band "GET /" was causing a fail on including last-event-id (since the bare GET / doesn't have one)
  • Switches from doing the priming on initialize to on a tool call. This was mostly to make it closer to a normal use case (e.g. the example client in the 1699 PR). I was going to also add progress notifications, but realized that defeats some of what this test is checking (i.e. that clients respond well to the polling)

Test Results

node dist/index.js server --url http://localhost:3000/mcp --scenario server-sse-polling
Running client scenario 'server-sse-polling' against server: http://localhost:3000/mcp
Results saved to results/server-server-sse-polling-2025-11-24T16-15-07-931Z
Checks:
2025-11-24T16:15:07.968Z [outgoing-request            ] INFO    Sending POST tools/call
2025-11-24T16:15:07.970Z [incoming-response           ] INFO    Received 200 response for POST
2025-11-24T16:15:07.971Z [incoming-sse-event          ] INFO    Received SSE priming event (id: 1219b3a8-9438-48b4-9953-8f335d81f262::1764000907969_9f79292d-3f5c-4945-b188-0c4a612023d8)
2025-11-24T16:15:07.971Z [stream-closed               ] INFO    POST SSE stream closed after 1 event(s)
2025-11-24T16:15:07.971Z [server-sse-priming-event    ] SUCCESS Server SHOULD send priming event with id and empty data on POST SSE streams
2025-11-24T16:15:07.971Z [server-sse-retry-field      ] SUCCESS Server SHOULD send retry field to control client reconnection timing
2025-11-24T16:15:07.971Z [outgoing-request            ] INFO    Sending GET request
2025-11-24T16:15:07.971Z [incoming-response           ] INFO    Received 200 response for GET
2025-11-24T16:15:08.071Z [incoming-sse-event          ] INFO    Received SSE event on GET reconnection stream (id: 1219b3a8-9438-48b4-9953-8f335d81f262::1764000908070_257f4329-d4bf-4893-8e56-1f0bf0090ebb)
2025-11-24T16:15:08.071Z [server-sse-disconnect-resume] SUCCESS Server closes SSE stream mid-call and resumes after client reconnects with Last-Event-ID

Test Results:
Passed: 3/3, 0 failed, 0 warnings
node dist/index.js client --scenario sse-retry --command "npx tsx examples/clients/typescript/sse-retry-test.ts"
Starting scenario: sse-retry
Executing client: npx tsx examples/clients/typescript/sse-retry-test.ts http://localhost:60386
Results saved to results/sse-retry-2025-11-24T16-15-13-228Z
Checks:
2025-11-24T16:15:13.978Z [incoming-request             ] INFO    Received POST request for / (method: initialize)
2025-11-24T16:15:13.978Z [outgoing-response            ] INFO    Sent initialize response

2025-11-24T16:15:13.983Z [incoming-request             ] INFO    Received POST request for / (method: notifications/initialized)
2025-11-24T16:15:13.984Z [incoming-request             ] INFO    Received GET request for /
2025-11-24T16:15:13.984Z [outgoing-sse-event           ] INFO    Sent SSE priming event on GET stream (id: event-1, retry: 500ms)
2025-11-24T16:15:13.986Z [incoming-request             ] INFO    Received POST request for / (method: tools/call)
2025-11-24T16:15:13.986Z [outgoing-sse-event           ] INFO    Sent SSE priming event for tools/call (id: event-2, retry: 500ms)
2025-11-24T16:15:14.038Z [outgoing-stream-close        ] INFO    Closed tools/call SSE stream to trigger client reconnection
2025-11-24T16:15:14.541Z [incoming-request             ] INFO    Received GET request for / (Last-Event-ID: event-2)
2025-11-24T16:15:14.541Z [outgoing-sse-event           ] INFO    Sent SSE priming event on GET stream (id: event-3, retry: 500ms)
2025-11-24T16:15:14.541Z [outgoing-sse-event           ] INFO    Sent tool response on GET stream after reconnection (id: event-4)
2025-11-24T16:15:14.563Z [client-sse-graceful-reconnect] SUCCESS Client reconnects via GET after SSE stream is closed gracefully
2025-11-24T16:15:14.563Z [client-sse-retry-timing      ] SUCCESS Client MUST respect the retry field, waiting the given number of milliseconds before attempting to reconnect
2025-11-24T16:15:14.563Z [client-sse-last-event-id     ] SUCCESS Client SHOULD send Last-Event-ID header on reconnection for resumability

Test Results:
Passed: 3/3, 0 failed, 0 warnings

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 24, 2025

Open in StackBlitz

npx https://pkg.pr.new/modelcontextprotocol/conformance/@modelcontextprotocol/conformance@52

commit: c385462

@pcarleton pcarleton marked this pull request as ready for review November 24, 2025 17:27
@felixweinberger felixweinberger merged commit 4303ddf into fweinberger/sep-1699-test Nov 24, 2025
5 checks passed
@felixweinberger felixweinberger deleted the fweinberger/sep-1699-test-revise branch November 24, 2025 17:30
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.

3 participants