Building MCP Apps: rendering interactive HTML widgets inside ChatGPT and Claude via AgentCore
AWS ML Blog · rss · 2026-09-12
An AWS blog demonstrates building and deploying MCP Apps on Amazon Bedrock AgentCore. MCP Apps extends the Model Context Protocol so servers can render interactive HTML widgets—cards, buttons—directly inside AI hosts like ChatGPT and Claude instead of plain text, and it's host-agnostic: the same server delivers the same experience everywhere the Apps extension is supported.
The sample app, Unicorn Rentals, walks the full flow: asking to see all unicorns renders an interactive card per unicorn with image, rate, and availability; booking Stardust returns a confirmation with booking ID and cost; viewing and returning rentals return text where a rich UI isn't needed. Architecture: a single MCP server on AgentCore runtime (serverless, session-isolated), exposed through AgentCore Gateway behind AWS WAF, with business logic in Lambda + DynamoDB.
Implementation details: the app builds on the official @modelcontextprotocol/sdk with the @modelcontextprotocol/ext-apps extension and runs as an Express.js server. Tools are registered via registerAppTool, the meta.ui.resourceUri field tells the host which widget to render, and widgets are exposed as MCP Resources—the host fetches self-contained HTML via resources/read and renders it in a sandboxed iframe with structured data injected from the tool response, images served via CloudFront/S3.
More from coding & agent
- Five teams, 72 hours, same Grok Bot: a controlled experiment to test Grok as a startup builder — tallmetommy · 2026-09-12
- Idempotent Webhook Handler Cheatsheet: Retries Are Normal, Double Work Is the Bug — blaizedsouza · 2026-09-12
- Arcee open-sources NAC agent harness; 489 tool calls, 67 passing tests on DeepSeek V4.1 Flash — MaziyarPanahi · 2026-09-12
- Tencent's Open-Source CubeSandbox v0.7 Ships 60ms-Cold-Start MicroVMs for Agents — dr_cintas · 2026-09-12
- DeepSeek V4.1 Flash tool calling: 489 calls, 56 min, 67 passing tests on LIGO data — MaziyarPanahi · 2026-09-12
- Infinitty Pro launches: metal-driven agent-first macOS terminal at $49 one-time — jasonkneen · 2026-09-12