Summary
Allow MCP servers that expose UI resources (MCP "Apps") to render interactive widgets inline in the kagent chat, instead of showing only raw tool-call JSON. When a tool call maps to an MCP app resource, the chat renders the app's HTML/UI in a sandboxed frame and brokers messages between the app and the chat (send message, visible tool calls, resource/tool-call proxying).
Proposal
- Discover MCP app resources per MCP server and associate them with tool calls.
- Render the app via a sandboxed
McpAppRenderer inside chat messages / tool-call display.
- Provide a
ChatMcpAppsContext that maps a tool name to its MCP app and brokers sendMessage / visible-tool-call events.
- Backend handlers to list MCP app resources and proxy resource fetch + tool calls.
Scope
UI: ui/src/components/mcp-apps/* (McpAppRenderer, McpAppsInspector), ui/src/components/chat/ChatMcpAppsContext.tsx, ui/src/app/actions/mcp-apps.ts, ui/src/app/api/mcp-apps/*, ChatMessage/ToolCallDisplay/ToolDisplay.
Backend: go/core/internal/httpserver/handlers/mcpapps.go, go/adk/pkg/agent/mcp_apps.go, go/adk/pkg/mcp/registry.go.
A design EP (design/EP-<this issue>-chat-mcp-ui-widgets.md) will accompany the implementation PR.
Summary
Allow MCP servers that expose UI resources (MCP "Apps") to render interactive widgets inline in the kagent chat, instead of showing only raw tool-call JSON. When a tool call maps to an MCP app resource, the chat renders the app's HTML/UI in a sandboxed frame and brokers messages between the app and the chat (send message, visible tool calls, resource/tool-call proxying).
Proposal
McpAppRendererinside chat messages / tool-call display.ChatMcpAppsContextthat maps a tool name to its MCP app and brokerssendMessage/ visible-tool-call events.Scope
UI:
ui/src/components/mcp-apps/*(McpAppRenderer,McpAppsInspector),ui/src/components/chat/ChatMcpAppsContext.tsx,ui/src/app/actions/mcp-apps.ts,ui/src/app/api/mcp-apps/*,ChatMessage/ToolCallDisplay/ToolDisplay.Backend:
go/core/internal/httpserver/handlers/mcpapps.go,go/adk/pkg/agent/mcp_apps.go,go/adk/pkg/mcp/registry.go.A design EP (
design/EP-<this issue>-chat-mcp-ui-widgets.md) will accompany the implementation PR.