diff --git a/specification/2026-01-26/apps.mdx b/specification/2026-01-26/apps.mdx index 43fef209d..6a43000a3 100644 --- a/specification/2026-01-26/apps.mdx +++ b/specification/2026-01-26/apps.mdx @@ -458,11 +458,13 @@ function onNotification(method: string, handler: (params: any) => void) { } -const initializeResult = await sendRequest("initialize", { - capabilities: {}, - clientInfo: {name: "My UI", version: "1.0.0"}, +// The View <-> Host handshake is `ui/initialize` (not MCP's `initialize`) +const initializeResult = await sendRequest("ui/initialize", { + appCapabilities: {availableDisplayModes: ["inline"]}, + appInfo: {name: "My UI", version: "1.0.0"}, protocolVersion: "2026-01-26", }); +sendNotification("ui/notifications/initialized", {}); ``` Hosts act as MCP servers (that can proxy the actual MCP server), receiving and handling requests from UI iframes. diff --git a/specification/draft/apps.mdx b/specification/draft/apps.mdx index f2523f25e..948c4516b 100644 --- a/specification/draft/apps.mdx +++ b/specification/draft/apps.mdx @@ -477,11 +477,13 @@ function onNotification(method: string, handler: (params: any) => void) { } -const initializeResult = await sendRequest("initialize", { - capabilities: {}, - clientInfo: {name: "My UI", version: "1.0.0"}, +// The View <-> Host handshake is `ui/initialize` (not MCP's `initialize`) +const initializeResult = await sendRequest("ui/initialize", { + appCapabilities: {availableDisplayModes: ["inline"]}, + appInfo: {name: "My UI", version: "1.0.0"}, protocolVersion: "2025-06-18", }); +sendNotification("ui/notifications/initialized", {}); ``` Hosts act as MCP servers (that can proxy the actual MCP server), receiving and handling requests from UI iframes.