Updated December 1, 2026.
Direct Answer: MCP Apps (SEP-1865) renders single-file ui:// HTML inside an opaque default-src 'none' CSP iframe over JSON-RPC postMessage, whereas A2UI 1.0 streams declarative catalog.json adjacency JSONL with RFC 6901 JSON Pointers and zero agent JavaScript, and Generative UI fits ephemeral single-turn widgets without persistent server state.
1. Why Agentic Commerce Needs Declarative & Sandboxed UI Contracts
As autonomous buying moves from plain-text chat completions into rich cart editors, variant pickers, shipping estimators, and B2B approval boards, engineering teams face an architectural fork across three competing UI patterns: MCP Apps (SEP-1865), A2UI 1.0, and ephemeral Generative UI. Picking the wrong surface breaks mobile portability, leaks privileged backend tools into model context, or drops cart state when a conversation panel closes.
On a Universal Commerce Protocol (UCP) storefront, user-facing UI boundaries sit directly alongside cryptographic payment mandates, signed fulfillment webhooks, and WebMCP storefront forms. Understanding exact wire contracts and CSP guarantees prevents teams from building brittle one-off embeds that fail security review.
| Architecture Dimension | MCP Apps (SEP-1865) | A2UI 1.0 | Generative UI |
|---|---|---|---|
| Primary Wire Contract | Single-file ui:// HTML (text/html;profile=mcp-app) over JSON-RPC postMessage | Declarative component adjacency JSONL + RFC 6901 JSON Pointer data model | One-off host-rendered ephemeral HTML widget inside a single turn |
| Security & Isolation | Opaque/unique-origin iframe, default-src ‘none’ CSP, no persistent cookies | Zero agent-supplied HTML/JS execution; renderer validates catalog.json whitelist | Host-sandboxed inline HTML without backing stdio/HTTP MCP server |
| Surface Entrypoints | Inline chat (150-800px), aux_pane tab, global sidebar, file viewer | Cross-platform native/web renderers (React, Angular, Lit, Flutter, SwiftUI, Compose) | Inline chat widget or standalone conversation artifact |
| Tool & Model Visibility | visibility: [‘app’] hides privileged tools from LLM while UI calls server | Server @macro expansion + action.event / action.functionCall separation | No dedicated MCP server; model generates markup directly |
| State Persistence | No ui/resource-teardown in Antigravity — persist eagerly via app tools | Server-side state & surface updates via updateDataModel | Static to the generated turn unless exported manually |

2. Deep Comparison: Wire Contracts, Security & Antigravity Surfaces
MCP Apps (SEP-1865 + Antigravity Extensions)
Standardized in modelcontextprotocol/ext-apps, SEP-1865 packages an interactive interface into a single-file ui:// HTML resource served with MIME type text/html;profile=mcp-app. The host mounts that document inside an opaque, unique-origin iframe enforcing default-src 'none' Content Security Policy rules with no persistent cookies or localStorage. Communication flows exclusively over JSON-RPC postMessage.
Critically, SEP-1865 supports visibility: ['app'], allowing servers to expose privileged cart-commit or refund tools to the sandboxed UI while hiding them from the LLM tool list. Per the Antigravity MCP Apps specification, Antigravity App v2.34.0+ pairs io.modelcontextprotocol/ui with custom com.google.antigravity/ui entrypoints—inline chat (150–800px), aux_pane side tabs, global full-page sidebars, and file viewers—while omitting ui/resource-teardown. Builders must therefore persist checkout state eagerly via app-only tools rather than waiting for an unmount callback.
A2UI 1.0 (Declarative Component Adjacency & RFC 6901 Pointers)
Instead of shipping HTML and JavaScript inside an iframe, A2UI 1.0 streams declarative component adjacency JSONL bound to a client data model via RFC 6901 JSON Pointers (detailed in our A2UI v1.0 protocol guide). Zero agent-supplied HTML or JavaScript executes on the buyer’s device. Instead, the host renderer validates every component against a pre-registered catalog.json whitelist and renders native widgets across React, Angular, Lit, Flutter, SwiftUI, and Jetpack Compose.
On multi-turn commerce flows, server-side @macro expansion, split action.event / action.functionCall handlers, and incremental updateDataModel messages keep token counts low while preserving exact brand design parity across iOS, Android, and desktop web.
3. Weighted 16-Criterion Scorecard & Hybrid Pattern 4
To benchmark all four patterns objectively, our companion Excel COM matrix evaluates 16 weighted criteria covering CSP isolation, zero-JS safety, cross-platform native rendering, RFC 6901 delta updates, eager persistence, and multi-host portability:
| Architecture Pattern | Weighted Score | Max Score | Fit (%) | Security Gates >= 8/10 | Gate Verdict |
|---|---|---|---|---|---|
| A2UI 1.0 Declarative Catalog | 600 | 660 | 90.9% | 3 / 4 | PRODUCTION_READY |
| Hybrid (A2UI Inside ui:// Bundle) | 588 | 660 | 89.1% | 4 / 4 | PRODUCTION_READY |
| MCP Apps (SEP-1865 + Antigravity) | 483 | 660 | 73.2% | 3 / 4 | CONDITIONAL |
| Ephemeral Generative UI | 213 | 660 | 32.3% | 0 / 4 | EXPLORATORY_ONLY |
Two configurations pass the production threshold (>= 80.0% weighted score and at least 3/4 security gates scoring >= 8/10): A2UI 1.0 Declarative Catalog (90.9%, 600/660) and Hybrid (A2UI Inside ui:// Bundle) (89.1%, 588/660, scoring 4/4 on security gates). This Hybrid configuration matches Official Pattern 4 documented in the A2UI MCP Integration Overview: when an MCP host lacks native Flutter or SwiftUI A2UI rendering, wrapping an A2UI surface inside a SEP-1865 ui:// iframe gives merchants both declarative schema validation and opaque-origin iframe containment.
Meanwhile, standalone MCP Apps (SEP-1865) scores 73.2% (483/660, CONDITIONAL)—ideal for rich developer or operator consoles inside Antigravity or Claude Desktop where native mobile portability is unnecessary—while Ephemeral Generative UI scores 32.3% (213/660, EXPLORATORY_ONLY) because it lacks backing MCP server state and repeatable schema controls. Pair these choices with clean Claude Marketplace MCP architectures and RFC 8615 well-known discovery endpoints so buyer agents negotiate capabilities cleanly before rendering any UI surface.
Role-Based Agentic UI Selection Switchboard
4. Frequently Asked Questions
How do MCP Apps (SEP-1865) and A2UI 1.0 differ on code execution?
MCP Apps executes developer-written HTML and JavaScript inside a sandboxed ui:// iframe governed by default-src 'none' CSP and JSON-RPC postMessage, whereas A2UI 1.0 blocks agent-supplied JavaScript entirely and renders strictly from a pre-approved native catalog.json.
Can A2UI 1.0 run inside an MCP App ui:// container?
Yes. A2UI's MCP integration specification documents four official patterns, including embedding an A2UI surface inside a SEP-1865 ui:// bundle so merchants combine iframe origin isolation with declarative catalog validation.
Why must Antigravity MCP Apps persist checkout state eagerly?
Antigravity App v2.34.0+ implements io.modelcontextprotocol/ui plus com.google.antigravity/ui entrypoints (aux_pane, global, file) without a ui/resource-teardown lifecycle hook, so checkout edits must save immediately via app-only tools.
When is Ephemeral Generative UI acceptable in commerce workflows?
Generative UI is suitable for read-only analytical visualizations or one-turn product comparisons that require zero server persistence, zero payment credentials, and zero privileged MCP tool execution.
5. Primary Verification Sources
- Model Context Protocol — MCP Apps Overview (SEP-1865)
- Model Context Protocol ext-apps GitHub Repository
- A2UI Official Specification Portal
- A2UI MCP & MCP Apps Integration Overview (4 Official Patterns)
- Antigravity MCP Apps Documentation (v2.34.0+ Entrypoints)
- RFC 6901: JavaScript Object Notation (JSON) Pointer
- RFC 8615: Well-Known Uniform Resource Identifiers (URIs)

Leave a Reply