$ show MCP-UI-Org/mcp-ui
MCP-UI is a monorepo SDK implementing the MCP Apps standard for rendering interactive UIs over the Model Context Protocol. It provides server-side tools (in TypeScript, Python, and Ruby) to create UI resources, and a client-side React SDK to render them in sandboxed iframes. The architecture centers on a secure double-iframe proxy pattern that isolates third-party HTML and external URLs, with JSON-RPC communication via AppBridge. The codebase is well-structured with comprehensive tests, semantic release automation, and cloudflare workers example, demonstrating strong engineering practices across multiple languages.
The LLM identified 2 files worth highlighting for reuse:
Manages sandboxed iframe lifecycle for rendering MCP Apps. Handles setup of proxy iframe, CSP injection, message relay between host and guest, and cleanup. This is the core client-side rendering primitive that could be extracted to any project needing secure embeded UI.
Standalone HTML/JS document that acts as a middle iframe for secure cross- orign communication. It relays postMessage from host to guest and back, and registers app-specific event handlers. This pattern can be reused as a generic secure iframe proxy.