
Pantry Relay
io.github.waytzhangv0.1.0更新於 Oct 4, 2026
Local SQLite pantry planner with six MCP tools for meals, stock and shopping.
概覽
一個本機 SQLite 食材規劃伺服器,讓助理依現有庫存推薦晚餐、保留食材並記錄已煮的餐點。
- 功能
- Pantry Relay 透過 stdio 提供六個工具:pantry_snapshot、recommend_dinner、confirm_dinner、mark_meal_cooked、cancel_dinner 和 record_new_stock。它也提供 pantry://household/current 資源與 rescue-dinner 提示。推薦不會更動庫存;確認晚餐會保留可用食材並把不足轉為採購需求,標記已烹煮則只扣減一次保留數量。狀態保存在本機 SQLite 資料庫中。
- 適用情境
- 適合單一家庭在一台本機電腦上使用,讓助理依現有庫存規劃餐點、追蹤保留與不足,並跨工作階段保留餐點歷史。它不適用於多戶託管或公開部署。
- 執行需求
- 需要 Node.js 24 或更新版本。MCP 套件安裝到支援 .mcpb 檔案的用戶端;從原始碼執行使用 npm ci 與 npm start。不需要付費雲端帳號、API 金鑰、錢包、硬體或訂閱。本機 HTTP 端點只監聽回送位址,可用 PANTRY_DB、PANTRY_PORT 和 PANTRY_MCP_URL 變更資料庫檔案、連接埠與端點。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Pantry Relay,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Pantry Relay
A local household dinner handoff: plan from available food, reserve a chosen meal, remember it across sessions, and record cooking without double-counting inventory. Built with AI assistance as a candidate for the Amazon Developer Hackathon Alexa+ track. Not submitted, not an awarded project, and not an Amazon-certified integration.
Try in your browser
Open the sample kitchen. No installation, login, paid model or cloud account is needed. This static demo uses the same pantry operations with SQLite compiled to WebAssembly through sql.js. Its fictional stock and meal plans stay in this browser's site storage; they are not synchronized between computers. Supported browsers coordinate tabs with Web Locks. Otherwise, use one tab at a time.
Download the browser release and offline preview. The standalone offline file is a preview; direct file opening has not been browser-verified. The hosted sample above is the tested version.
If you try the sample kitchen, share a bug or missing-use-case note on GitHub. Posting requires a GitHub account. No household data is collected by the demo for feedback.
The public site demonstrates the pantry workflow. The real MCP endpoint runs separately in the local application below; the website does not provide a live Alexa session. To rebuild the static files from source, run npm run build:web after installing dependencies. GitHub Pages serves docs/.
Install as a local MCP bundle
Download the MCP bundle for a client that supports .mcpb files and Node.js 24 or newer. It runs the same six tools over stdio and stores its own SQLite database in your home directory, separately from the browser sample. The bundle guide describes the location and limits. It includes the runtime dependencies, but no household data or account credentials.
Run locally, with no recharge
Prerequisite: Node.js 24 or newer. No paid cloud account, API key, wallet, hardware, or subscription is required for this application.
Open http://127.0.0.1:8767. Demo stock is fictional, with date labels relative to the first run. The SQLite file is in data/pantry.sqlite. To start a separate fictional household, set PANTRY_DB to a different file. PANTRY_PORT changes the local port.
Try the complete handoff
- Enter “Dinner for 2, vegetarian, under 25 minutes.” and choose Find dinner. Stock is unchanged.
- Review the recipe, quantities and shortages. Choose Confirm dinner to reserve available ingredients. Shortages become shopping needs.
- When that meal was actually cooked, choose Meal cooked. Reserved quantities are consumed once. Refresh: the pantry and meal history remain.
- Plan for eight people to exercise shortages. Cancel dinner removes only that meal's reservations and shopping needs. Record real new stock before replanning.
The browser command input uses a small deterministic parser for serving count and minutes. It is not a hosted LLM or a live Alexa session. The recipe ranker uses pantry coverage and near-date stock. The real MCP service exposes that workflow to an agent chosen by the user; no hosted AI inference is bundled or charged by this application.
Agent connection
Connect a client that supports MCP 2025-11-25 Streamable HTTP to http://127.0.0.1:8767/mcp. The official MCP SDK serves JSON responses without a long-lived session. This is a local development configuration: it listens only on loopback and is not suitable for public deployment without household authentication.
Tools: pantry_snapshot, recommend_dinner, confirm_dinner, mark_meal_cooked, cancel_dinner, record_new_stock. It also provides the pantry://household/current resource and rescue-dinner prompt. Reusable agent guidance.
The SDK client makes actual HTTP MCP calls. The report lists tool inputs and outputs; it does not pretend to be a live Alexa account. To change the endpoint, set PANTRY_MCP_URL.
Verification
Thirteen checks cover unchanged stock during proposals, exact-once cooking, stale proposals from overlapping users, cancellation, shortages, expiry changes, valid restocking, and official MCP clients over real HTTP and stdio. The HTTP integration test explicitly verifies protocol negotiation returns 2025-11-25. Browser-adapter checks use actual WebAssembly SQLite to verify persisted state, competing tabs, and failed storage writes without partial reservations. npm run build:mcpb creates the installable archive; npm run verify:mcpb checks the unpacked bundle with a real MCP client.
Browser evidence is in evidence/. The recorded flow confirms a two-person skillet, records it cooked, reloads the app, and verifies the retained inventory. See verification record.
Scope and limits
One household, one local computer; no user accounts or external transactions. Original demo recipes are not nutritional advice. Date labels organize stock; they do not establish food safety. Food recorded as received is not automatically substituted into an older plan: cancel and replan. Quantities use grams or whole-item counts. Multi-household hosting, nutritional recommendations, speech recognition, a general language-model agent and certified Alexa deployment are not implemented.
Review materials
- Submission draft
- Demo recording script
- Public review video, 2 minutes 23 seconds, captioned with no audio. It uses actual browser captures and recorded MCP calls. A live Alexa session has not been tested. Local MP4.
- Developer feedback
- Opportunity check
Source code is offered under MIT; Bootstrap retains its own MIT notice in public/bootstrap-LICENSE.txt. Dependency licenses stay with their npm packages. The source review archive excludes credentials, household data and dependencies. The installable MCP bundle includes only the server files and their runtime dependencies, with no credentials or household database.
來源:README.md,提交 2950b97
工具
0版本歷史
1- v0.1.0最新Oct 4, 2026


