Packages
@modelcontextprotocol/ext-apps 2.0.4: Interactive MCP Apps UI, Zod 4.2+ Break, and Upgrade Guide
Technical breakdown of @modelcontextprotocol/ext-apps 2.0.4 (769 npm dependents, Node.js 20+): SEP-1865 sandboxed ui:// iframe rendering across ChatGPT, Claude, VS Code, and Cowork, breaking Zod 4.2+ requirement, and v2.0.4 transitive dependency patches.
8 min read
@modelcontextprotocol/ext-apps 2.0.4: Interactive MCP Apps UI, Zod 4.2+ Break, and Upgrade Guide
Executive Summary
@modelcontextprotocol/ext-apps (2.0.4, npm / TypeScript) is the official Model Context Protocol (MCP) Apps SDK implementing the SEP-1865 extension (io.modelcontextprotocol/ui, specification 2026-01-26). Instead of forcing LLM hosts to display raw JSON or plain text, ext-apps enables MCP servers to attach interactive HTML/CSS/JS interfaces—charts, forms, maps, and dashboards—at ui:// resource URIs that compliant hosts render inside sandboxed iframes.
Verified as of December 3, 2026, adoption has grown rapidly across both servers and hosts: 769 npm projects depend on @modelcontextprotocol/ext-apps, while ChatGPT, Claude, VS Code, Goose, Postman, Microsoft Copilot Cowork, and kagent support rendering MCP Apps inline. The 2.x line (2.0.4) introduces a hard breaking dependency shift—dropping Zod 3 completely in favor of zod@^4.2.0 and requiring Node.js 20+ alongside @modelcontextprotocol/client@^2.0.0—while 2.0.4 specifically refreshes flagged transitive dependencies (hono, vite, body-parser, shell-quote, proxy-addr, and zod 4.6.6 schema regeneration).
Confidence Assessment: High for npm package metadata (2.0.4, 769 dependents, 1.8 MB / 47 distributed files), GitHub release notes (v2.0.0–v2.0.4), Microsoft Cowork/MCP.so protocol specs, and Vite bundling guides. Medium for exact monthly npm download totals for ext-apps, as npm's public snippet omits the raw 30-day download counter.
Adoption Telemetry & Version Changelog
npm & Ecosystem Telemetry (Verified December 3, 2026)
| Metric | Verified Value | Source & Verification Date |
|---|---|---|
| Package & Ecosystem | @modelcontextprotocol/ext-apps (npm, TypeScript / JS) |
npm (Dec 3, 2026) |
| Latest Version | 2.0.4 (47 files, 1.8 MB bundle, 7 entry points) |
npm / AI Heartland |
| npm Dependents | 769 projects in the npm registry |
npm |
| Runtime & Peer Floors | Node.js 20+ · @modelcontextprotocol/client@^2.0.0 · zod@^4.2.0 |
GitHub Releases / MCP Apps Docs |
| Protocol Standard | SEP-1865 (io.modelcontextprotocol/ui, stable 2026-01-26) |
MCP.so / Microsoft Learn |
Supported Clients & Recent Release Milestones (v2.0.0 – v2.0.4)
As highlighted in Viktor's December 1, 2026 explainer and Microsoft's Cowork author guide, MCP Apps now run across major AI hosts without custom per-vendor UI code:
- Supported Hosts: ChatGPT, Claude, VS Code, Goose, Postman, Microsoft Copilot Cowork, kagent, MCPJam, mcp-use, and Alpic Playground.
v2.0.0(Major Break): Migrated to MCP SDKv2(@modelcontextprotocol/client@^2.0.0, optional@modelcontextprotocol/server@^2.0.0for./serverhelpers) and removedzod 3/zod 3.25fallback support in favor ofzod@^4.2.0Standard JSON Schema output.v2.0.1: Normalized canonicalgit+https://github.com/modelcontextprotocol/ext-apps.gitrepository URLs across all package manifests to eliminate npm publish warnings.v2.0.4(#827): Regenerated SDK schemas forzod 4.6.6and refreshed flagged transitive dependencies (shell-quote,proxy-addr,body-parser,zod,source-map-js,ip-address,hono,vite,@vue/server-renderer, and Solid toolchain companions).
Security Patches, Breaking Changes & Internals
Breaking Changes in 2.x & Transitive Security Refreshes
Teams upgrading from ext-apps 1.x or integrating into existing TypeScript monorepos must plan around three breaking constraints documented in GitHub Releases:
- Zod 3 Dropped (
zod@^4.2.0Required): The1.xfallback forzod 3.25is gone.ext-apps 2.xrelies onzod 4.2+'s Standard JSON Schema output, and raw Zod shapes are no longer accepted where full schema objects are expected. - Required
v2Client Peer:AppandAppBridgeextendProtocolfrom@modelcontextprotocol/core(pulled transitively via@modelcontextprotocol/client@^2.0.0). Mixing@modelcontextprotocol/sdk1.xwithext-apps 2.0.4causes peer-dependency conflicts. - Transitive Vulnerability Hygiene (
v2.0.4): Release2.0.4specifically addressed security-scanner findings acrossshell-quote,proxy-addr,body-parser,hono, andvite, making2.0.4the mandatory minimum patch target for CI pipelines. Also note that npm's provenance widget intermittently reported a fetch warning on@modelcontextprotocol/ext-apps@2.0.4(npmprepares provenance enforcement into Jan 2027), so pinning exact lockfile hashes inpackage-lock.jsonremains best practice.
Internals: How ui:// Sandboxed Iframes & AppBridge Work
According to ext-apps/AGENTS.md and MCP.so, the SDK separates Server, View, and Host into three clean roles:
- Template/Data Separation (
_meta.ui.resourceUri): Intools/list, a UI-enabled tool declares_meta.ui.resourceUripointing to aui://address (for exampleui://server-everything/weather-dashboard). The tool handler itself returns standardtextorstructuredContentJSON—never raw HTML. - MIME Type & Capability Negotiation: The server serves the bundled single-file HTML (typically built with
Vite+vite-plugin-singlefile) with MIME typetext/html;profile=mcp-app. On the modern2026-07-28MCP spec, servers advertiseio.modelcontextprotocol/uiundercapabilities.extensionsduringserver/discover; on legacy2024-11-05through2025-11-25protocols, tools like MCP Toolbox backport negotiation intoinitializeandtools/list. - Sandboxed
PostMessageTransport&AppBridge: Inside the iframe, the View instantiates theAppclass withPostMessageTransport. Outside the iframe, the Host usesAppBridgeto proxy JSON-RPC notifications, forward initial tool arguments/results into the widget, and mediate any follow-up tool calls back to the MCP server. - Token Compaction (
_meta.ui.visibility): As documented in kagent's MCP Apps architecture,_meta.ui.visibilitylets servers mark payloads as app-only versus model-visible so large UI datasets do not bloat the LLM's context window.
CSP Policies, Device Permissions & Legacy Protocol Backporting
Production MCP Apps must balance interactivity with strict iframe isolation. As documented in MCP Toolbox's configuration guide, ui:// resources expose explicit controls for Content Security Policies (CSP), device permissions, application domain, and container display settings. On the modern 2026-07-28 MCP specification, servers advertise io.modelcontextprotocol/ui under capabilities.extensions during server/discover and only attach _meta.ui to tools when the client also declares io.modelcontextprotocol/ui. For older 2024-11-05 through 2025-11-25 clients that omit extension capabilities, servers can backport negotiation into initialize/tools/list or offer a --disable-extension-check flag. Teams should also note Viktor's caveat that some host organizations gate MCP App rendering behind workspace or plan permissions.
Reference App Servers & Coding Agent Skills
To accelerate adoption, the ext-apps repository ships runnable Node.js examples published as @modelcontextprotocol/server-<name> across four domains:
- Visualization:
map-server(CesiumJS globe) andthreejs-server(Three.js scenes). - Data Exploration:
cohort-heatmap-serverandcustomer-segmentation-server. - Business & Media:
scenario-modeler-server,budget-allocator-server,pdf-server, andvideo-resource-server.
Coding-agent users can also install official ext-apps skills directly into Claude Code (/plugin marketplace add modelcontextprotocol/ext-apps) or other agents via npx skills add modelcontextprotocol/ext-apps (The AI Agent Factory).
Updated TypeScript Usage (App View + ui:// Server Registration)
import { App } from "@modelcontextprotocol/ext-apps";
// Inside the sandboxed iframe View (bundled via Vite + vite-plugin-singlefile)
const app = new App({ name: "TelemetryView", version: "1.0.0" });
app.ontoolresult = (result) => {
// Render structuredContent pushed by the host via AppBridge
console.log("Tool result received:", result.structuredContent);
};
await app.connect();
On the server side, attach _meta: { ui: { resourceUri: "ui://metrics/panel" } } to the tool definition and serve the single-file HTML bundle under mimeType: "text/html;profile=mcp-app" using @modelcontextprotocol/ext-apps/server.
Ecosystem Comparison & Upgrade Checklist
Interactive Agent UI Approaches Compared (Verified December 2026)
| Approach / Package | Protocol Standard | UI Delivery & Sandboxing | Key Trade-Offs |
|---|---|---|---|
@modelcontextprotocol/ext-apps (2.0.4) |
Official SEP-1865 (io.modelcontextprotocol/ui) |
ui:// single-file HTML (text/html;profile=mcp-app) in sandboxed iframe |
Cross-host portability (ChatGPT, Claude, VS Code, Cowork); requires zod@^4.2.0 & Node 20+ |
Plain MCP Tools (@modelcontextprotocol/server 2.3.1) |
Core MCP 2026-07-28 | Text & structuredContent JSON rendered by host chat UI |
Zero frontend build step, but no custom interactive charts, forms, or canvases |
| Custom Host-Specific Plugins | Vendor-proprietary | Native host webview or custom React components | Deepest host integration, but zero portability across competing AI clients |
Host Execution Contract: Cowork's 3-Step Widget Flow
In enterprise hosts like Microsoft Copilot Cowork, widget rendering follows a strict three-step contract:
- Declaration:
tools/listadvertises_meta.ui.resourceUripointing to aui://resource while the tool handler returns standardtextorstructuredContentJSON. - Detection: When
tools/callcompletes, the host detects the linked UI resource and mounts a sandboxed iframe alongside the tool result data. - Fetch & Render: The host fetches the
ui://HTML template from your MCP server and delivers the result payload over JSON-RPC. Note that if a tool merely needs to accept a workspace file as input without rendering a custom UI, Microsoft recommends declaringcontentEncoding: base64on the tool parameter rather than shipping an MCP App widget.
Seven Entry Points & Safe Upgrade Checklist
@modelcontextprotocol/ext-apps 2.0.4 ships 7 entry points (including ./react, ./server, and ./app-bridge). Follow these steps when upgrading or adopting 2.0.4:
- Verify Node & Zod Versions: Confirm
Node.js >= 20and migrate schemas tozod@^4.2.0(specifically4.6.6+to match2.0.4regenerated schemas). - Install Matched
2.xPeers:
(Addnpm install @modelcontextprotocol/ext-apps@^2.0.4 @modelcontextprotocol/client@^2.0.0 zod@^4.2.0@modelcontextprotocol/server@^2.0.0if your backend imports@modelcontextprotocol/ext-apps/server.) - Bundle Views as Single HTML Files: Configure
vitewithvite-plugin-singlefileso CSS and JS inline cleanly into theui://resource without external asset 404s inside strict sandboxed CSPs. - Test Locally with
basic-host: Runnpm startinside the clonedext-appsrepo (http://localhost:8080/) or use kagent's standalone app-testing dashboard before deploying to ChatGPT or Claude connectors.
Frequently Asked Questions
1. What is @modelcontextprotocol/ext-apps used for?
It is the official TypeScript SDK for MCP Apps (SEP-1865), enabling MCP servers to serve interactive HTML/JS UIs (ui:// resources) that render inside sandboxed iframes in ChatGPT, Claude, VS Code, Microsoft Copilot Cowork, Postman, kagent, and Goose.
2. Why did ext-apps 2.0 break projects using Zod 3?
SDK 2.0 removed the 1.x fallback for zod 3.25 and now strictly requires zod@^4.2.0 for Standard JSON Schema output, alongside Node.js 20+ and @modelcontextprotocol/client@^2.0.0.
3. What security fixes are included in ext-apps 2.0.4?
Release 2.0.4 regenerated schemas for zod 4.6.6 and refreshed flagged transitive dependencies including shell-quote, proxy-addr, body-parser, source-map-js, ip-address, hono, and vite.
4. How does the iframe UI communicate with the AI host?
The View uses the App class over PostMessageTransport, while the host uses AppBridge to proxy JSON-RPC messages, push tool inputs/results, and forward follow-up tool calls back to the MCP server.
5. Do MCP Apps bloat the LLM's context window with HTML?
No. Because of template/data separation, the tool handler returns lightweight JSON (structuredContent) while the ui:// HTML template is fetched separately by the host—and _meta.ui.visibility lets servers hide app-only payloads from the model.
Sources
- npm (
@modelcontextprotocol/ext-apps) — MCP Apps SDK Package Metadata (2.0.4,769dependents) (https://www.npmjs.com/package/@modelcontextprotocol/ext-apps) — Accessed Dec 3, 2026. - GitHub (
modelcontextprotocol/ext-apps) — Releases (v2.0.0–v2.0.4) &AGENTS.md(https://github.com/modelcontextprotocol/ext-apps/releasesandhttps://github.com/modelcontextprotocol/ext-apps/blob/main/AGENTS.md) — Accessed Dec 3, 2026. - Model Context Protocol Docs — MCP Apps API Documentation (
https://apps.extensions.modelcontextprotocol.io/api/) — Accessed Dec 3, 2026. - Viktor — What are MCP Apps? Interactive interfaces explained (
https://viktor.com/blog/what-are-mcp-apps) — Published Dec 1, 2026. - Microsoft Learn — MCP apps plugin author guide for Cowork (SEP-1865) (
https://learn.microsoft.com/en-us/copilot/cowork/mcp-apps-support) — Published Nov 2, 2026. - MCP.so — MCP Apps: How Interactive UI in MCP Works (2026 Guide) (
https://mcp.so/blog/mcp-apps-guide) — Published Oct 14, 2026. - kagent Docs — MCP Apps Architecture & Model-Result Compaction (
https://kagent.dev/docs/kagent/0.x/concepts/mcp-apps/) — Accessed Dec 3, 2026. - MCP Toolbox for Databases — MCP Apps Configuration & Protocol Backporting (
https://mcp-toolbox.dev/documentation/configuration/mcp-apps/) — Published Nov 13, 2026. - The AI Agent Factory — Field guide: interactive connectors &
ext-appsskills (https://agentfactory.panaversity.org/building-ai-workers/mcp-apps/field-guide-mcp-apps/) — Published Nov 16, 2026.