Inspiration
Traditional voice assistants often struggle with multi-step commerce workflows because they rely on rigid intent matching. If a customer deviates even slightly from expected phrasing, conversational context shatters.
The arrival of Alexa+ represents a massive paradigm shift:
$$ \text{Brittle Intent Matching} \;\longrightarrow\; \text{Autonomous Agentic Reasoning} $$
Rather than navigating hardcoded decision trees, Alexa+ leverages the Model Context Protocol (MCP), an open, universal standard connecting large language models to live tools, databases, and enterprise services.
We were inspired to build EchoCart Nexus to explore what ambient commerce should feel like when agentic reasoning meets multimodal hardware. Our goal was to create an interactive shopping experience where an AI assistant understands complex shopping intents, coordinates real-time product discovery and cart modifications, and pairs conversational dialogue with responsive, touchable visual cards, demonstrating how brands can build experiences customers genuinely love.
What it does
EchoCart Nexus is a simulated Alexa+ multimodal shopping experience powered by a self-hosted, serverless Model Context Protocol (MCP) server. It enables natural, fluid shopping interactions while dynamically updating visual interfaces on simulated smart screen hardware.
- Conversational Catalog Exploration: Users can make nuanced, natural language requests (e.g., "Show me running shoes under \$100 with high ratings"). The agent invokes the
search_catalogtool to query inventory and return structured product options. - Interactive Cart & Order Management: Customers can add items, modify quantities, review itemized subtotals, and check real-time order tracking using the
manage_cartandget_order_statustools. The cart subtotal is computed as:
$$ S = \sum_{i=1}^{n} p_i \cdot q_i $$
where $p_i$ is the unit price and $q_i$ is the quantity of item $i$.
- Multimodal UI (MCP Apps Extension): When a user views products or inspects their cart, the server delivers an interactive visual card via the
@modelcontextprotocol/ext-appsspecification. An interactive UI renders directly within a sandboxed screen, allowing users to tap steppers (+/-) to update quantities or proceed to checkout. - Graceful Degradation: EchoCart Nexus adheres to progressive enhancement. On screen-equipped displays (like an Echo Show), rich interactive widgets render inline; on headless or voice-only endpoints, the server automatically provides descriptive, voice-friendly text summaries.
- Integrated Knowledge & Prompts: The agent autonomously pulls store return policies and active discount promotions into its context using MCP resources (
resource://store/promotions/currentandresource://store/policies/returns), while adopting an efficient concierge persona defined by thecheckout_assistantprompt template.
How we built it
Because official Alexa+ developer tools (Category SDK, MCP Toolkit, CLI, and Web Simulator) remain in an exclusive preview, we followed the hackathon's recommended path: building a self-hosted MCP server and pairing it with a custom, web-based Alexa+ simulator.
At a high level, the request flow looks like this:
$$ \text{Next.js Simulator} \xrightarrow{\;\texttt{POST /mcp}\;} \text{API Gateway} \longrightarrow \text{AWS Lambda (FastMCP)} $$
- Serverless Backend (AWS Lambda): The backend is written in Python using
fastmcpand configured withstateless_http=True. We containerized the service using Docker and deployed it to AWS Lambda behind an Amazon API Gateway HTTP API using the AWS Lambda Web Adapter (public.ecr.aws/awsguru/aws-lambda-adapter). This setup runs fully serverless, scaling to zero with near-zero idle compute costs while judges evaluate the submission:
$$ C_{\text{idle}} \approx 0 $$
- Streamable HTTP Wire Protocol: The MCP server strictly implements the
2025-11-25specification over the Streamable HTTP transport. It processes all client interactions through a singlePOST /mcpendpoint and enforces header mirroring, ensuringMCP-Protocol-Version: 2025-11-25,Mcp-Method, andMcp-Namematch incoming JSON-RPC 2.0 payloads. It also enforces HTTPOriginheader validation to defend against DNS rebinding and unauthorized cross-site requests. - Multimodal Web Simulator (Next.js): The frontend is built in Next.js (TypeScript, Tailwind CSS) to simulate an Echo Show ambient device. It connects to the Lambda backend using
@modelcontextprotocol/clientover Streamable HTTP, dynamically discovers tools and resources, and orchestrates user queries through an agent reasoning loop. - Sandboxed UI Views (MCP Apps): Using the MCP Apps extension, tool execution results deliver a
_meta.ui.resourceUri. The simulator embeds anAppBridgeIframecomponent that loads sandboxed HTML/JS view templates and communicates bidirectionally with the host viapostMessageJSON-RPC signals. - Amazon Developer Resources: Development was accelerated using the Amazon Devices Builder Tools (Kiro Power) for contextual documentation and debugging, alongside architectural design patterns drawn from official sample repositories like
react-native-multi-tv-app-sampleandring-api-helloworld.
Challenges we ran into
- Stateful MCP vs. Serverless Ephemeral Compute: The traditional MCP lifecycle often assumes persistent sessions and memory-cached connection states. In an AWS Lambda environment where execution containers spin up and down dynamically, requests routed across different instances can cause session mismatches. We solved this by architecting the server statelessly (
stateless_http=True) and decoupling cart state persistence, so that any active Lambda container can process tool invocations reliably. Formally, we needed the response to depend only on the request and the persisted cart state, not on which container handled it:
$$ \text{response} = f\big(\text{request},\, \text{state}_{\text{cart}}\big) \quad \text{independent of container instance} $$
- Wire-Level Streamable HTTP Conformance: Adhering to the strict
2025-11-25Streamable HTTP specification required granular HTTP header management. We had to ensure that method names and tool identifiers were mirrored cleanly in HTTP headers (Mcp-Method,Mcp-Name) and configure API Gateway CORS and Lambda origin checks to reject non-compliant requests withHTTP 403 Forbidden. - Bidirectional Sandboxed Communication: Creating a secure, reactive connection between the Next.js client and the MCP Apps sandboxed iframe required building an auditable
postMessageprotocol. We had to ensure user clicks within the visual cards could trigger host tool calls and state updates without exposing DOM access or cookies.
Accomplishments that we're proud of
- Strict 2025-11-25 Protocol Compliance: Successfully built a self-hosted Streamable HTTP MCP server that strictly follows the
2025-11-25wire standard. - True Multimodal Agentic Interaction: Moved beyond plain text and markdown outputs by implementing the MCP Apps specification, rendering rich, touchable UI cards that synchronize bidirectionally with the agent's state.
- Cost-Efficient Serverless Architecture: Achieved enterprise-level horizontal scaling on AWS Lambda and API Gateway with zero server maintenance and near-zero idle compute costs throughout the judging window.
- Seamless Progressive Enhancement: Designed the server tools to gracefully adapt between screen-equipped and headless devices without requiring duplicated backend logic.
What we learned
- The architectural mechanics of the Model Context Protocol, specifically the migration from legacy SSE multi-endpoint architectures to unified Streamable HTTP POST transports:
$$ \text{SSE (multi-endpoint)} \;\longrightarrow\; \text{Streamable HTTP (single } \texttt{POST /mcp} \text{)} $$
- How header mirroring (
Mcp-Method,Mcp-Name) enables cloud gateways and reverse proxies to inspect, route, rate-limit, and authorize tool calls without parsing the request body. - The operational practicalities of GitHub hackathon management, including managing collaborator access for Amazon DevRel reviewers and accounting for GitHub's 7-day invitation expiration window.
What's next for EchoCart Nexus
- Amazon Bedrock AgentCore Gateway: Fronting live e-commerce databases and REST APIs directly through Amazon Bedrock AgentCore Gateway to convert backend services into native MCP-compatible endpoints.
- OAuth 2.1 & PKCE Authentication: Implementing full OAuth 2.1 authorization with Amazon Cognito to secure remote Streamable HTTP endpoints according to production MCP enterprise guidelines.
- Physical Device Deployment: Once the Alexa+ developer preview expands, porting the simulated orchestration layer into an official Alexa+ Agent Skill and deploying the visual cards to physical Echo Show hardware.
- Open Source Contribution: Packaging our FastMCP serverless Lambda starter template and sharing it with the developer community to accelerate MCP adoption across ambient commerce applications.
Built With
- agent-skills
- alexa+
- amazon
- amazon-api-gateway
- amazon-bedrock
- amazon-dynamodb
- amazon-web-services-(aws)
- aws-lambda
- aws-lambda-web-adapter
- css3
- docker
- fastmcp
- html5
- json-rpc
- mcp-apps
- model-context-protocol-(mcp)
- next.js
- node.js
- postmessage-api
- python
- react
- rest-api
- streamable-http
- tailwind-css
- typescript
Log in or sign up for Devpost to join the conversation.