Skip to content

Support MCP Apps protocol for rendering interactive UIs inline #175

@JamesHWade

Description

@JamesHWade

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:

  1. Fetch the ui:// resource from the MCP server
  2. Render the HTML content in a sandboxed iframe inline in the chat
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions