/claim #1301

Summary

  • Integrates @mcp-ui/client to render interactive UI resources in chat
  • When MCP servers return UIResource objects (text/html, text/uri-list, or application/vnd.mcp-ui.remote-dom), they are rendered inline using sandboxed iframes
  • Implements onUIAction handler for tool calls, prompts, links, and notifications
  • Compatible with MCP Apps (ext-apps) that return UIResource content

Changes

  • Add @mcp-ui/client dependency for UIResourceRenderer component
  • Add ui-resource.utils.ts with detection and extraction helpers
  • Add UIResourceTool component for rendering interactive UI
  • Integrate into chat-messages.tsx MessageTool component
  • Add comprehensive tests for UIResource detection (21 tests passing)

How It Works

  1. When a tool returns a result, MessageTool checks if it contains a UIResource
  2. If detected, UIResourceTool renders the content using @mcp-ui/client UIResourceRenderer
  3. UIResourceRenderer handles sandboxing, iframe rendering, and action events
  4. The MCP Gateway passes through UIResource data unchanged (JSON-RPC passthrough proxy)

MCP Gateway Integration

The gateway acts as a JSON-RPC passthrough proxy - it doesnt inspect or modify tool results. UIResource objects flow through unchanged from MCP servers to the frontend, where this implementation detects and renders them.

Testing

  • Unit tests for UIResource detection: pnpm test src/components/chat/ui-resource.utils.test.ts
  • Manual testing can be done with MCP servers returning ui:// URIs with text/html content

Acceptance Criteria

  • Incorporate MCP UI support into Archestra Chat UI
  • Validate MCP UI works through MCP Gateway (passthrough proxy)
  • Ensure MCP UI works through LLM Gateway (same transport)
  • Test with MCP servers with UI functionality (needs integration environment)

Fixes #1301

Claim

Total prize pool $900
Total paid $0
Status Pending
Submitted January 20, 2026
Last updated January 20, 2026

Contributors

MI

Michael Walker

@MichaelWalker-git

100%

Sponsors

AR

Archestra

@archestra-ai

$900