Mirror of https://github.com/modelcontextprotocol/ext-apps — Official repo for spec & SDK of MCP Apps protocol - standard for UIs embedded AI chatbots, served by MCP servers
  • TypeScript 76.4%
  • MDX 19.3%
  • JavaScript 4.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jonathan Hefner dce143e92e Complete "Entering / exiting fullscreen" pattern documentation
Add `App_onhostcontextchanged_respondToDisplayMode` example showing how to
listen for display mode changes and update UI with `classList.toggle()`.

Update `App_requestDisplayMode_fullscreen` to `App_requestDisplayMode_toggle`
to show the common toggle pattern checking `availableDisplayModes` first.

Refactor full examples (pdf-server, shadertoy-server) to use
`classList.toggle(class, condition)` instead of add/remove branches.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 13:31:11 -06:00
.claude-plugin Add .claude-plugin/marketplace.json for plugin distribution 2026-01-20 11:38:14 -06:00
.github/workflows feat(qr-server): migrate to uv with PEP 723 inline dependencies 2026-01-14 20:27:35 +00:00
.husky Add pre-commit check for private registry URLs in package-lock.json (#133) 2025-12-16 13:41:50 +00:00
docs Complete "Entering / exiting fullscreen" pattern documentation 2026-01-20 13:31:11 -06:00
examples Complete "Entering / exiting fullscreen" pattern documentation 2026-01-20 13:31:11 -06:00
plugins/mcp-apps Add .claude-plugin/marketplace.json for plugin distribution 2026-01-20 11:38:14 -06:00
scripts fix: ensure lib is built before examples:build (#185) 2026-01-09 01:36:42 +00:00
specification/draft fix(spec): align permissions type with SDK implementation 2026-01-19 17:26:13 +00:00
src Complete "Entering / exiting fullscreen" pattern documentation 2026-01-20 13:31:11 -06:00
tests/e2e feat(examples): add say-server - streaming Pocket TTS with karaoke highlighting (#304) 2026-01-20 00:41:50 +00:00
.gitattributes fix: Windows compatibility - bun as optional dep, cross-env for examples (#145) 2025-12-16 14:07:38 +00:00
.gitignore feat(examples): add say-server - streaming Pocket TTS with karaoke highlighting (#304) 2026-01-20 00:41:50 +00:00
.prettierignore Add Claude Code plugin with "Create MCP App" skill (#256) 2026-01-14 00:50:18 +00:00
.prettierrc.json api: optional Client in AppBridge (allow custom forwarding), better protocol types (AppRequest, AppNotification, AppResult) (#146) 2025-12-13 21:07:13 +00:00
AGENTS.md Consolidate host styling patterns into unified documentation 2026-01-20 13:31:11 -06:00
build.bun.ts build app-with-deps (#221) 2026-01-09 01:26:31 +00:00
CLAUDE.md Add {AGENTS,CLAUDE}.md for AI assistant guidance (#218) 2026-01-12 19:54:24 +00:00
CONTRIBUTING.md tests: add Playwright E2E tests with screenshot golden testing (+ fix examples session handling) (#115) 2025-12-13 20:57:27 +00:00
LICENSE chore: update licensing to Apache 2.0 for new contributions (#251) 2026-01-14 00:42:13 +00:00
package-lock.json feat(examples): add say-server - streaming Pocket TTS with karaoke highlighting (#304) 2026-01-20 00:41:50 +00:00
package.json add EXAMPLE=folder-name support for tests & basic-host (#292) 2026-01-19 20:16:37 +00:00
playwright.config.ts add EXAMPLE=folder-name support for tests & basic-host (#292) 2026-01-19 20:16:37 +00:00
README.md Merge pull request #302 from jonathanhefner/checked-examples 2026-01-20 13:30:01 -06:00
RELEASES.md chore: release 0.3.0 (#204) 2026-01-09 00:55:45 +00:00
tsconfig.json Consolidate host styling patterns into unified documentation 2026-01-20 13:31:11 -06:00
typedoc.config.mjs Add skeleton docs/patterns.md with type-checked companion file 2026-01-20 13:31:11 -06:00

@modelcontextprotocol/ext-apps

npm version API Documentation

This repo contains the SDK and specification for MCP Apps Extension (SEP-1865).

MCP Apps are a proposed standard inspired by MCP-UI and OpenAI's Apps SDK to allow MCP Servers to display interactive UI elements in conversational MCP clients / chatbots.

How It Works

MCP Apps extend the Model Context Protocol to let servers deliver interactive UIs to MCP hosts. Here's how it works:

  1. Tool call — The LLM calls a tool on your server
  2. UI Resource — The tool's definition links to a predeclared ui:// resource containing its HTML interface
  3. Host renders — The host fetches the resource and displays it in a sandboxed iframe
  4. Bidirectional communication — The host passes tool data to the UI via notifications, and the UI can call other tools through the host

This enables dashboards, forms, visualizations, and other rich experiences inside chat interfaces.

Overview

This SDK serves two audiences:

App Developers

Build interactive UIs that run inside MCP-enabled chat clients.

  • SDK for Apps: @modelcontextprotocol/ext-apps — API Docs
  • React hooks: @modelcontextprotocol/ext-apps/react — API Docs

Host Developers

Embed and communicate with MCP Apps in your chat application.

  • SDK for Hosts: @modelcontextprotocol/ext-apps/app-bridge — API Docs

There's no supported host implementation in this repo (beyond the examples/basic-host example).

We have contributed a tentative implementation of hosting / iframing / sandboxing logic to the MCP-UI repository, and expect OSS clients may use it, while other clients might roll their own hosting logic.

Installation

npm install -S @modelcontextprotocol/ext-apps

Claude Code Plugin

A Claude Code plugin is available to help create MCP Apps. To install, run these commands inside Claude Code:

/plugin marketplace add modelcontextprotocol/ext-apps
/plugin install mcp-apps@modelcontextprotocol-ext-apps

Examples

Map Three.js ShaderToy
Map Three.js ShaderToy
Sheet Music Wiki Explorer Cohort Heatmap
Sheet Music Wiki Explorer Cohort Heatmap
Scenario Modeler Budget Allocator Customer Segmentation
Scenario Modeler Budget Allocator Customer Segmentation
System Monitor Transcript Video Resource
System Monitor Transcript Video Resource
PDF Server QR Code Say Demo
PDF Server QR Code (Python) Say Demo

Starter Templates

Basic The same app built with different frameworks — pick your favorite!

React · Vue · Svelte · Preact · Solid · Vanilla JS

The examples/ directory contains additional demo apps showcasing real-world use cases.

MCP client configuration for all examples

Add to your MCP client configuration (stdio transport):

{
  "mcpServers": {
    "basic-react": {
      "command": "npx",
      "args": [
        "-y",
        "--silent",
        "--registry=https://registry.npmjs.org/",
        "@modelcontextprotocol/server-basic-react",
        "--stdio"
      ]
    },
    "basic-vanillajs": {
      "command": "npx",
      "args": [
        "-y",
        "--silent",
        "--registry=https://registry.npmjs.org/",
        "@modelcontextprotocol/server-basic-vanillajs",
        "--stdio"
      ]
    },
    "basic-vue": {
      "command": "npx",
      "args": [
        "-y",
        "--silent",
        "--registry=https://registry.npmjs.org/",
        "@modelcontextprotocol/server-basic-vue",
        "--stdio"
      ]
    },
    "basic-svelte": {
      "command": "npx",
      "args": [
        "-y",
        "--silent",
        "--registry=https://registry.npmjs.org/",
        "@modelcontextprotocol/server-basic-svelte",
        "--stdio"
      ]
    },
    "basic-preact": {
      "command": "npx",
      "args": [
        "-y",
        "--silent",
        "--registry=https://registry.npmjs.org/",
        "@modelcontextprotocol/server-basic-preact",
        "--stdio"
      ]
    },
    "basic-solid": {
      "command": "npx",
      "args": [
        "-y",
        "--silent",
        "--registry=https://registry.npmjs.org/",
        "@modelcontextprotocol/server-basic-solid",
        "--stdio"
      ]
    },
    "budget-allocator": {
      "command": "npx",
      "args": [
        "-y",
        "--silent",
        "--registry=https://registry.npmjs.org/",
        "@modelcontextprotocol/server-budget-allocator",
        "--stdio"
      ]
    },
    "cohort-heatmap": {
      "command": "npx",
      "args": [
        "-y",
        "--silent",
        "--registry=https://registry.npmjs.org/",
        "@modelcontextprotocol/server-cohort-heatmap",
        "--stdio"
      ]
    },
    "customer-segmentation": {
      "command": "npx",
      "args": [
        "-y",
        "--silent",
        "--registry=https://registry.npmjs.org/",
        "@modelcontextprotocol/server-customer-segmentation",
        "--stdio"
      ]
    },
    "map": {
      "command": "npx",
      "args": [
        "-y",
        "--silent",
        "--registry=https://registry.npmjs.org/",
        "@modelcontextprotocol/server-map",
        "--stdio"
      ]
    },
    "pdf": {
      "command": "npx",
      "args": [
        "-y",
        "--silent",
        "--registry=https://registry.npmjs.org/",
        "@modelcontextprotocol/server-pdf",
        "--stdio"
      ]
    },
    "scenario-modeler": {
      "command": "npx",
      "args": [
        "-y",
        "--silent",
        "--registry=https://registry.npmjs.org/",
        "@modelcontextprotocol/server-scenario-modeler",
        "--stdio"
      ]
    },
    "shadertoy": {
      "command": "npx",
      "args": [
        "-y",
        "--silent",
        "--registry=https://registry.npmjs.org/",
        "@modelcontextprotocol/server-shadertoy",
        "--stdio"
      ]
    },
    "sheet-music": {
      "command": "npx",
      "args": [
        "-y",
        "--silent",
        "--registry=https://registry.npmjs.org/",
        "@modelcontextprotocol/server-sheet-music",
        "--stdio"
      ]
    },
    "system-monitor": {
      "command": "npx",
      "args": [
        "-y",
        "--silent",
        "--registry=https://registry.npmjs.org/",
        "@modelcontextprotocol/server-system-monitor",
        "--stdio"
      ]
    },
    "threejs": {
      "command": "npx",
      "args": [
        "-y",
        "--silent",
        "--registry=https://registry.npmjs.org/",
        "@modelcontextprotocol/server-threejs",
        "--stdio"
      ]
    },
    "transcript": {
      "command": "npx",
      "args": [
        "-y",
        "--silent",
        "--registry=https://registry.npmjs.org/",
        "@modelcontextprotocol/server-transcript",
        "--stdio"
      ]
    },
    "video-resource": {
      "command": "npx",
      "args": [
        "-y",
        "--silent",
        "--registry=https://registry.npmjs.org/",
        "@modelcontextprotocol/server-video-resource",
        "--stdio"
      ]
    },
    "wiki-explorer": {
      "command": "npx",
      "args": [
        "-y",
        "--silent",
        "--registry=https://registry.npmjs.org/",
        "@modelcontextprotocol/server-wiki-explorer",
        "--stdio"
      ]
    },
    "qr": {
      "command": "uv",
      "args": [
        "run",
        "/path/to/ext-apps/examples/qr-server/server.py",
        "--stdio"
      ]
    },
    "say": {
      "command": "uv",
      "args": [
        "run",
        "--default-index",
        "https://pypi.org/simple",
        "https://raw.githubusercontent.com/modelcontextprotocol/ext-apps/refs/heads/main/examples/say-server/server.py",
        "--stdio"
      ]
    }
  }
}

Note: The qr server requires cloning the repository first. See qr-server README for details.

To run all examples locally in dev mode:

npm install
npm start

Then open http://localhost:8080/.

Resources