Skip to content

fix(client): send elicitation on originating response stream - #561

Open
jstar0 wants to merge 1 commit into
modelcontextprotocol:mainfrom
jstar0:fix/557-elicitation-request-stream
Open

jstar0 wants to merge 1 commit into
modelcontextprotocol:mainfrom
jstar0:fix/557-elicitation-request-stream

Conversation

@jstar0

@jstar0 jstar0 commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Fixes #557

Motivation and Context

The tool handler in this scenario sends elicitation/create with server.request(), which does not associate it with the active tools/call request. The transport therefore writes it on a separate GET stream instead of the POST response stream consumed by the client. Using extra.sendRequest() correlates the elicitation with its initiating tool call.

How Has This Been Tested?

  • Added an HTTP/SSE regression test that asserts elicitation/create arrives on the originating tools/call POST response stream.
  • npm test: 49 files and 642 tests passed.
  • npm run build, npm run lint, and npm run typecheck passed.
  • Ran scenario elicitation-sep1034-client-defaults against the Rust SDK reference conformance client: 5/5 checks passed. The client received the elicitation request and returned the tool result on the same tools/call POST SSE stream.

Breaking Changes

None.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@pkg-pr-new

pkg-pr-new Bot commented Oct 16, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: e234a2f

@zhoutk

zhoutk commented Oct 20, 2026

Copy link
Copy Markdown

Confirming this fixes the failure I reported in #557. The root cause matches what I observed — server.request() on a server without an associated request was delivered on the standalone GET stream, while my client (and the rust-sdk fixture) only read the request's POST response stream. Thanks @jstar0. I maintain the mcp-cpp conformance client fixture (one of the two failing clients in #557); I'll remove the elicitation-sep1034-client-defaults entry from our conformance/expected-failures.yaml and re-baseline against the next suite release.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

2 participants