Skip to content

Commit 59c01a4

Browse files
Revise README for clarity and audience focus
- Add API documentation badge linking to GitHub Pages - Reorganize content around two audiences: App Developers and Host Developers - Convert relative links to absolute GitHub URLs for better portability - Simplify installation and examples sections - Add Resources section with links to docs, spec, and discussion 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent c65d7dd commit 59c01a4

1 file changed

Lines changed: 38 additions & 42 deletions

File tree

README.md

Lines changed: 38 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,37 @@
11
# @modelcontextprotocol/ext-apps
22

3-
This repo contains the SDK and [specification](./specification/draft/apps.mdx) for MCP Apps Extension ([SEP-1865](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/1865)).
3+
[![API Documentation](https://img.shields.io/badge/docs-API%20Reference-blue)](https://modelcontextprotocol.github.io/ext-apps/)
44

5-
MCP Apps are 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.
5+
This repo contains the SDK and [specification](https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/draft/apps.mdx) for MCP Apps Extension ([SEP-1865](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/1865)).
66

7-
This repo provides:
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.
88

9-
- [specification/draft/apps.mdx](./specification/draft/apps.mdx): The Draft Extension Specification. It's still... in flux! Feedback welcome! (also see discussions in [SEP-1865](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/1865)).
9+
## Overview
1010

11-
- [types.ts](./src/types.ts): Types of JSON-RPC messages used to communicate between Apps & their host
12-
- Note that MCP Apps also use some standard MCP messages (e.g. `tools/call` for the App to trigger actions on its originating Server - these calls are proxied through the Host), but these types are the additional messages defined by the extension
13-
- [examples/simple-example](./examples/simple-server): Example Server + Apps
14-
- [server.ts](./examples/simple-server/server.ts): MCP server with three tools that declare UI resources of Apps to be show in the chat when called
15-
- [ui-react.tsx](./examples/simple-server/src/ui-react.tsx): React App returned by the `create-ui-react` tool shows how to use the `useApp` hook to register MCP callbacks
16-
- [ui-vanilla.tsx](./examples/simple-server/src/ui-vanilla.ts): vanilla App returned by the `create-ui-vanilla`
17-
- [ui-raw.tsx](./examples/simple-server/src/ui-raw.ts): same as vanilla App but doesn't use the SDK runtime (just its types)
11+
This SDK serves two audiences:
1812

19-
- [examples/simple-host](./examples/simple-host): bare-bone examples on how to host MCP Apps (both use the [AppBridge](./src/app-bridge.ts) class to talk to a hosted App)
20-
- [example-host-react.tsx](./examples/simple-host/src/example-host-react.tsx) uses React (esp. [AppRenderer.tsx](./examples/simple-host/src/AppRenderer.tsx))
21-
- [example-host-vanilla.tsx](./examples/simple-host/src/example-host-vanilla.tsx) doesn't use React
13+
### App Developers
2214

23-
- [message-transport](./src/message-transport.ts): `PostMessageTransport` class that uses `postMessage` to exchange JSON-RPC messages between windows / iframes
15+
Build interactive UIs that run inside MCP-enabled chat clients.
2416

25-
- [app.ts](./src/app.ts): `App` class used by an App to talk to its host
17+
- **SDK for Apps**: `@modelcontextprotocol/ext-apps`[API Docs](https://modelcontextprotocol.github.io/ext-apps/modules/_modelcontextprotocol_ext_apps.html)
18+
- **React hooks**: `@modelcontextprotocol/ext-apps/react`[API Docs](https://modelcontextprotocol.github.io/ext-apps/modules/_modelcontextprotocol_ext_apps_react.html)
2619

27-
- [app-bridge.ts](./src/app-bridge.ts): `AppBridge` class used by the host to talk to a single App
20+
### Host Developers
2821

29-
- _Soon_: more examples!
22+
Embed and communicate with MCP Apps in your chat application.
3023

31-
What this repo does NOT provide:
24+
- **SDK for Hosts**: `@modelcontextprotocol/ext-apps/app-bridge`[API Docs](https://modelcontextprotocol.github.io/ext-apps/modules/_modelcontextprotocol_ext_apps_app_bridge.html)
3225

33-
- There's no _supported_ host implementation in this repo (beyond the [examples/simple-host](./examples/simple-host) example)
34-
- We have [contributed a tentative implementation](https://github.com/MCP-UI-Org/mcp-ui/pull/147) of hosting / iframing / sandboxing logic to the [MCP-UI](https://github.com/idosal/mcp-ui) repository, and expect OSS clients may use it, while other clients might roll their own hosting logic.
26+
There's no _supported_ host implementation in this repo (beyond the [examples/simple-host](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/simple-host) example).
3527

36-
## Using the SDK
28+
We have [contributed a tentative implementation](https://github.com/MCP-UI-Org/mcp-ui/pull/147) of hosting / iframing / sandboxing logic to the [MCP-UI](https://github.com/idosal/mcp-ui) repository, and expect OSS clients may use it, while other clients might roll their own hosting logic.
3729

38-
### Run examples
30+
## Installation
3931

40-
Run the examples in this repo end-to-end:
32+
This repo is in flux and isn't published to npm yet. When it is, it will use the `@modelcontextprotocol/ext-apps` package.
4133

42-
```
43-
npm i
44-
npm start
45-
```
46-
47-
open http://localhost:8080/
48-
49-
> [!NOTE]
50-
> Please bear with us while we add more examples!
51-
52-
### Using the SDK in your project
53-
54-
This repo is in flux and isn't published to npm yet: when it is, it will use the `@modelcontextprotocol/ext-apps` package.
55-
56-
In the meantime you can depend on the SDK library in a Node.js project by installing it w/ its git URL:
34+
In the meantime you can depend on the SDK library in a Node.js project by installing it with its git URL:
5735

5836
```bash
5937
npm install -S git+https://github.com/modelcontextprotocol/ext-apps.git
@@ -63,15 +41,33 @@ Your `package.json` will then look like:
6341

6442
```json
6543
{
66-
...
6744
"dependencies": {
68-
...
6945
"@modelcontextprotocol/ext-apps": "git+https://github.com/modelcontextprotocol/ext-apps.git"
7046
}
7147
}
7248
```
7349

74-
> [!NOTE]
50+
> [!NOTE]
7551
> The build tools (`esbuild`, `tsx`, `typescript`) are in `dependencies` rather than `devDependencies`. This is intentional: it allows the `prepare` script to run when the package is installed from git, since npm doesn't install devDependencies for git dependencies.
7652
>
7753
> Once the package is published to npm with pre-built `dist/`, these can be moved back to `devDependencies`.
54+
55+
## Examples
56+
57+
- [examples/simple-server](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/simple-server) — Example MCP server with tools that return UI Apps
58+
- [examples/simple-host](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/simple-host) — Bare-bones example of hosting MCP Apps
59+
60+
To run the examples end-to-end:
61+
62+
```
63+
npm i
64+
npm start
65+
```
66+
67+
Then open http://localhost:8080/
68+
69+
## Resources
70+
71+
- [API Documentation](https://modelcontextprotocol.github.io/ext-apps/)
72+
- [Draft Specification](https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/draft/apps.mdx)
73+
- [SEP-1865 Discussion](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/1865)

0 commit comments

Comments
 (0)