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
Standardize notification naming and fix formatting in MCP Apps spec
Updates the MCP Apps specification to consistently use the
`ui/notifications/` prefix for all notification methods (e.g.,
`ui/notifications/sandbox-ready`, `ui/notifications/tool-result`). Also
removes trailing whitespace, fixes tab/space inconsistencies, improves
code formatting with proper backticks, and clarifies terminology
throughout the document.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
Copy file name to clipboardExpand all lines: specification/draft/apps.mdx
+22-22Lines changed: 22 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# SEP-1865: MCP Apps: Interactive User Interfaces for MCP
2
2
3
-
**Track:** Extensions
4
-
**Authors:** Ido Salomon, Liad Yosef, Olivier Chafik, Jerome Swannack, Jonathan Hefner, Anton Pidkuiko, Nick Cooper, Bryan Ashley, Alexei Christakis
5
-
**Status:** Draft
3
+
**Track:** Extensions
4
+
**Authors:** Ido Salomon, Liad Yosef, Olivier Chafik, Jerome Swannack, Jonathan Hefner, Anton Pidkuiko, Nick Cooper, Bryan Ashley, Alexei Christakis
5
+
**Status:** Draft
6
6
**Created:** 2025-11-21
7
7
8
8
## Abstract
@@ -86,7 +86,7 @@ The resource content is returned via `resources/read`:
86
86
connect_domains?: string[]; // Origins for fetch/XHR/WebSocket
87
87
resource_domains?:string[]; // Origins for images, scripts, etc
88
88
};
89
-
"domain"?:string;
89
+
"domain"?:string;
90
90
"prefersBorder"?:boolean;
91
91
};
92
92
};
@@ -293,14 +293,14 @@ If the Host is a web page, it MUST wrap the Guest UI and communicate with it thr
293
293
294
294
1. The Host and the Sandbox MUST have different origins.
295
295
2. The Sandbox MUST have the following permissions: `allow-scripts`, `allow-same-origin`.
296
-
3. The Sandbox MUST send a `ui/sandbox-ready` notification to the host when it’s ready to process an `ui/sandbox-resource-ready` notification.
297
-
4. Once the Sandbox is ready, the Host MUST send the raw HTML resource to load in a `ui/sandbox-resource-ready` notification.
296
+
3. The Sandbox MUST send a `ui/notifications/sandbox-ready` notification to the host when it’s ready to process an `ui/sandbox-resource-ready` notification.
297
+
4. Once the Sandbox is ready, the Host MUST send the raw HTML resource to load in a `ui/notifications/sandbox-resource-ready` notification.
298
298
5. The Sandbox MUST load the raw HTML of the Guest UI with CSP settings that:
299
299
- Enforce the domains declared in `ui.csp` metadata
300
300
- Prevent nested iframes (`frame-src 'none'`)
301
301
- Block dangerous features (`object-src 'none'`, `base-uri 'self'`)
302
302
- Apply restrictive defaults if no CSP metadata is provided
303
-
6. The Sandbox MUST forward messages sent by the Host to the Guest UI, and vice versa, with any method that doesn’t start with `ui/sandbox-`. This includes lifecycle messages, e.g.`initialize` request & `initialized` notification both sent by the Guest UI. The Host MUST NOT send any request or notification to the Guest UI before it receives an `initialized` notification.
303
+
6. The Sandbox MUST forward messages sent by the Host to the Guest UI, and vice versa, for any method that doesn’t start with `ui/notifications/sandbox-`. This includes lifecycle messages, e.g., `ui/initialize` request & `ui/notifications/initialized` notification both sent by the Guest UI. The Host MUST NOT send any request or notification to the Guest UI before it receives an `initialized` notification.
304
304
7. The Sandbox SHOULD NOT create/send any requests to the Host or to the Guest UI (this would require synthesizing new request ids).
305
305
8. The Host MAY forward any message from the Guest UI (coming via the Sandbox) to the MCP Apps server, for any method that doesn’t start with `ui/`. While the Host SHOULD ensure the Guest UI’s MCP connection is spec-compliant, it MAY decide to block some messages or subject them to further user approval.
306
306
@@ -325,7 +325,7 @@ UI iframes can use the following subset of standard MCP protocol messages:
When the Guest UI sends an `ui/initialize` request to the Host, the Host SHOULD include UI-specific context in the `McpUiInitializeResult`’s `hostContext` field:
331
331
@@ -486,7 +486,7 @@ Host SHOULD add the message to the conversation thread, preserving the specified
486
486
}
487
487
```
488
488
489
-
Host sends this notification after the Guest UI's initialize request completes, when tool arguments become available. This notification is sent at most once and is required before sending `ui/tool-result`.
489
+
Host sends this notification after the Guest UI's initialize request completes, when tool arguments become available. This notification is sent at most once and is required before sending `ui/notifications/tool-result`.
490
490
491
491
`ui/notifications/tool-input-partial` - Host MAY send this notification zero or more times while the agent is streaming tool arguments, before `ui/notifications/tool-input` is sent.
"sandbox": "string"// Optional override for inner iframe `sandbox` attribute
@@ -666,9 +666,9 @@ sequenceDiagram
666
666
P -> P: Render inner iframe with HTML
667
667
668
668
end
669
-
UI ->> H: initialize
670
-
H -->> UI: InitializeResult (e.g., host-context, capabilities, etc.)
671
-
UI ->> H: notifications/initialized
669
+
UI ->> H: ui/initialize
670
+
H -->> UI: McpUiInitializeResult (e.g., host-context, capabilities, etc.)
671
+
UI ->> H: ui/notifications/initialized
672
672
opt Stream Tool input to UI
673
673
H -->> UI: ui/notifications/tool-input-partial (0..n)
674
674
end
@@ -681,7 +681,7 @@ sequenceDiagram
681
681
end
682
682
```
683
683
684
-
Note: when the Guest UI is rendered inside a sandbox, the sandbox transparently passes events between the Guest UI and the Host (except for events that start with `sandbox-`)
684
+
Note: when the Guest UI is rendered inside a sandbox, the sandbox transparently passes messages between the Guest UI and the Host, except for messages named `ui/notifications/sandbox-*`.
685
685
686
686
#### 5. Interactive Phase
687
687
@@ -746,7 +746,7 @@ Note: Cleanup may be triggered at any point in the lifecycle following UI initia
746
746
747
747
Tool execution results are passed to the UI through two mechanisms:
0 commit comments