CartWeave MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@CartWeave MCP ServerMy spinach and paneer expire tomorrow β plan 3 high-protein dinners under $38 and compare carts"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π CartWeave
Alexa+ Multi-Brand Pantry, Meal-Plan & Grocery Arbitrage Concierge
A self-hosted Model Context Protocol (MCP 2025-11-25 Streamable HTTP) server and Amazon Echo Show 15 Multimodal Alexa+ Simulator powered by Amazon Bedrock Converse API. Automates expiring pantry rescue, high-protein meal planning, and multi-retailer grocery arbitrage across Amazon Fresh, Whole Foods Market, and Local Neighborhood Co-op.
π Overview
Instead of static shopping lists or isolated timers, imagine a household member speaking naturally to their kitchen Echo Show 15:
"Alexa, my baby spinach, paneer, and Greek yogurt expire tomorrowβplan 3 high-protein dinners under $38 and compare Amazon Fresh vs. Whole Foods for the missing ingredients."
CartWeave orchestrates 5 stateful MCP tools over a single Mcp-Session-Id session, prioritizes expiring fridge inventory to prevent food waste, computes per-serving protein and calorie macros, performs real-time price and substitution arbitrage across Amazon Fresh, Whole Foods Market, and a Local Co-op, and returns interactive MCP Apps UI cards where users can swap meals, filter dietary constraints, or check out in a single tap.
Related MCP server: FreshKeep MCP Server
β¨ Key Features
Capability | Technical Implementation & User Benefit |
π MCP | Full implementation of |
π§ Amazon Bedrock Converse Orchestration | Chained multi-tool reasoning via |
π₯ Expiry-First Pantry Optimization |
|
βοΈ Multi-Retailer Grocery Arbitrage |
|
π In-Session Constraint Mutation |
|
πΊ Echo Show 15 Multimodal Simulator | Next.js 14 split-screen simulator integrating Web Speech API STT/TTS, conversation timeline with 4 one-click Judge Demo chips, interactive MCP Apps cards, and a live Protocol Inspector. |
π‘οΈ Built-In Protocol Inspector & Test Runner | Real-time JSON-RPC 2.0 frame monitor with a one-click automated MCP compliance test runner validating all 5 tools, resources, and prompts. |
π Hackathon Prize Alignment
Built for the Build, Ship, Shape: Amazon Developer Hackathon:
Prize Track | Implementation in CartWeave |
π₯ Primary Track β Alexa+ | Implements the official MCP |
π οΈ Mini Challenge β AWS Builder | Integrates |
π Mini Challenge β Open Source | Clean MIT-licensed monorepo ( |
ποΈ System Architecture
The following diagram illustrates CartWeave's client-server architecture, MCP 2025-11-25 Streamable HTTP transport, stateful session handling, and Bedrock orchestrator:
flowchart TD
subgraph SIMULATOR ["πΊ Echo Show 15 Alexa+ Simulator (Next.js :3000)"]
VoiceOrb["Alexa+ Voice Orb (Web Speech API STT/TTS)"]
ConvPane["Conversation Pane & 4 Judge Demo Chips"]
McpClient["Browser MCP Client (mcpHttpClient.ts)"]
AppsCanvas["MCP Apps UI Canvas (4 Interactive Cards)"]
Inspector["Judge MCP Protocol Inspector (Live JSON-RPC 2.0 & Compliance Runner)"]
end
subgraph SERVER ["β‘ CartWeave MCP Server (Express :3001)"]
StreamHttp["MCP 2025-11-25 Transport (POST / GET SSE / DELETE /mcp)"]
SessionMgr["McpSessionManager (Stateful Mcp-Session-Id Store)"]
BedrockOrch["BedrockOrchestrator (Converse API + Deterministic Mock)"]
subgraph TOOLS ["π οΈ 5 Stateful MCP Tools"]
T1["1. scan_pantry_inventory"]
T2["2. generate_meal_plan"]
T3["3. compare_grocery_carts"]
T4["4. swap_ingredient_constraint"]
T5["5. checkout_smart_basket"]
end
Resources["MCP Resources & Prompts (mcp://pantry/expiring-soon, mcp://cart/active-comparison)"]
end
VoiceOrb --> ConvPane
ConvPane -->|POST /agent/chat| BedrockOrch
AppsCanvas -->|Interactive Card Actions / POST tools/call| McpClient
McpClient <-->|JSON-RPC 2.0 + Mcp-Session-Id| StreamHttp
StreamHttp <--> SessionMgr
BedrockOrch --> TOOLS
StreamHttp --> TOOLS
StreamHttp --> Resources
McpClient --> Inspectorπ οΈ The 5 Stateful MCP Tools
CartWeave exposes 5 stateful MCP tools over the 2025-11-25 transport, returning both token-efficient text for LLM chaining and structured mcp_app_ui cards for the display:
+---------------------------------------------------------------------------------------------------------+
| CartWeave Tool Execution Flow |
+---------------------------------------------------------------------------------------------------------+
| |
| 1. scan_pantry_inventory --> Finds items expiring soon (Spinach: 18h, Yogurt: 24h, Paneer: 36h) |
| | |
| 2. generate_meal_plan --> Generates 3 dinners under budget (39g avg protein, $31.40 cost) |
| | |
| 3. compare_grocery_carts --> Evaluates missing ingredients across Amazon Fresh vs Whole Foods vs Co-op |
| | |
| 4. swap_ingredient_constraint -> Mutates Day 2 dish (Dairy-Free <520 kcal) without resetting session |
| | |
| 5. checkout_smart_basket --> Locks delivery slot, generates tracking code, saves $18.45 in waste |
| |
+---------------------------------------------------------------------------------------------------------+Tool Name | Parameters | Core Responsibility & Return Payload |
|
| Inspects stored pantry inventory, flags high-urgency items, computes hours to spoil, and returns the |
|
| Creates a multi-day culinary plan utilizing expiring items, calculates per-serving macros, and renders |
|
| Analyzes missing ingredients across Amazon Fresh, Whole Foods, and Local Co-op, presenting the |
|
| Replaces a specific meal in place while preserving session context and recalculating store totals. |
|
| Finalizes the order, deducts used inventory from the pantry, and outputs the |
π± Interactive Multimodal Cards (mcp_app_ui)
CartWeave's Echo Show 15 simulator renders 4 interactive visual cards paired with spoken voice responses:
PANTRY_EXPIRY_GRID: Color-coded urgency badges (red: <24h, amber: <48h, green: fresh), item quantities, and estimated discard values.MEAL_PLAN_MACRO_CARDS: 3-day meal breakdown highlighting used pantry items, missing grocery items, calorie counts, and protein macros. Includes an inline "Swap Dish" action button.STORE_ARBITRAGE_TABLE: Side-by-side comparison of Amazon Fresh vs. Whole Foods Market vs. Local Co-op, including brand substitutions, Prime member discounts, and delivery speed.ORDER_CONFIRMATION_CARD: Receipt showing delivery window, one-tap tracking link, itemized total, and total food waste dollars saved ($18.45).
π Quick Start (Zero-Config Local Run)
Prerequisites
Node.js
>= 20.xand npm>= 10.xNo AWS credentials required by default (
USE_MOCK_BEDROCK=trueis enabled out of the box; setUSE_MOCK_BEDROCK=falseand provide AWS credentials to connect to live Amazon Bedrock).
1. Clone the Repository
git clone https://github.com/harinarayana1457-cmyk/CartWeave.git
cd CartWeave2. Install Workspace Dependencies
npm install3. Run Automated MCP 2025-11-25 Compliance Suite
npm run test:mcpValidates the initialize handshake (protocolVersion === "2025-11-25"), asserts Mcp-Session-Id header persistence, tests tools/list, resources/list, resources/read, prompts/list, prompts/get, and executes all 5 stateful tools/call operations while verifying non-empty mcp_app_ui structured payloads.
4. Launch Development Servers (MCP Server + Simulator)
npm run devEcho Show 15 Alexa+ Simulator:
http://localhost:3000MCP 2025-11-25 Streamable HTTP Endpoint:
http://localhost:3001/mcpHealth & Diagnostics:
http://localhost:3001/health
π Project Structure
CartWeave/
βββ packages/
β βββ mcp-server/ # Self-hosted MCP 2025-11-25 Streamable HTTP Server
β β βββ src/
β β β βββ aws/
β β β β βββ bedrockAgent.ts # Amazon Bedrock Converse API + Mock Planner
β β β βββ data/
β β β β βββ seedData.ts # Seed pantry items, store catalog & recipe DB
β β β βββ prompts/
β β β β βββ mcpPrompts.ts # MCP Prompts handler (mcp://prompts/pantry-rescue)
β β β βββ resources/
β β β β βββ mcpResources.ts # MCP Resources handler (mcp://pantry/expiring-soon)
β β β βββ test/
β β β β βββ verifyMcpSpec.ts # Automated MCP 2025-11-25 Compliance Test Suite
β β β βββ tools/ # 5 Stateful MCP Tool Implementations
β β β β βββ scanPantry.ts
β β β β βββ generateMealPlan.ts
β β β β βββ compareCarts.ts
β β β β βββ swapConstraint.ts
β β β β βββ checkoutBasket.ts
β β β βββ index.ts # Express HTTP transport (POST/GET/DELETE /mcp)
β β β βββ mcpSessionManager.ts # Mcp-Session-Id state tracking & SSE streams
β β βββ package.json
β β βββ tsconfig.json
β β
β βββ alexa-plus-simulator/ # Echo Show 15 Multimodal Alexa+ Simulator
β βββ src/
β β βββ app/
β β β βββ layout.tsx
β β β βββ page.tsx # Split-screen Echo Show 15 layout
β β β βββ globals.css
β β βββ components/
β β β βββ AlexaVoiceOrb.tsx # Animated Voice Orb with Web Speech API
β β β βββ ConversationPane.tsx # Chat transcript & 4 Judge Demo chips
β β β βββ EchoShowFrame.tsx # Echo Show 15 hardware bezel & status bar
β β β βββ McpAppsCanvas.tsx # Multimodal cards container
β β β βββ McpProtocolInspector.tsx # JSON-RPC 2.0 inspector drawer & test runner
β β β βββ cards/ # 4 Interactive MCP Apps UI Cards
β β β βββ PantryExpiryCard.tsx
β β β βββ MealPlanMacroCard.tsx
β β β βββ StoreArbitrageCard.tsx
β β β βββ OrderConfirmationCard.tsx
β β βββ lib/
β β βββ mcpHttpClient.ts # Browser MCP Streamable HTTP Client
β βββ package.json
β βββ tailwind.config.ts
β
βββ FRICTION_LOG.md # Detailed 5-point Developer Friction Log
βββ template.yaml # Production AWS SAM template (Lambda + DynamoDB)
βββ package.json # Root workspace scripts (npm run dev, test:mcp)
βββ README.md # Project documentationπ οΈ Tech Stack
Layer | Technology | Version | Purpose |
Protocol Transport |
| Stateful Streamable HTTP transport ( | |
Cloud AI Orchestration | SDK | Multi-turn tool calling via | |
Backend Runtime | Node 20+, Express 4 | High-throughput HTTP & SSE server with custom CORS session headers | |
Type Validation | Zod 3.24, TS 5.7 | Strict runtime input/output schemas for all 5 MCP tools and JSON-RPC payloads | |
Frontend Framework | Next 14.2, React 18 | SSR/Client split-screen Echo Show 15 simulator application | |
Styling & Icons | Tailwind 3.4, Lucide | Echo Show 15 device styling, responsive cards, and clean visual indicators | |
Voice Interface | Native Browser | In-browser Speech-to-Text ( | |
Cloud Deployment | SAM CLI / CloudFormation | Serverless packaging for AWS Lambda, API Gateway HTTP API, and DynamoDB |
π License
Distributed under the MIT License. See LICENSE for full details.
π Connect & Author
This server cannot be deployed
Maintenance
Related MCP Connectors
Household-aware cooking brain: pantry, meal suggestions, dietary safety, recipes, shopping lists.
AI meal plans that fill your Kroger/Instacart cart - pantry-aware lists, all from chat.
Scraps Kitchen gives any AI agent a persistent, household-aware kitchen memory. Unlike generic chatbot recall, Scraps maintains structured cooking data: what's in your fridge (with freshness tracking), who you cook for (with allergens, dietary restrictions, and preferences), your recipe collection (with cook notes and per-diner ratings), your shopping list, and your kitchen equipment. 27 tools across 6 domains let agents read kitchen context, suggest meals that respect dietary safety, update the pantry after cooking, and build a history of what works for your household. Every interaction makes the data richer. Cooking history, preference signals, kitchen awareness = better suggestions next time. All tools work via oAuth and a free scraps.kitchen account.
Answers 'what can I cook tonight?' from your own saved recipes and what's really in your kitchen.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables Alexa+ to access a live household food inventory, providing expiry warnings, use-it-up recipe suggestions, and grocery list management.MIT
- AlicenseNot gradedqualityCmaintenanceGives Alexa+ persistent, structured memory of a household kitchen: tracking purchased groceries, flagging items at risk of spoiling, proposing rescue meals from expiring ingredients, and maintaining shopping lists, receipt ingestion, and waste reports through MCP tool calls. Storage, tool logic, and safety controls (consent gates, two-step deletion, rate limiting) are exposed over Streamable HTTP for any MCP client.MIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server that enables Alexa+ to autonomously orchestrate multi-step household tasks by decomposing goals into parallel tool calls β cross-session memory and dietary/allergy auditing, culinary planning with wine pairings, Amazon Fresh cart assembly with human-in-the-loop purchase approval, smart-home ambiance and climate control, and calendar scheduling. It pairs AWS Bedrock multi-agent reasoning with Streamable HTTP transport and interactive generative UI cards, carousels, and live IoT sliders.MIT
- FlicenseNot gradedqualityBmaintenanceThis MCP server gives Alexa+ a persistent household pantry and Bedrock-generated recipes that use the soonest-expiring food first, with tools for adding and using items, listing the pantry, checking expiring soon, and suggesting recipes.-