Build interactive MCP Apps using Amazon Bedrock AgentCore
aws ·
This AWS blog post by Dantis Stephen and Babs Khalidson explains how to build and deploy interactive MCP Apps on Amazon Bedrock AgentCore, extending the Model Context Protocol with HTML widgets rendered directly inside AI hosts. The authors argue that as users increasingly interact with services through AI hosts like ChatGPT and Claude, organizations need host-agnostic, rich UI experiences rather than plain text, which MCP Apps and AgentCore provide. A sample application called Unicorn Rentals demonstrates browsing unicorns, booking a rental, viewing active bookings, and returning a unicorn across four demonstrated steps. In the architecture, a TypeScript MCP server built with the official MCP SDK and the ext-apps extension runs on AgentCore runtime and is fronted by an AgentCore Gateway, with AWS WAF protecting the endpoint through IP allowlisting, managed rules, and rate limiting. The MCP App registers tools such as list_unicorns, book_unicorn, view_bookings, and return_unicorn, along with resources that return widget HTML; tools without a widget return text only. Business logic runs in a separate AWS Lambda function backed by Amazon DynamoDB, while widget images are served from Amazon CloudFront with Amazon S3 as origin. The article details deployment prerequisites including Node.js 22+, AWS CLI v2, and the AWS CDK CLI, plus a deploy.sh script that builds and deploys the CDK stacks, and notes that the same server can be connected to other hosts supporting the MCP Apps extension, such as ChatGPT in developer mode.
aws