Skip to content

Chat UI: support MCP UI widgets (MCP Apps) in the chat interface #2046

Description

@dimetron

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions