Architectural comparison of an isolated glass sandbox and modular geometric UI tiles

MCP Apps (SEP-1865) vs. A2UI 1.0 vs. Generative UI: Agentic Commerce UI Architecture

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.

Free Commerce UI Architecture Pack (Excel + PDF + Markdown)
Download the SEP-1865 vs. A2UI 1.0 Decision Matrix & Brief
Includes the 16-criterion Excel COM-verified architecture selector (.xlsx), 2-page specification brief (.pdf), and machine-readable Markdown twin (.md).
2-Page Brief (PDF)Architecture Matrix (.xlsx)Markdown Twin (.md)

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 DimensionMCP Apps (SEP-1865)A2UI 1.0Generative UI
Primary Wire ContractSingle-file ui:// HTML (text/html;profile=mcp-app) over JSON-RPC postMessageDeclarative component adjacency JSONL + RFC 6901 JSON Pointer data modelOne-off host-rendered ephemeral HTML widget inside a single turn
Security & IsolationOpaque/unique-origin iframe, default-src ‘none’ CSP, no persistent cookiesZero agent-supplied HTML/JS execution; renderer validates catalog.json whitelistHost-sandboxed inline HTML without backing stdio/HTTP MCP server
Surface EntrypointsInline chat (150-800px), aux_pane tab, global sidebar, file viewerCross-platform native/web renderers (React, Angular, Lit, Flutter, SwiftUI, Compose)Inline chat widget or standalone conversation artifact
Tool & Model Visibilityvisibility: [‘app’] hides privileged tools from LLM while UI calls serverServer @macro expansion + action.event / action.functionCall separationNo dedicated MCP server; model generates markup directly
State PersistenceNo ui/resource-teardown in Antigravity — persist eagerly via app toolsServer-side state & surface updates via updateDataModelStatic to the generated turn unless exported manually
MCP Apps SEP-1865 vs A2UI 1.0 vs Hybrid Isolation Boundaries Diagram
Figure 1: Security isolation boundaries and 16-criterion weighted architecture scores across MCP Apps, A2UI 1.0, Hybrid ui:// embeds, and Generative UI.

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.

Security Isolation Rule
Never rely on ephemeral single-turn HTML generation for live checkout mutations or AP2 payment handshakes. Use A2UI 1.0 declarative catalogs on native surfaces, or embed A2UI inside a SEP-1865 ui:// sandbox when host renderers vary.

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 PatternWeighted ScoreMax ScoreFit (%)Security Gates >= 8/10Gate Verdict
A2UI 1.0 Declarative Catalog60066090.9%3 / 4PRODUCTION_READY
Hybrid (A2UI Inside ui:// Bundle)58866089.1%4 / 4PRODUCTION_READY
MCP Apps (SEP-1865 + Antigravity)48366073.2%3 / 4CONDITIONAL
Ephemeral Generative UI21366032.3%0 / 4EXPLORATORY_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

Commerce Frontend Lead
Architecture Selector (.xlsx)
Adjust 16 security, portability, and UX weights to score A2UI, SEP-1865, and Hybrid embeds.
MCP Server Developer
SEP-1865 Sandbox Rules
Implement text/html;profile=mcp-app bundles, visibility:['app'] tools, and eager persistence.
Security Engineer
Trust Boundary Audit
Pair opaque default-src 'none' iframes with catalog.json validation and WebMCP schemas.
AI Agents & Crawlers
Machine-Readable Spec
Consume the structured Markdown matrix directly for protocol grounding and tool selection.

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

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *