McpAppFrame: a copy-paste SEP-1865 host renderer for MCP Apps
mr_someonee · reddit · 2026-09-02
MCP Apps is now official and the big hosts render them, but building your own host (inspector, agent console, internal chat tool) means implementing the hard parts of the spec yourself: sandboxed iframe, CSP from resource metadata, the ui/initialize handshake, proxying tools/call back to your client, size-changed resizing, and teardown.
The author shipped all of that as a shadcn-style copy-paste component: npx mcp-elements add mcp-app-frame drops the source into your repo. It's runtime-free—you pass callTool/readResource from whatever MCP client you already use (@modelcontextprotocol/sdk, mcp-use); a plain-TypeScript state machine lives in a core package for wiring without React. It also ships the screens every host rebuilds: a tool-call card with a real 6-state machine, OAuth consent dialog, scope inspector, JSON-Schema→form, resource browser, and server status badge. React, Angular, and Vue, MIT licensed, plus a live demo doing the real JSON-RPC handshake inside the frame.
More from coding & agent
- Rust Glancer: A Rust language server built to use 100x less RAM than rust-analyzer — JeremyCMorgan · 2026-09-02
- CommerceAgentBench hits 1K stars: 107 e-commerce agent tasks distilled from 1.6M real conversations — VibeMarketer_ · 2026-09-02
- Fable 5.1 ships with Anthropic's statistical watermark on every platform plus cache-friendly API updates — Angaisb_ · 2026-09-02
- Tips: Long Sessions Waste Tokens and Degrade Model Performance — hudsonhateno · 2026-09-02
- GitHub MCP Server Costs 26k Tokens Per Session Before Any Work — THEDEVRELMARKUS · 2026-09-02
- Build a Chrome extension in minutes with Antigravity — VeryWellVersed · 2026-09-02