Skip to content

Conversation

@kurzgesagtcraft
Copy link

@kurzgesagtcraft kurzgesagtcraft commented Jan 29, 2026

Summary

This PR implements rich UI support for the Model Context Protocol (MCP) within the Archestra platform. It enables the rendering of non-text content types such as images and HTML resources directly in the chat interface.

Key Changes

  • Backend: Refactored mcp-gateway.utils.ts to preserve the raw content array from MCP tool results, ensuring that structured data (images, resources) is transmitted to the frontend instead of being stringified.
  • Frontend: Created a new MCPUIRenderer component that dynamically renders content based on its type:
    • text: Standard markdown rendering.
    • image: Renders base64 or URL-based images.
    • resource (HTML): Renders HTML content within a sandboxed iframe for security and isolation.
  • Security: Implemented strict sandboxing for HTML rendering (sandbox="allow-scripts allow-forms") to prevent XSS while maintaining functionality.
  • UI Integration: Updated chat-messages.tsx and tool.tsx to intercept tool outputs and delegate rendering to the MCPUIRenderer.

Fixes #1301

@CLAassistant
Copy link

CLAassistant commented Jan 29, 2026

CLA assistant check
All committers have signed the CLA.

@London-Cat
Copy link
Collaborator

London-Cat commented Jan 29, 2026

📊 Reputation Summary

User Rep Pull Requests Activity Assigned Core Reactions
kurzgesagtcraft ⚡ 3 0✅ 1🔄 0❌ 0 issues, 0 comments 0
CLAassistant ⚡ 0 0✅ 0🔄 0❌ 0 issues, 50 comments 0

How is the score calculated? Read about it in the Reputation Bot repository 🤖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support MCP UI

3 participants