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.

By 0xScorPionSon

8 min read

@modelcontextprotocol/ext-apps 2.0.4: Interactive MCP Apps UI, Zod 4.2+ Break, and Upgrade Guide

MCP ext-apps 2.0.4 interactive ui:// iframe architecture infographic

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 SDK v2 (@modelcontextprotocol/client@^2.0.0, optional @modelcontextprotocol/server@^2.0.0 for ./server helpers) and removed zod 3 / zod 3.25 fallback support in favor of zod@^4.2.0 Standard JSON Schema output.
  • v2.0.1: Normalized canonical git+https://github.com/modelcontextprotocol/ext-apps.git repository URLs across all package manifests to eliminate npm publish warnings.
  • v2.0.4 (#827): Regenerated SDK schemas for zod 4.6.6 and 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:

  1. Zod 3 Dropped (zod@^4.2.0 Required): The 1.x fallback for zod 3.25 is gone. ext-apps 2.x relies on zod 4.2+'s Standard JSON Schema output, and raw Zod shapes are no longer accepted where full schema objects are expected.
  2. Required v2 Client Peer: App and AppBridge extend Protocol from @modelcontextprotocol/core (pulled transitively via @modelcontextprotocol/client@^2.0.0). Mixing @modelcontextprotocol/sdk 1.x with ext-apps 2.0.4 causes peer-dependency conflicts.
  3. Transitive Vulnerability Hygiene (v2.0.4): Release 2.0.4 specifically addressed security-scanner findings across shell-quote, proxy-addr, body-parser, hono, and vite, making 2.0.4 the 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 (npm prepares provenance enforcement into Jan 2027), so pinning exact lockfile hashes in package-lock.json remains 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:

  1. Template/Data Separation (_meta.ui.resourceUri): In tools/list, a UI-enabled tool declares _meta.ui.resourceUri pointing to a ui:// address (for example ui://server-everything/weather-dashboard). The tool handler itself returns standard text or structuredContent JSON—never raw HTML.
  2. MIME Type & Capability Negotiation: The server serves the bundled single-file HTML (typically built with Vite + vite-plugin-singlefile) with MIME type text/html;profile=mcp-app. On the modern 2026-07-28 MCP spec, servers advertise io.modelcontextprotocol/ui under capabilities.extensions during server/discover; on legacy 2024-11-05 through 2025-11-25 protocols, tools like MCP Toolbox backport negotiation into initialize and tools/list.
  3. Sandboxed PostMessageTransport & AppBridge: Inside the iframe, the View instantiates the App class with PostMessageTransport. Outside the iframe, the Host uses AppBridge to proxy JSON-RPC notifications, forward initial tool arguments/results into the widget, and mediate any follow-up tool calls back to the MCP server.
  4. Token Compaction (_meta.ui.visibility): As documented in kagent's MCP Apps architecture, _meta.ui.visibility lets 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) and threejs-server (Three.js scenes).
  • Data Exploration: cohort-heatmap-server and customer-segmentation-server.
  • Business & Media: scenario-modeler-server, budget-allocator-server, pdf-server, and video-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:

  1. Declaration: tools/list advertises _meta.ui.resourceUri pointing to a ui:// resource while the tool handler returns standard text or structuredContent JSON.
  2. Detection: When tools/call completes, the host detects the linked UI resource and mounts a sandboxed iframe alongside the tool result data.
  3. 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 declaring contentEncoding: base64 on 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:

  1. Verify Node & Zod Versions: Confirm Node.js >= 20 and migrate schemas to zod@^4.2.0 (specifically 4.6.6+ to match 2.0.4 regenerated schemas).
  2. Install Matched 2.x Peers:
    npm install @modelcontextprotocol/ext-apps@^2.0.4 @modelcontextprotocol/client@^2.0.0 zod@^4.2.0
    
    (Add @modelcontextprotocol/server@^2.0.0 if your backend imports @modelcontextprotocol/ext-apps/server.)
  3. Bundle Views as Single HTML Files: Configure vite with vite-plugin-singlefile so CSS and JS inline cleanly into the ui:// resource without external asset 404s inside strict sandboxed CSPs.
  4. Test Locally with basic-host: Run npm start inside the cloned ext-apps repo (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

  1. npm (@modelcontextprotocol/ext-apps) — MCP Apps SDK Package Metadata (2.0.4, 769 dependents) (https://www.npmjs.com/package/@modelcontextprotocol/ext-apps) — Accessed Dec 3, 2026.
  2. GitHub (modelcontextprotocol/ext-apps) — Releases (v2.0.0–v2.0.4) & AGENTS.md (https://github.com/modelcontextprotocol/ext-apps/releases and https://github.com/modelcontextprotocol/ext-apps/blob/main/AGENTS.md) — Accessed Dec 3, 2026.
  3. Model Context Protocol Docs — MCP Apps API Documentation (https://apps.extensions.modelcontextprotocol.io/api/) — Accessed Dec 3, 2026.
  4. Viktor — What are MCP Apps? Interactive interfaces explained (https://viktor.com/blog/what-are-mcp-apps) — Published Dec 1, 2026.
  5. 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.
  6. MCP.so — MCP Apps: How Interactive UI in MCP Works (2026 Guide) (https://mcp.so/blog/mcp-apps-guide) — Published Oct 14, 2026.
  7. kagent Docs — MCP Apps Architecture & Model-Result Compaction (https://kagent.dev/docs/kagent/0.x/concepts/mcp-apps/) — Accessed Dec 3, 2026.
  8. MCP Toolbox for Databases — MCP Apps Configuration & Protocol Backporting (https://mcp-toolbox.dev/documentation/configuration/mcp-apps/) — Published Nov 13, 2026.
  9. The AI Agent Factory — Field guide: interactive connectors & ext-apps skills (https://agentfactory.panaversity.org/building-ai-workers/mcp-apps/field-guide-mcp-apps/) — Published Nov 16, 2026.

More on Packages

Tell us what is not working

A thirty-minute call, no deck and no obligation. You will leave with a straight answer about whether this is worth building - including if that answer is no.

Start a project

Direct line

hello@codebumble.net
Dhaka, Bangladesh  :   local timeCalls in English or Bangla