posit-dev / posit-dev/shinychat

Support MCP Apps protocol for rendering interactive UIs inline

Open
#175 1 comment 2 reactions 0 assignees View on GitHub

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:

  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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.