Skip to content

Add app-rendered elicitation MRTR example - #2578

Draft
krubenok wants to merge 3 commits into
modelcontextprotocol:mainfrom
krubenok:agent/apps-elicitation-integrated
Draft

krubenok wants to merge 3 commits into
modelcontextprotocol:mainfrom
krubenok:agent/apps-elicitation-integrated

Conversation

@krubenok

@krubenok krubenok commented Jul 29, 2026 •

Copy link
Copy Markdown

Summary

Add a self-verifying example of app-rendered form elicitation using the existing 2026-07-28 MRTR engine. The normative proposal lives entirely in the MCP Apps extension: modelcontextprotocol/ext-apps#733. Core SEP-3118 is closed; no core protocol change is needed.

The server and client negotiate elicitation: {} inside io.modelcontextprotocol/ui, with core form elicitation and the Apps MIME type. The server attaches _meta.ui.resourceUri only for capable clients and embeds the ordinary elicitation/create request in InputRequiredResult. The client resolves the resource over the same connection, returns a standard ElicitResult, and lets the SDK retry through inputResponses.

This is a headless protocol example. Its HTML resource and deterministic client do not implement a graphical Apps bridge. A graphical host supplies that bridge and validates accepted content against the requested schema.

Both stdio and stateless HTTP are supported. HTTP creates a fresh server for each request, so the answer survives solely through the MRTR envelope. There are no new core methods, result types, or extension identifiers.

C# reference: modelcontextprotocol/csharp-sdk#1723.

Validation

Rebased on TypeScript SDK main 951fe560.

  • Full repository build and typecheck: passed.
  • Example client against stdio and HTTP servers: passed.
  • Example ESLint and TypeScript checks: passed.
  • git diff --check: passed.
  • Full repository lint reaches existing import/no-extraneous-dependencies errors in test/helpers/src/helpers, outside this PR's changes.

@changeset-bot

changeset-bot Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 930f136

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/@modelcontextprotocol/client@2578

@modelcontextprotocol/codemod

npm i https://pkg.pr.new/@modelcontextprotocol/codemod@2578

@modelcontextprotocol/core

npm i https://pkg.pr.new/@modelcontextprotocol/core@2578

@modelcontextprotocol/server

npm i https://pkg.pr.new/@modelcontextprotocol/server@2578

@modelcontextprotocol/server-legacy

npm i https://pkg.pr.new/@modelcontextprotocol/server-legacy@2578

@modelcontextprotocol/express

npm i https://pkg.pr.new/@modelcontextprotocol/express@2578

@modelcontextprotocol/fastify

npm i https://pkg.pr.new/@modelcontextprotocol/fastify@2578

@modelcontextprotocol/hono

npm i https://pkg.pr.new/@modelcontextprotocol/hono@2578

@modelcontextprotocol/node

npm i https://pkg.pr.new/@modelcontextprotocol/node@2578

commit: 930f136

}
);

client.setRequestHandler('elicitation/create', async request => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this or another client also demo stateless mrtr elicitations

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@claude claude Bot added the v2 Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes label Aug 18, 2026
@krubenok
krubenok force-pushed the agent/apps-elicitation-integrated branch from 10fa34b to 930f136 Compare October 26, 2026 03:07

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

v2 Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants