Skip to content

Add MCP Apps (SEP-1865) support and playbook#2

Merged
quinnj merged 3 commits into
mainfrom
claude/mcp-apps
Jul 2, 2026
Merged

Add MCP Apps (SEP-1865) support and playbook#2
quinnj merged 3 commits into
mainfrom
claude/mcp-apps

Conversation

@quinnj

@quinnj quinnj commented Jul 2, 2026

Copy link
Copy Markdown
Member

What

First-class server-side support for MCP Apps (SEP-1865, extension io.modelcontextprotocol/ui) — interactive HTML widgets that hosts like Cursor and Claude render inline with tool results — plus MCP-App-playbook.md, an end-to-end guide distilled from getting a production integration rendering in Cursor.

New API (src/apps.jl)

  • ui_extension_capability() / add_ui_extension_capability! — advertise the Apps extension in initialize
  • register_ui_resource! + MCPUIResourceui:// resources with the text/html;profile=mcp-app mime type
  • ui_tool_meta — dual-written _meta (ui.resourceUri and ui/resourceUri) for cross-host compat, with model/app visibility
  • ui_tool_content / embedded_ui_resource — embed the widget in tool results (hosts like Cursor render the embedded copy and don't fetch resources/read)
  • mcp_app_html + MCP_APP_BOOTSTRAP_JS — complete widget document builder: ui/initialize handshake (protocolVersion/appInfo/appCapabilities), ui/notifications/initialized, automatic size-changed via ResizeObserver, multi-channel render-data delivery with late-subscriber replay, and tools/call proxying via window.mcpApp

Protocol version negotiation

initialize previously ignored the client's requested protocolVersion. New supported_protocol_versions config lists additional versions the server will echo back when requested (default behavior unchanged).

Tests

New MCP Apps testset (50 assertions): capability shapes, meta dual-write, negotiation, HTML shell guards, and a full wire-level widget-backed server exercised through the package's own HTTP client (initialize → tools/list → resources/read → tools/call with embedded resource + structuredContent).

🤖 Generated with Claude Code

quinnj and others added 3 commits July 2, 2026 16:59
Server-side helpers for serving interactive HTML widgets that MCP hosts
(Cursor, Claude, ...) render inline with tool results:

- ui_extension_capability / add_ui_extension_capability! — advertise the
  io.modelcontextprotocol/ui extension in initialize
- register_ui_resource! + MCPUIResource — ui:// resources with the
  text/html;profile=mcp-app mime type
- ui_tool_meta — dual-written _meta (ui.resourceUri + ui/resourceUri) for
  cross-host compatibility, with model/app visibility control
- ui_tool_content / embedded_ui_resource — embed the widget copy in tool
  results (required by hosts that do not fetch resources/read)
- mcp_app_html + MCP_APP_BOOTSTRAP_JS — complete widget document builder
  with the ui/initialize handshake, initialized notification, automatic
  size-changed reporting (ResizeObserver), multi-channel render-data
  delivery with late-subscriber replay, and host tools/call proxying
- protocol version negotiation: initialize now echoes a client-requested
  version when listed in the new supported_protocol_versions config

MCP-App-playbook.md documents the full requirement set, verification
runbook (curl + standalone widget harness + Cursor), troubleshooting
table, and a porting checklist for new applications.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…stays valid

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…widgets

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@quinnj quinnj merged commit 9f55a93 into main Jul 2, 2026
7 of 11 checks passed
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