Add app-rendered elicitation MRTR example - #2578
Conversation
|
@modelcontextprotocol/client
@modelcontextprotocol/codemod
@modelcontextprotocol/core
@modelcontextprotocol/server
@modelcontextprotocol/server-legacy
@modelcontextprotocol/express
@modelcontextprotocol/fastify
@modelcontextprotocol/hono
@modelcontextprotocol/node
commit: |
| } | ||
| ); | ||
|
|
||
| client.setRequestHandler('elicitation/create', async request => { |
There was a problem hiding this comment.
Should this or another client also demo stateless mrtr elicitations
There was a problem hiding this comment.
Yes — the HTTP/modern leg is the stateless MRTR demonstration. createMcpHandler(buildServer) constructs a fresh server for every request, and the example runner exercises the initial tools/call plus the automatic retry over HTTP. I clarified that explicitly in the README and source comments, including commands for running the HTTP leg.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Summary
2026-07-28example of using an MCP App as the UI for a standard form elicitationelicitation: {}inside the existingio.modelcontextprotocol/uiextension on both peers_meta.ui.resourceUrionly when the request-scoped client capabilities support app renderingInputRequiredResult, collect the standardElicitResult, and retry withinputResponsesDesign
This deliberately does not add a second extension package, custom method, or custom result type.
The example server publishes a self-contained
text/html;profile=mcp-appresource and embeds an ordinary form-modeelicitation/createrequest inInputRequiredResult. The headless example client verifies two-sided negotiation, reads the bound app resource over the same connection, returns a standardElicitResult, and lets the SDK perform the MRTR retry.A graphical host replaces the deterministic selection with its MCP Apps View↔Host bridge; the core wire flow is unchanged. The Apps bridge continues to negotiate its own protocol version independently of core MCP
2026-07-28.Related proposals:
Validation
pnpm --filter @mcp-examples/apps-elicitation client