-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Background
The MCP Apps protocol is an extension to MCP that allows servers to declare interactive UI resources (ui:// scheme) that render as sandboxed iframes inside the chat interface. Claude Desktop, ChatGPT, and VS Code already support this.
I recently built shinymcp, which converts Shiny-style apps into MCP Apps -- interactive widgets (dropdowns, plots, tables) that appear inline in the conversation, powered by R tool functions on the server side. While working on it, I realized it would be very useful to have this work in Shiny apps via shinychat too.
Proposal
Add support for the MCP Apps protocol in shinychat so that when an MCP tool's result includes _meta.ui.resourceUri, shinychat can:
- Fetch the
ui://resource from the MCP server - Render the HTML content in a sandboxed iframe inline in the chat
- Handle the postMessage/JSON-RPC bridge for bidirectional communication (input changes, tool result updates, resize events)
This would let users interact with rich UIs directly in the chat, filtering data, tweaking plots, exploring results, without leaving the conversation. Any MCP server that provides interactive UIs (not just R-based ones) could render inside a shinychat-powered Shiny app.
References
- MCP Apps spec
- MCP Apps blog post
- ext-apps SDK repo
- Related: Update tool result handling to support rich content types (images, PDFs) #161 (rich content types in tool results)