Skip to content

Commit 0754e16

Browse files
committed
2 parents 4f5cbf5 + f53643b commit 0754e16

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @modelcontextprotocol/ext-apps
22

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

55
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.
66

@@ -13,7 +13,7 @@ This repo provides:
1313
- [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
1414
- [ui-vanilla.tsx](./examples/simple-server/src/ui-vanilla.ts): vanilla App returned by the `create-ui-vanilla`
1515

16-
- [main/specification/draft/apps.mdx](./main/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)).
16+
- [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)).
1717

1818
- [message-transport](./src/message-transport.ts): `PostMessageTransport` class that uses `postMessage` to exchange JSON-RPC messages between windows / iframes
1919

examples/simple-server/server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const getServer = async () => {
4747
uri: "ui://vanilla",
4848
title: "Vanilla UI Template",
4949
description: "A simple vanilla JS UI",
50-
mimeType: "text/vnd.mcp.ui+html",
50+
mimeType: "text/html+mcp",
5151
};
5252

5353
server.registerResource(
@@ -89,7 +89,7 @@ const getServer = async () => {
8989
uri: "ui://react",
9090
title: "React UI Template",
9191
description: "A React-based UI",
92-
mimeType: "text/vnd.mcp.ui+html",
92+
mimeType: "text/html+mcp",
9393
};
9494

9595
server.registerResource(

specification/draft/apps.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
## Abstract
99

10-
This SEP proposes an extension (per SEP-1724) to MCP that enables servers to deliver interactive user interfaces to hosts. MCP Apps introduces a standardized pattern for declaring UI resources via the `ui://` URI scheme, associating them with tools through metadata, and facilitating bidirectional communication between the UI and the host using MCP's JSON-RPC base protocol. This extension addresses the growing community need for rich, interactive experiences in MCP-enabled applications, maintaining security, auditability, and alignment with MCP's core architecture. The initial specification focuses on HTML resources (`text/vnd.mcp.ui+html`) with a clear path for future extensions.
10+
This SEP proposes an extension (per SEP-1724) to MCP that enables servers to deliver interactive user interfaces to hosts. MCP Apps introduces a standardized pattern for declaring UI resources via the `ui://` URI scheme, associating them with tools through metadata, and facilitating bidirectional communication between the UI and the host using MCP's JSON-RPC base protocol. This extension addresses the growing community need for rich, interactive experiences in MCP-enabled applications, maintaining security, auditability, and alignment with MCP's core architecture. The initial specification focuses on HTML resources (`text/html+mcp`) with a clear path for future extensions.
1111

1212
## Motivation
1313

@@ -43,7 +43,7 @@ MCP Apps extends the Model Context Protocol to enable servers to deliver interac
4343
- **Bidirectional Communication:** UI iframes communicate with hosts using standard MCP JSON-RPC protocol
4444
- **Security Model:** Mandatory iframe sandboxing with auditable communication
4545

46-
This specification focuses on HTML content (`text/vnd.mcp.ui+html`) as the initial content type, with extensibility for future formats.
46+
This specification focuses on HTML content (`text/html+mcp`) as the initial content type, with extensibility for future formats.
4747

4848
As an extension, MCP Apps is optional and must be explicitly negotiated between clients and servers through the extension capabilities mechanism (see Capability Negotiation section).
4949

@@ -56,7 +56,7 @@ interface UIResource {
5656
uri: string; // MUST start with 'ui://'
5757
name: string; // Human-readable identifier
5858
description?: string; // Description of the UI resource
59-
mimeType: string; // SHOULD be 'text/vnd.mcp.ui+html' in MVP
59+
mimeType: string; // SHOULD be 'text/html+mcp' in MVP
6060
_meta?: UIResourceMeta // Resource Metadata
6161
}
6262

@@ -77,7 +77,7 @@ The resource content is returned via `resources/read`:
7777
{
7878
contents: [{
7979
uri: string; // Matching UI resource URI
80-
mimeType: "text/vnd.mcp.ui+html"; // MUST be "text/vnd.mcp.ui+html"
80+
mimeType: "text/html+mcp"; // MUST be "text/html+mcp"
8181
text?: string; // HTML content as string
8282
blob?: string; // OR base64-encoded HTML
8383
_meta?: {
@@ -97,7 +97,7 @@ The resource content is returned via `resources/read`:
9797
#### Content Requirements:
9898

9999
- URI MUST start with `ui://` scheme
100-
- `mimeType` MUST be `text/vnd.mcp.ui+html` (other types reserved for future extensions)
100+
- `mimeType` MUST be `text/html+mcp` (other types reserved for future extensions)
101101
- Content MUST be provided via either `text` (string) or `blob` (base64-encoded)
102102
- Content MUST be valid HTML5 document
103103

@@ -156,14 +156,14 @@ Example:
156156
"uri": "ui://weather-server/dashboard-template",
157157
"name": "weather_dashboard",
158158
"description": "Interactive weather dashboard widget",
159-
"mimeType": "text/vnd.mcp.ui+html"
159+
"mimeType": "text/html+mcp"
160160
}
161161

162162
// Resource content with metadata
163163
{
164164
"contents": [{
165165
"uri": "ui://weather-server/dashboard-template",
166-
"mimeType": "text/vnd.mcp.ui+html",
166+
"mimeType": "text/html+mcp",
167167
"text": "<!DOCTYPE html><html>...</html>",
168168
"_meta": {
169169
"ui" : {
@@ -828,7 +828,7 @@ Clients advertise MCP Apps support in the initialize request using the extension
828828
"capabilities": {
829829
"extensions": {
830830
"io.modelcontextprotocol/ui": {
831-
"mimeTypes": ["text/vnd.mcp.ui+html"]
831+
"mimeTypes": ["text/html+mcp"]
832832
}
833833
}
834834
},
@@ -842,7 +842,7 @@ Clients advertise MCP Apps support in the initialize request using the extension
842842

843843
**Extension Settings:**
844844

845-
- `mimeTypes`: Array of supported content types (REQUIRED, e.g., `["text/vnd.mcp.ui+html"]`)
845+
- `mimeTypes`: Array of supported content types (REQUIRED, e.g., `["text/html+mcp"]`)
846846

847847
Future versions may add additional settings:
848848

@@ -855,7 +855,7 @@ Servers SHOULD check client (host would-be) capabilities before registering UI-e
855855

856856
```typescript
857857
const hasUISupport =
858-
clientCapabilities?.extensions?.["io.modelcontextprotocol/ui"]?.mimeTypes?.includes("text/vnd.mcp.ui+html");
858+
clientCapabilities?.extensions?.["io.modelcontextprotocol/ui"]?.mimeTypes?.includes("text/html+mcp");
859859

860860
if (hasUISupport) {
861861
// Register tools with UI templates
@@ -939,7 +939,7 @@ This proposal synthesizes feedback from the UI CWG and MCP-UI community, host im
939939

940940
#### 3. Support Raw HTML Content Type
941941

942-
**Decision:** MVP supports only `text/vnd.mcp.ui+html` (rawHtml), with other types explicitly deferred.
942+
**Decision:** MVP supports only `text/html+mcp` (rawHtml), with other types explicitly deferred.
943943

944944
**Rationale:**
945945

0 commit comments

Comments
 (0)