You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JSDoc `@example` tags should pull type-checked code from companion `.examples.ts` files (e.g., `app.ts` → `app.examples.ts`). Use ` ```ts source="./file.examples.ts#regionName" ` fences referencing `//#region regionName` blocks, then run `npm run sync:snippets`. Region names follow `exportedName_variant` or `ClassName_methodName_variant` pattern (e.g., `useApp_basicUsage`, `App_hostCapabilities_checkAfterConnection`).
83
+
JSDoc `@example` tags should pull type-checked code from companion `.examples.ts` files (e.g., `app.ts` → `app.examples.ts`). Use ` ```ts source="./file.examples.ts#regionName" ` fences referencing `//#region regionName` blocks; region names follow `exportedName_variant` or `ClassName_methodName_variant` pattern (e.g., `useApp_basicUsage`, `App_hostCapabilities_checkAfterConnection`). For whole-file inclusion (any file type), omit the `#regionName`. Run `npm run sync:snippets` to sync.
84
84
85
85
Standalone docs in `docs/` (listed in `typedoc.config.mjs``projectDocuments`) can also have type-checked companion `.ts`/`.tsx` files using the same pattern.
Copy file name to clipboardExpand all lines: README.md
+39-24Lines changed: 39 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,29 +6,33 @@ This repo contains the SDK and [specification](https://github.com/modelcontextpr
6
6
7
7
MCP Apps are a proposed standard inspired by [MCP-UI](https://mcpui.dev/) and [OpenAI's Apps SDK](https://developers.openai.com/apps-sdk/) to allow MCP Servers to display interactive UI elements in conversational MCP clients / chatbots.
8
8
9
+
## Why MCP Apps?
10
+
11
+
MCP tools return text and structured data. That works for many cases, but not when you need an interactive UI, like a chart, form, or video player.
12
+
13
+
MCP Apps provide a standardized way to deliver interactive UIs from MCP servers. Your UI renders inline in the conversation, in context, in any compliant host.
14
+
9
15
## How It Works
10
16
11
-
MCP Apps extend the Model Context Protocol to let servers deliver **interactive UIs** to MCP hosts. Here's how it works:
17
+
MCP Apps extend the Model Context Protocol by letting tools declare UI resources:
12
18
13
-
1.**Tool call** — The LLM calls a tool on your server
14
-
2.**UI Resource** — The tool's definition links to a predeclared `ui://` resource containing its HTML interface
19
+
1.**Tool definition** — Your tool declares a `ui://` resource containing its HTML interface
20
+
2.**Tool call** — The LLM calls the tool on your server
15
21
3.**Host renders** — The host fetches the resource and displays it in a sandboxed iframe
16
22
4.**Bidirectional communication** — The host passes tool data to the UI via notifications, and the UI can call other tools through the host
17
23
18
-
This enables dashboards, forms, visualizations, and other rich experiences inside chat interfaces.
19
-
20
-
## Overview
24
+
## Using the SDK
21
25
22
26
This SDK serves two audiences:
23
27
24
-
### App Developers
28
+
### For App Developers
25
29
26
30
Build interactive UIs that run inside MCP-enabled chat clients.
27
31
28
32
-**SDK for Apps**: `@modelcontextprotocol/ext-apps` — [API Docs](https://modelcontextprotocol.github.io/ext-apps/api/modules/app.html)
Embed and communicate with MCP Apps in your chat application.
34
38
@@ -44,17 +48,21 @@ We have [contributed a tentative implementation](https://github.com/MCP-UI-Org/m
44
48
npm install -S @modelcontextprotocol/ext-apps
45
49
```
46
50
47
-
### Claude Code Plugin
51
+
### Install Agent Skills
48
52
49
-
A [Claude Code plugin](https://github.com/modelcontextprotocol/ext-apps/tree/main/plugins/mcp-apps) is available to help create MCP Apps. To install, run these commands inside Claude Code:
53
+
This repository provides two [Agent Skills](https://agentskills.io/) for building MCP Apps. You can install the skills as a Claude Code plugin:
For more information, including instructions for installing the skills in your favorite AI coding agent, see the [agent skills guide](./docs/agent-skills.md).
61
+
56
62
## Examples
57
63
64
+
The [`examples/`](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples) directory contains demo apps showcasing real-world use cases.
65
+
58
66
<!-- prettier-ignore-start -->
59
67
||||
60
68
|:---:|:---:|:---:|
@@ -76,12 +84,27 @@ A [Claude Code plugin](https://github.com/modelcontextprotocol/ext-apps/tree/mai
76
84
|[](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-server-react)| The same app built with different frameworks — pick your favorite!<br><br>[React](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-server-react) · [Vue](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-server-vue) · [Svelte](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-server-svelte) · [Preact](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-server-preact) · [Solid](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-server-solid) · [Vanilla JS](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-server-vanillajs)|
77
85
<!-- prettier-ignore-end -->
78
86
79
-
The [`examples/`](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples) directory contains additional demo apps showcasing real-world use cases.
87
+
### Running the Examples
80
88
81
-
<details>
82
-
<summary>MCP client configuration for all examples</summary>
89
+
#### With basic-host
90
+
91
+
To run all examples locally using [basic-host](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/basic-host) (the reference host implementation included in this repo):
Add to your MCP client configuration (stdio transport):
100
+
Then open http://localhost:8080/.
101
+
102
+
#### With MCP Clients
103
+
104
+
To use these examples with MCP clients that support the stdio transport (such as Claude Desktop or VS Code), add this MCP server configuration to your client's settings:
105
+
106
+
<details>
107
+
<summary>MCP client configuration for all examples (using stdio)</summary>
85
108
86
109
```json
87
110
{
@@ -298,18 +321,10 @@ Add to your MCP client configuration (stdio transport):
298
321
}
299
322
```
300
323
301
-
> **Note:** The `qr` server requires cloning the repository first. See [qr-server README](examples/qr-server) for details.
302
-
303
324
</details>
304
325
305
-
To run all examples locally in dev mode:
306
-
307
-
```bash
308
-
npm install
309
-
npm start
310
-
```
311
-
312
-
Then open http://localhost:8080/.
326
+
> [!NOTE]
327
+
> The `qr` server requires cloning the repository first. See [qr-server README](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/qr-server) for details.
[Agent Skills](https://agentskills.io/) are instruction sets that guide AI coding agents through tasks. When you invoke a skill, the agent takes the lead — it asks clarifying questions, makes decisions based on your codebase, and executes the work.
8
+
9
+
This repository provides two skills:
10
+
11
+
-[**create-mcp-app**](https://github.com/modelcontextprotocol/ext-apps/blob/main/plugins/mcp-apps/skills/create-mcp-app/SKILL.md) — scaffolds a new MCP App with an interactive UI
12
+
-[**migrate-oai-app**](https://github.com/modelcontextprotocol/ext-apps/blob/main/plugins/mcp-apps/skills/migrate-oai-app/SKILL.md) — migrates an existing OpenAI App to the MCP Apps SDK
13
+
14
+
## Install the Skills
15
+
16
+
Choose one of the following installation methods based on your agent:
Copy file name to clipboardExpand all lines: docs/migrate_from_openai_apps.md
+17-7Lines changed: 17 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,17 @@ title: Migrate OpenAI App
4
4
5
5
# Migrating from OpenAI Apps SDK to MCP Apps SDK
6
6
7
-
This guide helps you migrate from the OpenAI Apps SDK to the MCP Apps SDK (`@modelcontextprotocol/ext-apps`).
7
+
This reference maps OpenAI Apps SDK concepts to their MCP Apps SDK (`@modelcontextprotocol/ext-apps`) equivalents. Use the tables below for quick lookup during migration, and refer to the code examples for complete before/after comparisons.
8
+
9
+
This guide covers server-side changes first (metadata, tools, resources), then client-side changes (setup, context, events).
10
+
11
+
> [!NOTE]
12
+
> Some OpenAI Apps SDK features don't have MCP equivalents yet. These are marked "Not yet implemented" in the tables below.
8
13
9
14
## Server-Side
10
15
16
+
The server-side changes involve updating metadata structure and using helper functions.
17
+
11
18
### Quick Start Comparison
12
19
13
20
| OpenAI Apps SDK | MCP Apps SDK |
@@ -190,6 +197,8 @@ function createServer() {
190
197
191
198
## Client-Side
192
199
200
+
Client-side migration involves replacing the implicit `window.openai` global with an explicit `App` instance.
0 commit comments