CoolFace
Modelpublic

AbdulElahGwaith/ext-appss

sourceHugging Facemitupdated 8mo agoView on Hugging Face
0likes
Model Card

@modelcontextprotocol/ext-apps

![npm version](https://www.npmjs.com/package/@modelcontextprotocol/ext-apps) ![API Documentation](https://modelcontextprotocol.github.io/ext-apps/api/)

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. 1.Tool call — The LLM calls a tool on your server
  2. 2.UI Resource — The tool's definition links to a predeclared ui:// resource containing its HTML interface
  3. 3.Host renders — The host fetches the resource and displays it in a sandboxed iframe
  4. 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

bash
npm install -S @modelcontextprotocol/ext-apps

Or edit your package.json manually:

json
{
  "dependencies": {
    "@modelcontextprotocol/ext-apps": "^0.0.1"
  }
}

Examples

<!-- prettier-ignore-start --> | | | | |:---:|:---:|:---:| | ![Map](examples/map-server) | ![Three.js](examples/threejs-server) | ![ShaderToy](examples/shadertoy-server) | | **Map** | **Three.js** | **ShaderToy** | | ![Sheet Music](examples/sheet-music-server) | ![Wiki Explorer](examples/wiki-explorer-server) | ![Cohort Heatmap](examples/cohort-heatmap-server) | | **Sheet Music** | **Wiki Explorer** | **Cohort Heatmap** | | ![Scenario Modeler](examples/scenario-modeler-server) | ![Budget Allocator](examples/budget-allocator-server) | ![Customer Segmentation](examples/customer-segmentation-server) | | **Scenario Modeler** | **Budget Allocator** | **Customer Segmentation** | | ![System Monitor](examples/system-monitor-server) | ![Transcript](examples/transcript-server) | ![Video Resource](examples/video-resource-server) | | **System Monitor** | **Transcript** | **Video Resource** | | ![PDF Server](examples/pdf-server) | | | | **PDF Server** | | |

Starter Templates

![Basic](examples/basic-server-react)The same app built with different frameworks — pick your favorite!<br><br>React · Vue · Svelte · Preact · Solid · Vanilla JS

<!-- prettier-ignore-end -->

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

To run all examples:

bash
npm install
npm start

Then open http://localhost:8080/.

Resources