Skip to content

Add app-rendered elicitation MRTR example - #2578

Draft
krubenok wants to merge 1 commit into
modelcontextprotocol:mainfrom
krubenok:agent/apps-elicitation-integrated
Draft

Add app-rendered elicitation MRTR example#2578
krubenok wants to merge 1 commit into
modelcontextprotocol:mainfrom
krubenok:agent/apps-elicitation-integrated

Conversation

@krubenok

Copy link
Copy Markdown

Summary

  • add a self-verifying 2026-07-28 example of using an MCP App as the UI for a standard form elicitation
  • negotiate the feature as elicitation: {} inside the existing io.modelcontextprotocol/ui extension on both peers
  • attach _meta.ui.resourceUri only when the request-scoped client capabilities support app rendering
  • use the SDK's existing MRTR engine to return InputRequiredResult, collect the standard ElicitResult, and retry with inputResponses

Design

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-app resource and embeds an ordinary form-mode elicitation/create request in InputRequiredResult. The headless example client verifies two-sided negotiation, reads the bound app resource over the same connection, returns a standard ElicitResult, 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
  • example ESLint check
  • repository pre-push build, typecheck, snippet-sync, and lint checks

@changeset-bot

changeset-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 59c1b61

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: 59c1b61

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.

1 participant