Skip to content

Instantly share code, notes, and snippets.

@swapp1990
Created February 22, 2026 08:05
Show Gist options
  • Select an option

  • Save swapp1990/5a295529910f974b6309076d1bc246a2 to your computer and use it in GitHub Desktop.

Select an option

Save swapp1990/5a295529910f974b6309076d1bc246a2 to your computer and use it in GitHub Desktop.
Discussion reply from discuss-1771720596490

OK so MCP Apps (ext-apps) is a big deal. Here's the full picture:

What it is: The first official extension to MCP, shipped Jan 26, 2026. An MCP server declares a ui:// resource containing HTML5. When the AI calls a tool linked to that resource, the host (ChatGPT, Claude, VS Code) renders it in a sandboxed iframe inline in the conversation. The View communicates with the host via JSON-RPC over postMessage.

What it can do:

  • Render any HTML5 content inline — React, Vue, Svelte, vanilla JS, Three.js, D3, CesiumJS
  • Three display modes: inline (embedded in chat), fullscreen, picture-in-picture
  • Call tools on the MCP server from the UI (bidirectional)
  • Push state back to the AI model via ui/update-model-context
  • Inject messages into the conversation via ui/message
  • Request camera, mic, geolocation, clipboard permissions
  • Load external CDNs and make API calls (with declared domains)
  • Use localStorage for persistence within the iframe

Which platforms support it:

  • ChatGPT (web + iOS + Android) ✅
  • Claude (web + desktop) ✅
  • VS Code Insiders ✅
  • Goose, Postman, MCPJam ✅

Does it work on ChatGPT iOS? Yes, with caveats:

  • Apps render inline on mobile
  • PiP mode gets coerced to fullscreen on phones
  • Known bug: transitioning inline → fullscreen on iOS loses all React state. Workaround: use window.openai.setWidgetState() instead of React state
  • Host provides safe area insets so you can avoid the close button

The limits:

  1. Sandboxed iframe — can't access parent page, user cookies, other tabs
  2. No persistent storage in the spec — state is ephemeral. If user scrolls away, iframe may be destroyed. You need your own backend for persistence.
  3. No multi-View communication — each tool call = one iframe instance. Views can't talk to each other.
  4. No native file system access — on ChatGPT, window.openai.uploadFile() handles images only (PNG/JPEG/WebP). No equivalent on Claude.
  5. No multi-page navigation — no router. It's a single-page app within one View.
  6. Container dimensions are host-controlled — the host decides max width/height
  7. CSP enforced — must pre-declare every external domain for scripts, API calls, fonts, etc.

Can you build Vacation Photos inline?

Partially. You could build a photo viewer/organizer widget — grid UI, lightbox, metadata editor, drag-and-drop organization. But:

  • Image upload only works on ChatGPT (not Claude)
  • No persistent storage — need your own backend (S3/R2)
  • State is ephemeral — everything must sync to backend
  • It'd feel like an embedded widget, not a full app
  • Verdict: Medium feasibility. Better as a companion widget than a replacement for the native app.

Can you build Autonomous Writer inline?

Yes, strong fit. A multi-chapter story editor with inline UI is well within the complexity ceiling:

  • Rich text editor, chapter navigation, progress tracking all work
  • UI can trigger AI generation: user clicks "Generate next chapter" → View calls tool → server generates → result flows back to View
  • ui/update-model-context syncs chapter state to the AI for context
  • Tools with visibility: ["app"] can be hidden from the model but callable from the UI
  • Need your own backend for saving drafts
  • Verdict: High feasibility. Natural fit for the tool-call + inline UI pattern.

What's in the example apps (20+ in the repo):

  • 3D globe with CesiumJS (most complex — 923 lines)
  • Three.js 3D scenes, GLSL shader renderer
  • PDF viewer, sheet music renderer
  • Wikipedia link graph visualization
  • Real-time OS metrics dashboard
  • SaaS business projections with interactive sliders
  • Live speech transcription, video playback, QR generator

How this connects to AppDiscovery:

This changes the product shape. Instead of (or in addition to) a website, we could build an AppDiscovery MCP App that renders an interactive app comparison UI inline in ChatGPT/Claude conversations. User asks "find me a photo editor" → AI calls our MCP server → the result renders as a rich comparison card with ratings, features, download links — not just plain text.

This would work on ChatGPT iOS, ChatGPT web, and Claude desktop. And it's submittable to the ChatGPT App Directory for discovery by 800M+ weekly users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment