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.

Original post →

More from coding & agent

coding & agent channel →