← Back

models

Build Interactive MCP Apps Using Amazon Bedrock AgentCore

Amazon Bedrock AgentCore enables developers to create scalable, host-agnostic MCP Apps with interactive HTML widgets, supporting rich UI experiences across AI hosts like ChatGPT and Claude. This article explains how to build and deploy such an app, demonstrated through a unicorn rental service example.

AS1 NewsSource: aws.amazon.com

awsmcp-appsagentcorecloud-computinginteractive-widgets
AMZN$256.78-0.82%OpenAI$1,487.99-1.17%Anthropic$2,054.92-0.61%

As organizations increasingly interact with digital services via AI hosts such as ChatGPT and Claude, there is a growing need to provide rich, interactive user interfaces that are not tied to a single host. Amazon Bedrock AgentCore offers a solution through MCP Apps, a host-agnostic standard that allows the same server to deliver consistent, rich experiences across multiple AI platforms.

MCP Apps extend the Model Context Protocol (MCP) with interactive HTML widgets that are rendered directly within AI hosts. Amazon Bedrock AgentCore provides a platform to build, connect, and optimize these agents at scale, supporting any framework or model. Its runtime offers a secure, serverless, session-isolated environment with native MCP support, while the AgentCore Gateway exposes this environment through a single secure endpoint accessible by MCP Apps-compatible hosts.

A practical example, Unicorn Rentals, demonstrates how users can browse unicorns, make bookings, view active rentals, and return unicorns—all within a consistent UI across hosts like ChatGPT and Claude. The app architecture involves an MCP server hosted on AgentCore runtime, connected via the AgentCore Gateway, with business logic implemented in AWS Lambda functions and data stored in Amazon DynamoDB.

The MCP App registers tools such as list_unicorns, book_unicorn, view_bookings, and return_unicorn, along with resources like unicorn-list and booking-confirmation, which supply the HTML widgets. When a user interacts with the app through an AI host, requests are translated into MCP tool calls, routed through the Gateway, and handled by the MCP server, which delegates business logic to Lambda functions. Widget rendering is triggered when resources are requested, with HTML content fetched and displayed within sandboxed iframes.

Deployment involves packaging the MCP App code, uploading it to Amazon S3, and configuring the AgentCore runtime and Gateway using AWS CDK scripts. Connecting AI hosts like ChatGPT or Claude requires registering the MCP App with the host, providing the Gateway URL, and enabling the extension. The architecture supports scalability, security, and flexibility, allowing developers to focus on business logic and UI design while AgentCore manages infrastructure concerns.

This approach leverages the open MCP Apps standard, ensuring compatibility across multiple AI hosts and enabling independent evolution of protocol handling and business logic. It offers a scalable, portable, and maintainable solution for delivering rich, interactive AI-driven applications.

neutral

Provides a scalable, host-agnostic framework for building interactive AI applications, enhancing user experience and developer flexibility.