Household Ops
README.md
# π Household Ops
> **Amazon Alexa+ Hackathon 2026 Β· Alexa+ Track**
> A self-hosted MCP server that gives Alexa+ the ability to run a home β reducing food waste with expiry-aware meal suggestions, pantry tracking, shopping lists, and bill reminders.
[](LICENSE)
[](https://modelcontextprotocol.io)
[](https://python.org)
---
## π― The Hook
Every household wastes food because no one knows what's about to expire. Household Ops solves this: one sentence to Alexa+ triggers a chain of tool calls that checks your pantry, surfaces expiring items, and suggests tonight's dinner from what you already have.
**Example session:**
```
You: "I bought two dozen eggs and a litre of milk"
β add_pantry_item called twice
You: "What's about to expire?"
β check_pantry(filter="expiring") returns items expiring in β€5 days
You: "Plan dinner for tonight"
β suggest_meals ranks recipes by most-expiring-ingredients-used
You: "My electricity bill of 1800 is due on the 28th"
β add_bill stores the reminder
```
---
## π Architecture
```
βββββββββββββββ MCP 2025-11-25 ββββββββββββββββββββ
β Alexa+ β βββ Streamable HTTP βββΊ β server.py β
β (MCP clientβ (production path) β FastMCP server β
β + Add-on) β β β
βββββββββββββββ β 6 Tools β
β 1 Resource β
βββββββββββββββ MCP client call β 1 Prompt β
β backend.py β βββββββββββββββββββββββΊ β β
β FastAPI β βββββββββ¬βββββββββββ
β + Bedrock β β
β Converse β βββββββββΌβββββββββββ
ββββββββ¬βββββββ β SQLite β
β β + recipes.json β
ββββββββΌβββββββ ββββββββββββββββββββ
β index.html β
β Chat UI β
β + Voice I/Oβ
βββββββββββββββ
```
**Two paths, one server:**
- **Production**: Alexa+ β Add-on (Alexa AI CLI) β `server.py`
- **Demo/test**: Browser chat UI β `backend.py` β Bedrock Converse API β `server.py`
---
## π MCP Tools
| Tool | Purpose |
|------|---------|
| `add_pantry_item` | Add or update a pantry item with optional expiry date |
| `check_pantry` | List items; filter by name or `"expiring"` |
| `suggest_meals` | Rank recipes by ingredients-on-hand, weight expiring items |
| `build_shopping_list` | Generate shopping list for chosen recipes |
| `add_bill` | Store a bill reminder with amount and due date |
| `upcoming_bills` | List bills due within N days |
**Resource:** `pantry://shopping-list` β live read-only shopping list
**Prompt:** `weekly_review` β reusable weekly household review template
---
## π Quick Start
### 1 Β· Prerequisites
- Python 3.11+
- Node.js (for MCP Inspector)
- AWS account with Bedrock model access *(see below)*
### 2 Β· Install
```bash
git clone https://github.com/YOUR_USERNAME/household-ops-alexa
cd household-ops-alexa
python -m venv venv
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate
pip install -r requirements.txt
```
### 3 Β· Configure
```bash
cp .env.example .env
# Edit .env with your AWS credentials and region
```
### 4 Β· Seed demo data
```bash
python seed.py
# β 23 pantry items (several expiring within 5 days) + 3 bills
```
### 5 Β· Start the MCP server
```bash
python server.py
# Listening at http://localhost:8000/mcp
```
### 6 Β· Test with MCP Inspector
```bash
npx @modelcontextprotocol/inspector http://localhost:8000/mcp
```
### 7 Β· Run automated smoke tests
```bash
# (with server.py still running)
python test_client.py
```
### 8 Β· Start the demo chat UI
```bash
# In a new terminal:
uvicorn backend:app --reload --port 7860
# Open http://localhost:7860
```
---
## βοΈ Enable Amazon Bedrock
1. Log in to the [AWS Console](https://console.aws.amazon.com/)
2. Search **Bedrock** β open Amazon Bedrock
3. Left menu β **Model access** β **Modify model access**
4. Enable **Anthropic β Claude 3.5 Haiku** (instant approval)
5. Set `BEDROCK_MODEL_ID=anthropic.claude-3-5-haiku-20241022-v1:0` in `.env`
Default region is `us-east-1`. Claude 3.5 Haiku is fast and low-cost.
---
## π Connect to Alexa+
### Option A: Add-on Agent Skill (recommended)
Use Claude Code, Kiro, Codex, or Cursor. Give it your MCP server's public HTTPS URL and ask it to onboard using the Alexa+ Add-on Agent Skill. It walks through the process automatically.
### Option B: Alexa AI CLI (manual)
```bash
npm install -g @alexa-ai/cli # or use npx
alexa-ai configure
alexa-ai new mcp \
--name "Household Ops" \
--locale en-US \
--mcp-server-url "https://your-server.render.com/mcp"
alexa-ai deploy
```
Redeploy whenever you change tools or configuration.
> **Note:** The server needs a public HTTPS URL for the add-on. See deployment options below.
---
## π Deployment
### Render (recommended for free tier)
1. Push this repo to GitHub
2. Create a new Render account β **New Blueprint**
3. Connect your repo β Render reads `render.yaml` automatically
4. Set `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_REGION` as secret env vars
5. Deploy. Your MCP URL will be `https://household-ops-mcp.onrender.com/mcp`
### Fly.io
```bash
fly auth login
fly launch # reads fly.toml
fly secrets set AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=... AWS_REGION=us-east-1
fly deploy
```
### Local tunnel (development)
```bash
# ngrok:
ngrok http 8000
# Your HTTPS URL: https://xxxx.ngrok.io/mcp
# cloudflared:
cloudflared tunnel --url http://localhost:8000
```
---
## π File Structure
```
household-ops-alexa/
βββ server.py β MCP server (6 tools, 1 resource, 1 prompt)
βββ backend.py β FastAPI + Bedrock demo backend
βββ database.py β SQLite schema and connection helper
βββ seed.py β Demo data seed script (run before recording)
βββ test_client.py β Automated smoke tests
βββ recipes.json β 15 regional recipes
βββ requirements.txt
βββ .env.example β Config template
βββ Dockerfile
βββ render.yaml β Render deployment blueprint
βββ fly.toml β Fly.io deployment config
βββ LICENSE β MIT
βββ static/
β βββ index.html β Chat UI with tool-call side panel + voice
βββ FRICTION_LOG.md β Developer friction log (for hackathon submission)
```
---
## π¬ Demo Script
Before recording, run:
```bash
python seed.py # reset to clean demo state
```
**Suggested voice/text flow (under 3 minutes):**
1. *"What's about to expire in my pantry?"* β `check_pantry(filter="expiring")` lists 4 items
2. *"Plan dinner tonight using what's about to go bad"* β `suggest_meals` picks Scrambled Eggs + Banana Pancakes
3. *"Build a shopping list for Banana Pancakes"* β `build_shopping_list` adds missing items
4. *"My electricity bill of 1800 is due on the 28th"* β `add_bill` stores it
5. *"Any bills due this week?"* β `upcoming_bills(days_ahead=7)` returns it
Each step shows the tool name, JSON input, and JSON output in the side panel.
---
## π¬ Testing Without Alexa
Work up this ladder:
1. **MCP Inspector** β `npx @modelcontextprotocol/inspector http://localhost:8000/mcp`
2. **Smoke tests** β `python test_client.py` (covers all tools + error cases)
3. **Chat UI + Bedrock** β `uvicorn backend:app --port 7860` then open the browser
4. **Real Alexa+** β if you have the CLI and account access
---
## πΊ What's Next
- Per-user authentication and multi-household support
- Real grocery API integration (e.g. Instacart, BigBasket) for one-tap shopping
- Push notifications for bills and expiry warnings
- Barcode scan β `add_pantry_item` shortcut via the Alexa app
---
## π€ Contributing
Pull requests welcome. Please open an issue first for major changes.
## π License
[MIT](LICENSE) β free to use, modify, and distribute.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues