VaultAlexa+
README.md
# VaultAlexa+ โ Alexa+ Smart Personal Financial & Intelligent Shopping Agent
<div align="center">
[](https://amazonappdev2026.devpost.com/)
[](https://amazonappdev2026.devpost.com/)
[](https://modelcontextprotocol.io/)
[](https://www.jsonrpc.org/)
[](LICENSE)
[](package.json)
[](https://www.youtube.com/watch?v=U0SNEII29Cg)
**Enterprise-grade autonomous AI financial advisor and intelligent Amazon shopping assistant** โ powered by Model Context Protocol (MCP) Spec `2025-11-25` over JSON-RPC 2.0 Streamable HTTP.
[๐ฌ Watch Demo Video](https://www.youtube.com/watch?v=U0SNEII29Cg) ยท [๐ Quickstart](#-quickstart) ยท [๐ ๏ธ MCP Tools Reference](#๏ธ-mcp-tools-reference-15-tools) ยท [๐งช Testing Guide for Judges](#-testing-guide-for-judges) ยท [๐๏ธ Architecture](#๏ธ-architecture) ยท [๐ Friction Log](FRICTION_LOG.md)
</div>
---
<div align="center">
### ๐ฌ Watch Live Product Demo Video (3 Minutes)
[](https://www.youtube.com/watch?v=U0SNEII29Cg)
*๐ Click the banner above to watch the full demonstration on YouTube: [https://www.youtube.com/watch?v=U0SNEII29Cg](https://www.youtube.com/watch?v=U0SNEII29Cg)*
</div>
---
<div align="center">

</div>
---
## ๐ Overview
**VaultAlexa+** is a **Two-Sided Bilateral AI Agent** bridging **Consumers (Buyers)** with the **Amazon Seller Ecosystem**:
| ๐ For **Buyers** | ๐ช For **Sellers** |
|---|---|
| Pre-purchase safety validation against monthly budgets | FBA inventory stockout prediction & PO drafting |
| Proactive deficit risk forecast (upcoming bills radar) | Real-time sales analytics & revenue intelligence |
| 1-Click Alexa+ Voice Purchasing with budget guards | Dynamic repricing strategy & Buy Box optimization |
| Bilateral AI negotiation for instant discount vouchers | AI-powered product listing generation from photos |
| Anti-impulse cooldown & opportunity cost simulation | Incoming orders dispatch monitoring |
| Household bill splitting via Alexa Contacts | Multimodal product catalog publishing |
| Price drop sniper & deal watchlist | โ |
---
## ๐ธ Screenshots
| ๐ Financial Dashboard & Alexa+ Chat | ๐๏ธ Intelligent Amazon Shopping Assistant |
|:---:|:---:|
|  |  |
| ๐ Interactive MCP Protocol Inspector | ๐ค AI Negotiation & Anti-Impulse Guard |
|:---:|:---:|
|  |  |
---
## ๐ Key Highlights
- **15 MCP Tools** (far exceeding the minimum 5 required)
- **3 MCP Resources** (`vault://` URI scheme)
- **2 Reusable Prompts** (financial audit, deal negotiation)
- **Full Bilingual** โ EN (`US`) and Bahasa Indonesia (`ID`) with dynamic switching
- **Visual Reasoning Trace** โ real-time agentic chain-of-thought visible to judges
- **Human-in-the-Loop** โ Seller can review, edit, and approve AI-generated product listings before publishing
- **Multimodal AI Vision** โ Gemini 2.0 Flash analyzes uploaded product photos to generate Amazon listings
---
## ๐ Quickstart
### Option A โ Zero Dependency: Open in Browser Directly
No installation needed. Open the web simulator instantly:
```bash
# Windows
start index.html
# macOS / Linux
open index.html
```
### Option B โ Run MCP Node.js Server (for Judge MCP Inspector)
```bash
# 1. Clone repository
git clone https://github.com/karyalangitdigital/vault-alexa-mcp.git
cd vault-alexa-mcp
# 2. Install dependencies
npm install
# 3. Start MCP server
npm start
# Server is now running at http://localhost:3000
# 4. Open web simulator
# Navigate browser to: http://localhost:3000
```
> **MCP Endpoints:**
> - JSON-RPC 2.0: `POST http://localhost:3000/mcp/v1/rpc`
> - Server-Sent Events: `GET http://localhost:3000/mcp/v1/sse`
> - Health Check: `GET http://localhost:3000/health`
### Option C โ Run Tests (for Judge Verification)
```bash
npm test # MCP JSON-RPC 2.0 compliance test (9 methods)
npm run test:dom # DOM sync & state consistency test
npm run test:all # Full test suite
```
---
## ๐ ๏ธ MCP Tools Reference (15 Tools)
All tools conform to **MCP Specification 2025-11-25** and are callable via `tools/call` JSON-RPC 2.0.
### ๐ Buyer Tools
| # | Tool Name | Description | Key Args |
|---|---|---|---|
| 1 | `get_financial_summary` | Real-time budget status, account balances & category breakdown | `timeframe` |
| 2 | `search_amazon_deals` | Intelligent Amazon Prime deal discovery with sorting & filters | `category`, `keyword`, `maxPrice`, `sortBy` |
| 3 | `validate_purchase_safety` | Pre-purchase safety check against remaining category budget | `itemName`*, `itemPrice`*, `category`* |
| 4 | `track_price_drop_target` | Register deal sniper / price drop alert watchdog | `itemName`*, `targetPrice`* |
| 5 | `split_shared_expense` | Split household expenses via Alexa Contacts | `totalAmount`*, `title`*, `splitMembers` |
| 6 | `log_transaction` | Append a financial transaction to the personal vault ledger | `title`*, `amount`*, `category`* |
| 7 | `negotiate_dynamic_discount` | Bilateral buyer-seller real-time discount negotiation bridge | `itemName`*, `currentPrice`* |
| 8 | `calculate_opportunity_cost` | Anti-impulse guard: projects savings goal delay from purchase | `itemName`*, `itemPrice`* |
| 9 | `predict_monthly_runway` | Proactive deficit risk forecast using upcoming obligation radar | `projectedSpend` |
| 10 | `initiate_purchase_dispute` | Full-lifecycle RMA dispute, return label & instant escrow refund | `orderId`*, `reason`* |
| 11 | `trigger_peer_split_request` | Dispatch Alexa voice bill-split notifications to household contacts | `total`*, `contacts` |
### ๐ช Seller Tools
| # | Tool Name | Description | Key Args |
|---|---|---|---|
| 12 | `generate_morning_briefing` | Proactive standup: cashflow / FBA stockout / orders (role-aware) | `includeWatchlistRadar` |
| 13 | `predict_inventory_stockout` | FBA burn velocity analysis, auto PO draft & dynamic repricing | `asin`*, `dailyVelocity` |
| 14 | `analyze_product_image_listing` | Gemini 2.0 Flash multimodal vision โ Amazon-ready product listing | `imageDataUrl`*, `hintProductName` |
| 15 | `publish_seller_product` | Confirm & publish AI-generated listing to seller catalog | `listingData`* |
*\* = required argument*
### ๐ฆ MCP Resources (3)
| URI | Description |
|---|---|
| `vault://financial/overview` | Personal financial vault: balances, categories, transactions |
| `vault://household/summary` | Household shared pool, member limits, pending splits |
| `vault://diagnostics/health` | MCP server health, latency metrics, RPC audit trails |
### ๐ MCP Prompts (2)
| Name | Description |
|---|---|
| `financial_health_audit` | Deep financial audit prompt with savings goal integration |
| `amazon_deal_negotiator` | Bilateral negotiation prompt for Buyer-Seller discount bridge |
---
## ๐งช Testing Guide for Judges
### Quick JSON-RPC Test (curl)
```bash
# List all 15 tools
curl -X POST http://localhost:3000/mcp/v1/rpc \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
# Call validate_purchase_safety
curl -X POST http://localhost:3000/mcp/v1/rpc \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"validate_purchase_safety","arguments":{"itemName":"Bose Headphones 700","itemPrice":219.00,"category":"shopping"}}}'
# Read financial vault resource
curl -X POST http://localhost:3000/mcp/v1/rpc \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":3,"method":"resources/read","params":{"uri":"vault://financial/overview"}}'
```
### Web Simulator โ 7 Demo Scenarios
Launch `index.html` (or `http://localhost:3000`) and type these into the Alexa+ chat:
| # | Type This | Tool Invoked | What to Observe |
|---|---|---|---|
| 1 | `morning briefing` | `generate_morning_briefing` | **Buyer mode**: personal standup (cashflow/bills/sniper radar) ยท **Seller mode**: store ops briefing (revenue/stockout/orders) |
| 2 | `prediksi defisit tagihan rutin` | `predict_monthly_runway` | Multi-agent swarm warns of $450 upcoming obligations causing -$129 deficit |
| 3 | `Bose Headphones rusak di jalan` | `initiate_purchase_dispute` | RMA ticket issued, prepaid return label, +$219 instant escrow credit |
| 4 | `tawar harga echo show` | `negotiate_dynamic_discount` | Bilateral negotiation issues voucher `AMZ-MCP-SAVE15` ($99.99 โ $84.99) |
| 5 | `bagi tagihan ke Michael` | `trigger_peer_split_request` | Voice bill-split dispatched to Echo Dot of household members |
| 6 | `cek kehabisan stok fba` | `predict_inventory_stockout` | FBA co-pilot flags 3.3-day stockout, drafts PO-SUPPLIER-77491 |
| 7 | Switch to **Seller Mode** โ `morning briefing` | `generate_morning_briefing` | Role-aware: shows Apex Tech Store operations briefing, not Buyer data |
### MCP Inspector Tab (Built-in)
1. Click **"MCP Inspector"** in the left sidebar
2. Select any of the **15 registered tools** from the dropdown
3. Click **"Execute JSON-RPC Tool"**
4. Observe structured JSON response with sub-15ms latency indicator
### Bilingual Test
Click the **`ID` / `US`** toggle in the top-right header to instantly switch all UI labels, voice synthesis accent, and agent reasoning trace language.
---
## ๐๏ธ Architecture

```mermaid
flowchart TD
A["๐ค Buyer / Seller"] -->|Voice + Touch| B["๐ Alexa+ Echo Show / Fire TV / Web Simulator"]
B -->|"Streamable HTTP / SSE"| C["๐ JSON-RPC 2.0\n/mcp/v1/rpc + /mcp/v1/sse"]
subgraph MCP ["โก VaultAlexa+ MCP Server โ Node.js / Express"]
C --> D["๐ง Role-Aware Intent Router\nprocessUserQuery()"]
D --> E["๐ Buyer Branch\n11 Tools"]
D --> F["๐ช Seller Branch\n4 Tools"]
E & F --> G["๐ ๏ธ 15 MCP Tools"]
E & F --> H["๐ฆ 3 Resources"]
E & F --> I["๐ 2 Prompts"]
end
G -->|"Agent Orchestration"| J["โ๏ธ AWS Bedrock AgentCore\nClaude 3.5 / Nova Pro"]
G -->|"Vision Analysis"| K["๐๏ธ Google Gemini 2.0 Flash\nMultimodal Product Vision"]
G -->|"Encrypted IAM"| L[("๐๏ธ DynamoDB\nPrimeVaultLedger")]
G -->|"SigV4 Auth"| M[("๐๏ธ Amazon SP API")]
G -.->|"Telemetry"| N["๐ CloudWatch"]
```
### Role-Aware Dual-Agent Flow
```
User Query
โ
โผ
processUserQuery()
โ
โโ[window.currentUserRole === 'seller']โโโบ Seller Intent Chain
โ โโโ generate_morning_briefing (Store Ops Briefing)
โ โโโ predict_inventory_stockout (FBA Co-Pilot)
โ โโโ analyze_product_image_listing (Multimodal Vision)
โ โโโ publish_seller_product (Human-in-the-Loop Confirm)
โ
โโ[window.currentUserRole === 'buyer']โโโโบ Buyer Intent Chain
โโโ validate_purchase_safety (Budget Guard)
โโโ predict_monthly_runway (Deficit Forecast)
โโโ negotiate_dynamic_discount (Bilateral Negotiation)
โโโ initiate_purchase_dispute (RMA & Refund)
โโโ generate_morning_briefing (Personal Finance Standup)
```
---
## ๐ Project Structure
```
vault-alexa-mcp/
โโโ index.html # Web simulator UI (Single-Page App)
โโโ app.js # Frontend controller & agent intent router
โโโ styles.css # Premium glassmorphism UI design system
โโโ mcp-server.js # MCP Server (Express / JSON-RPC 2.0 / SSE)
โโโ mcp-config.json # MCP manifest (Spec 2025-11-25, Streamable HTTP)
โโโ package.json # npm config โ version 2.5.0
โโโ test-mcp.js # MCP JSON-RPC compliance test (9 methods)
โโโ test-dom-and-sync.js # DOM state sync test
โโโ test-e2e-dom.js # End-to-end role-switching E2E test
โโโ FRICTION_LOG.md # Hackathon bonus: developer friction feedback
โโโ LICENSE # MIT License
โโโ docs/
โโโ Naskah_Video_Demo_VaultAlexa.html
โโโ Panduan_Submisi_Hackathon_VaultAlexa.html
```
---
## ๐งช Running the Full Test Suite
```bash
# MCP Protocol Compliance (9 JSON-RPC methods verified)
npm test
# DOM Sync & State Consistency
npm run test:dom
# Full Suite
npm run test:all
```
Expected output: `โ
All 9 MCP JSON-RPC 2.0 Method Calls Verified Successfully! (15 Tools + 3 Resources + 2 Prompts registered on server)`
---
## โ๏ธ AWS Services
| Service | Role in VaultAlexa+ |
|---|---|
| **Amazon API Gateway** | TLS 1.3 ingress for Streamable HTTP / SSE |
| **AWS Lambda / ECS Fargate** | Hosts stateless MCP server (sub-15ms) |
| **AWS Bedrock AgentCore** | Multi-agent orchestration (Claude 3.5 / Nova Pro) |
| **Amazon DynamoDB** | Encrypted personal financial vault ledger |
| **Amazon Selling Partner API** | Live Prime catalog & seller fulfillment |
| **Amazon CloudWatch** | RPC latency telemetry & audit trails |
---
## ๐ Hackathon Compliance Summary
| Requirement | Status |
|---|---|
| MCP Spec `2025-11-25` | โ
|
| Transport: Streamable HTTP + SSE | โ
|
| JSON-RPC 2.0 (`tools/list`, `tools/call`, `resources/read`, `prompts/list`) | โ
|
| Minimum 5 agentic tools | โ
**15 tools** |
| Human-in-the-Loop safety guardrails | โ
`validate_purchase_safety` + Anti-Impulse Lock + Listing Review |
| Proactive agent (not just reactive) | โ
`generate_morning_briefing` |
| Developer Friction Log (Bonus 10%) | โ
[FRICTION_LOG.md](FRICTION_LOG.md) |
| Open Source MIT License | โ
|
| Working demo / test scripts | โ
`npm test` |
---
## ๐ค Author
**KARYA LANGIT Digital โ Supriadi**
Amazon Developer Hackathon 2026 ยท Alexa+ MCP Server Track
๐ง [karyalangitdigital](https://github.com/karyalangitdigital)
---
## ๐ License
Distributed under the **MIT License**. See [LICENSE](LICENSE) for details.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues