DS DevShelfHub Projects · AI tools
Tutorials / MCP / MCP Apps
MCP Extension Advanced · 8 min read Page 21 of 23

MCP Apps — Interactive UIs in Conversations

By DevShelfHub

Sometimes text isn't enough — you need a slider, a chart, or a form. MCP Apps (SEP-1865) lets servers ship interactive HTML UIs that render inside AI clients while staying safely sandboxed.

Series progress21 / 23

When MCP Apps make sense

📈 Exploring complex data — interactive maps, drillable charts.
⚙️ Many-option configuration — present a form instead of 30 turns of back-and-forth.
🎬 Rich media — PDFs, 3D models, sheet music.
📊 Real-time monitoring — dashboards with live updates.

How it works

  1. Server declares a UI resource using the ui:// URI scheme (MIME type text/html;profile=mcp-app).
  2. A regular tool returns metadata pointing at that UI resource.
  3. Host preloads the UI before/while the tool runs — streaming inputs into the app.
  4. Host fetches the HTML and renders it in a sandboxed iframe.
  5. App talks to host via postMessage using standard MCP JSON-RPC.

Tool metadata example

{
  "name": "show_color_picker",
  "description": "Open an interactive color picker.",
  "inputSchema": { "type": "object" },
  "_meta": {
    "io.modelcontextprotocol/ui": {
      "resourceUri": "ui://color-picker/index.html"
    }
  }
}

Sandbox & security model

Every MCP App runs inside a sandboxed <iframe>. It cannot:

  • Access the parent document or DOM
  • Read host cookies or localStorage
  • Navigate the parent page
  • Execute scripts in the parent context

Communication goes through postMessage. The host filters which MCP capabilities the app can use (e.g., it can disable sendOpenLink).

Building one

Anthropic ships a create-mcp-app skill for Claude Code:

cp -r ext-apps/plugins/mcp-apps/skills/create-mcp-app \
   ~/.claude/skills/create-mcp-app

# Ask Claude Code:
#   "Create an MCP App that displays a color picker"

cd app/
npm install && npm run build && npm run serve

Reference examples in ext-apps include map-server (CesiumJS), threejs-server, scenario-modeler, pdf-server, qr-server, and starter templates for React, Vue, Svelte, Preact, Solid, and vanilla JS.

Client support

MCP Apps is an optional extension — clients must negotiate it explicitly. Today it is supported in Claude, Claude Desktop, VS Code GitHub Copilot, and Goose.

Quick summary

  • MCP Apps embed sandboxed HTML UIs inside conversations
  • Tools reference a ui:// resource via _meta.io.modelcontextprotocol/ui
  • Iframe + postMessage gives strong isolation by default
  • Negotiated as an extension capability — not part of core MCP

MCP Apps FAQ

What is the MCP Apps extension?

MCP Apps (SEP-1865) is an optional MCP extension that lets servers expose interactive HTML UIs rendered inside AI clients. Servers declare a ui:// resource with MIME type text/html;profile=mcp-app, and the host renders it in a sandboxed iframe.

How does the MCP App communicate with the host?

MCP Apps communicate with the host via the browser's postMessage API. The app sends standard JSON-RPC 2.0 MCP messages to the host, which proxies them to the MCP server. This keeps the app sandboxed while still able to call server tools.

Which AI clients support MCP Apps?

As of 2026, MCP Apps are supported in Claude, Claude Desktop, VS Code GitHub Copilot, and Goose. Clients must negotiate the io.modelcontextprotocol/apps capability during initialization before apps can be used.

Is MCP Apps secure?

MCP Apps run in a sandboxed iframe with no direct internet access. All communication goes through the postMessage bridge to the host, which enforces MCP access controls. The app cannot access other browser contexts or local files.

When should I use MCP Apps instead of text responses?

Use MCP Apps for rich, interactive scenarios that text can't handle well: drillable charts, configuration forms with many options, real-time dashboards, PDF viewers, 3D models, or any UX that would require dozens of back-and-forth text turns.

Quick jump:API Reference