mcpAppRenderer

fun mcpAppRenderer(clientFor: (serverId: String) -> McpClient?, actions: McpAppActions, sessions: McpAppSessions): DataRenderer(source)

Renders DataPart.MCP_APP parts — added by MCP tools that have a view (_meta.ui.resourceUri) — as their MCP App (McpAppView). clientFor returns the connection of the part's server (by the server id the part names; reuse the instances the agent uses); a part whose server is unknown renders nothing. The views live in sessions: keep one per chat screen.

Prefer McpAppsHost, which also shows the views' dialogs at the screen's root.