{"slug": "amazon-bedrock-agentcore-lets-you-push-html-widgets-into-ai-hosts-via-mcp-apps", "title": "Amazon Bedrock AgentCore lets you push HTML widgets into AI hosts via MCP Apps", "summary": "Amazon Bedrock AgentCore now supports the Model Context Protocol (MCP) Apps extension, letting developers render interactive HTML widgets inside AI hosts such as Claude and ChatGPT, with the AgentCore runtime handling session isolation and the AgentCore Gateway providing the secure endpoint. The flow routes a user's natural-language query from the host to the Gateway, executes business logic in the runtime, and returns an MCP-compliant response containing the HTML widget definition that the host renders. The article notes setup takes a few hours to configure the Gateway and deploy a first tool, and that host compatibility and latency from the MCP handshake remain the main failure points.", "body_md": "# Amazon Bedrock AgentCore lets you push HTML widgets into AI hosts via MCP Apps\n\nMost AI agents are stuck in a \"text-in, text-out\" loop, which is frustrating when you actually need a UI to browse a catalog or confirm a booking. By combining the Model Context Protocol (MCP) Apps extension with Amazon Bedrock AgentCore, you can actually render interactive HTML widgets directly inside hosts like Claude or [ChatGPT](/en/tags/chatgpt/). The heavy lifting is handled by the AgentCore runtime (which manages session isolation) and the AgentCore Gateway (which provides the secure endpoint).\n\n## How does the [MCP](/en/tags/mcp/) App flow actually work?\n\nThe core idea is that the AI host doesn't just receive a string of text; it receives a structured response that it knows how to render as a widget. In the \"Unicorn Rentals\" sample app, this isn't just a list of names. When a user asks to see available unicorns, the server returns data that the host renders as interactive cards featuring images, hourly rates, and availability status.\n\nIf you're trying to implement this, the flow follows these technical steps:\n\n1. The user sends a natural language query to the AI host.\n\n2. The host routes this to the AgentCore Gateway.\n\n3. AgentCore runtime executes the business logic and returns an MCP-compliant response containing the HTML widget definition.\n\n4. The host renders the HTML, allowing the user to interact with a UI element rather than typing another prompt.\n\n## What is the actual implementation cost and setup?\n\nSetting this up isn't a \"one-click\" process. You have to deal with the Gateway configuration and ensure your session isolation is handled correctly by the runtime. While AWS markets this as serverless, you're still managing the integration between your business logic and the MCP standard.\n\nIf you want to test how a prompt should be structured to trigger these kinds of interactive tool calls, you can't just be vague. You need to explicitly define the tool's output format so the LLM knows it's triggering a UI component and not just chatting.\n\nHere is a prompt template I've used to force an LLM to act as an MCP-aware coordinator for a rental-style app:\n\n```\nAct as an MCP-enabled coordinator for the Unicorn Rentals service. Your goal is to bridge user intent to specific tool calls that render HTML widgets.\n\nRules for interaction:\n1. When a user asks to \"see\", \"browse\", or \"list\" unicorns, call the `list_unicorns` tool. Do not summarize the list in text; let the MCP widget handle the display.\n2. When a user expresses intent to book a specific unicorn by name, call the `book_unicorn` tool with the `unicorn_id`. \n3. If a tool returns an error (e.g., \"Unicorn already booked\"), translate that error into a helpful suggestion for the user.\n\nCurrent Context:\n- User is authenticated.\n- Available tools: [list_unicorns, book_unicorn, view_bookings, return_unicorn].\n\nUser Query: {{user_query}}\n```\n\n## Where does this usually break?\n\nFrom what I've seen, the biggest point of failure is host compatibility. Just because you've deployed to AgentCore doesn't mean every AI host will render your HTML widgets identically. Some hosts might strip certain CSS properties or block specific HTML tags for security reasons.\n\nAnother issue is latency. Routing through a Gateway to a serverless runtime and then back to the host can introduce a noticeable lag compared to a native plugin. If your widget requires real-time updates, the overhead of the MCP handshake might make the UI feel sluggish.\n\n- **Setup Time:** Expect a few hours to configure the AgentCore Gateway and deploy your first tool.\n- **Runtime:** Serverless, session-isolated.\n- **Compatibility:** Host-agnostic, provided the host supports the MCP Apps extension.\n\n[Next GPT-6 Astra is finally showing some real spatial reasoning gains →](/en/threads/9267/)\n\n[a practical ChatGPT prompt guide](https://tanyan888.com/), with plenty of directly applicable cases.\n\n## All Replies （3）\n\nI want to try this tonight. I'm sick of copying JSON into my browser to test these things. Does this work with Claude 3.5?\n\nFinally! I'm tired of manually parsing raw strings just to verify a booking. Does this actually play nice with Cursor?\n\nCurious if this handles state management across widgets. I'm wondering if the MCP layer triggers a 404 when passing complex objects?", "url": "https://wpnews.pro/news/amazon-bedrock-agentcore-lets-you-push-html-widgets-into-ai-hosts-via-mcp-apps", "canonical_source": "https://promptcube3.com/en/threads/9319/", "published_at": "2026-09-13 17:00:55+00:00", "updated_at": "2026-09-13 17:13:59.690524+00:00", "lang": "en", "topics": ["ai-agents", "ai-products", "ai-tools", "ai-infrastructure", "developer-tools"], "entities": ["Amazon Bedrock AgentCore", "Model Context Protocol", "MCP Apps", "Claude", "ChatGPT", "AgentCore Gateway", "AWS", "Unicorn Rentals"], "alternates": {"html": "https://wpnews.pro/news/amazon-bedrock-agentcore-lets-you-push-html-widgets-into-ai-hosts-via-mcp-apps", "markdown": "https://wpnews.pro/news/amazon-bedrock-agentcore-lets-you-push-html-widgets-into-ai-hosts-via-mcp-apps.md", "text": "https://wpnews.pro/news/amazon-bedrock-agentcore-lets-you-push-html-widgets-into-ai-hosts-via-mcp-apps.txt", "jsonld": "https://wpnews.pro/news/amazon-bedrock-agentcore-lets-you-push-html-widgets-into-ai-hosts-via-mcp-apps.jsonld"}}