posit-dev / posit-dev/shinychat
Support MCP Apps protocol for rendering interactive UIs inline
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 139
- Forks
- 28
- Avg merge
- 23h 44m
- Merged PRs (30d)
- 50
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: #161 (rich content types in tool results)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the MCP Apps spec and ext-apps SDK, then trace how shinychat handles MCP tool results containing _meta.ui.resourceUri. Define the resource-fetch, sandboxed iframe, and postMessage/JSON-RPC integration points. Done means a ui:// resource renders inline and supports the listed bidirectional events.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100