Skip to content

MCP Streamable HTTP door: ask the person in-client (elicitation) for a confirmation-gated action, via sessions for elicitation-capable clients #34321

Description

@objectstack-fleet

domain:server#5 · zhuangjianguo · session_01QsR2jTEivi2wogPpeo3xd5

Split from #33712 by maintainer ruling 6909391261 (Q1: in-client confirmation ships for the stdio door only; the HTTP door keeps the email/host approval path until this card). PR #34318 delivers in-client confirmation (step 1 of AI_ACTION_CONFIRMATION_CAPABILITY) on the long-lived stdio MCP server. The Streamable HTTP door stays on the #34202 hand-off. This card carries the HTTP half.

Why the HTTP door cannot elicit today

Measured by the #33712 dev on @modelcontextprotocol/sdk 1.32.1 (report 6908665691):

  • handleHttpRequest in packages/mcp/src/mcp-server-runtime.ts builds a fresh SDK Server for each POST (enableJsonResponse: true). The server that answers tools/call never saw initialize, so it holds no client capabilities.
  • The client's answer to an elicitation/create comes back on a separate POST. A stateless door cannot route it to the pending request, because request ids are per instance.

Candidate shape (not yet ruled; restating it is the restart's first step)

Sessions only for elicitation-capable clients:

  • At initialize, the door issues Mcp-Session-Id and keeps a process-local record: capabilities, bound principal, expiry.
  • Each POST seeds a per-request server from that record. A gated call answers as SSE only when it elicits.
  • A response-only POST is routed to the in-flight request. DELETE ends the session.
  • Every POST checks that its principal matches the session's bound principal; this needs pins.
  • Non-capable clients stay byte-identical (plain JSON, hand-off).

A fully stateful door that binds tools at initialize was set aside on cost and on the frozen tool list it implies.

Costs the shape must answer (isolated review of the #33712 options)

  • Sticky routing: hosted routing must keep one Mcp-Session-Id on one process.
  • SSE across the Worker hop: the hosted Worker-to-container hop must pass an SSE response through. mcp-server-runtime.ts (about :2757) says JSON was chosen to avoid exactly this.
  • Long-held POSTs: a POST stays open while the person answers, up to the door's five-minute bound.
  • Verb rules: the door answers only POST today, and GET/DELETE are 405 (mcp: the stateless /api/v1/mcp route answers GET with an SSE stream that ends at once, so claude-code reconnects 2–3×/s and loads the environment's shard — answer GET with 405 #25759). Ending a session with DELETE reopens that rule.
  • Written statelessness: ADR-0090 (about :487) and ADR-0101 (about :95-98) state that the HTTP door is stateless. A session design must amend them (governed text, maintainer review).
  • Unverified: the MCP roadmap may be moving toward stateless operation without sticky sessions. Check that before building.

Prerequisite

Hosted routing must be sticky on Mcp-Session-Id. Without it, the answer POST lands on another process and the question times out. The seat asked the repo:cloud seat on #6026.

Restart-when: a repo:cloud seat comment on #6026 confirms that hosted MCP HTTP routing is sticky on Mcp-Session-Id (or names the change that makes it so, which then becomes this card's Blocked-by:) · Restart-grade: p3

When restarted, also restore the no-service refusal's sentence "use a client that supports confirmation" (contract step 3). It was left out of #34202 and #34318 because it is false for every HTTP caller until this lands. (A door-aware message, true on stdio today, is a separate small card.)

Activity

  1. added
    pm:on-hold
    domain:server
    on Nov 16, 2026
  2. objectstack-fleet commented on Nov 18, 2026

    @objectstack-fleet
    ContributorAuthor

    qa#1 · os-justin · session_01QSeKYpxQpmErd1ixfkgbYh

    New evidence, no state change 2026-11-18T01:25Z. The maintainer, asked in the verification seat's session whether this evidence should un-hold this card, accepted the recommendation not to, verbatim: 「三个问题 同意」. The hold under ruling 6909391261 (#33712) stands.

    The evidence: on the HTTP door, the confirmed second turn of every AI-gated operation cannot be measured. In qa#1 round 2's scenario half (round record on #31433) it scored 0 on four starter cards (dispose_scrapped_asset, cancel_sent_po, write_off_balance, pay_claim), and the same holds for every scenario card with a gated action. The answer was 428 ACTION_CONFIRMATION_REQUIRED with reason: no_confirmation_service. Scoring it not measured is #34887. Whether the eval could measure the confirmed write through the stdio door, with the harness answering the elicitation as the person, is a verification-strategy question for the eval seat. It is not yet checked.

  3. added
    area:ai
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:aidomain:serverpm:on-holdpriority:p3

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions