pantry-pulse
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., "@pantry-pulseWhat's in my pantry and what's running low?"
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.
Pantry Pulse
A pantry that tells you what disappeared—and what to buy next.
Pantry Pulse is a private RFID pantry station and inventory dashboard. Tap a tagged can or bag, choose consume or restock, and the station sends an idempotent event to a Cloudflare Worker. D1 keeps the household inventory and event history; the dashboard turns it into a calm shopping queue; guarded MCP tools let an assistant read or update the pantry.
The repository contains the Worker, Vite/React dashboard, D1 schema and seed data, and reference firmware for an ESP32 DevKit with an MFRC522 reader. It is designed for a household deployment rather than a hosted multi-tenant service.

Concept artwork from docs/design/; it illustrates the intended station, not a screenshot of a running deployment.
Related MCP server: mise-mcp
The useful loop
Scan a tag. The ESP32 station posts a consume or restock event to
POST /api/device/scanswith a stable event ID, so a retry cannot double-count a can.See the truth. The dashboard shows stock, low-stock items, shopping needs, recent activity, and RFID/catalog links. Its admin token lives in the browser session only.
Ask an assistant. Read-only MCP clients can call
pantry_snapshotorshopping_queue_export; a write-scoped token also enablespantry_adjustandpantry_link_item.Let it tidy up. A daily scheduled Worker task prunes detailed inventory events while compact tombstones preserve idempotency for late hardware retries.
The admin API also supports snapshots, item creation, inventory adjustments, and tag/catalog links. /health checks the D1 binding. Device requests are rate limited.
Linking and stock corrections
POST /api/items/:id/link changes only supplied metadata fields. Omitted fields are preserved; a null RFID or catalog field clears that link, while null unit, target, or onHand leaves the existing value unchanged. Catalog provider and item ID must form a complete pair after the update.
A non-null onHand is an absolute stock correction. Send expectedQuantity with the count the editor originally displayed to reject stale edits with 409 inventory_conflict. If it is omitted, the command checks the count read when the request starts. The stock change, metadata, and inventory event commit together, or none do. On conflict, refresh the pantry and reopen the item before retrying. The dashboard sends a correction only when its on-hand field changed; MCP metadata linking never changes stock.
Local development
Requirements:
Node.js 24 or newer.
pnpm 12.10.1 (
packageManagerinpackage.json). Cloudflare CLI (cf) and the Cloudflare Vite plugin are installed by the project.PlatformIO and an ESP32 DevKit with an MFRC522 reader only when working on firmware.
Install dependencies and create untracked local Worker credentials:
corepack enable
pnpm install --frozen-lockfile
cp .dev.vars.example .dev.varsReplace every token in .dev.vars with a high-entropy value. Apply the local D1 migration and seed the sample pantry before starting both servers:
pnpm db:migrate:local
pnpm db:seed:local
pnpm devpnpm dev starts Vite with the Cloudflare plugin through Portless (a dev dependency); its first run may ask for sudo to bind port 443 and trust a local certificate. Open https://pantry-pulse.localhost; the same server serves the dashboard and runs /api, /health, and /mcp in the Workers runtime. The dashboard asks for ADMIN_TOKEN from .dev.vars.
The Cloudflare plugin and local D1 scripts share .cloudflare/state/, configured with persistState in vite.config.ts. The scripts pass --persist-to .cloudflare/state because cf resource commands otherwise use a machine-wide state directory.
For a deployed D1 database, review the migration and run the remote commands explicitly:
pnpm db:migrate:remote
pnpm db:seed:remoteThe remote commands require pnpm cf auth login or a CLOUDFLARE_API_TOKEN and operate on the database UUID declared in cloudflare.config.ts. cf D1 commands default to remote resources; the local scripts explicitly pass --local. If you provision a different database, update its ID in both the config and the database scripts in package.json.
Firmware
The reference station is documented in firmware/esp32-rfid/README.md. It uses an ESP32 DevKit, an MFRC522 over SPI, and a normally-open mode button. Copy config.example.h to config.h, fill in Wi-Fi, the Worker base URL and matching host, the device token, and the TLS root CA, then run:
cd firmware/esp32-rfid
cp config.example.h config.h
pio run
pio run --target upload
pio device monitorThe firmware keeps a bounded outbox in ESP32 NVS, retries transient failures with backoff, and reuses each event ID across retries. It does not log the bearer token. Nothing is flashed automatically by this repository or its CI workflows.
Checks and deployment
pnpm format:check
pnpm lint
pnpm typecheck
pnpm cf-typegen:check
pnpm test
pnpm build
pnpm deploypnpm check runs formatting, linting, type checking, the full application build, and a deployment dry run. pnpm test runs the client and Worker Vitest suites; Worker tests load cloudflare.config.ts. pnpm typecheck regenerates binding and runtime types with cf workers types before checking the dashboard, Worker, tests, and tooling through the shared tsconfig.json. Generated declarations live in the ignored .cloudflare/types/ directory, so CI generates them rather than committing them. Worker code uses the generated Cloudflare.Env type directly. pnpm cf-typegen:check is an alias for the full type check.
pnpm build runs cf build to package the Worker and dashboard together in .cloudflare/output/. pnpm deploy builds the application and deploys that output with cf deploy --prebuilt --mode production. Vite records the build mode, so prebuilt deployments must specify the same mode. To validate the built output without uploading anything, run pnpm cf deploy --prebuilt --mode production --dry-run after pnpm build.
The project uses the Cloudflare CLI and Cloudflare Vite plugin 2.0 beta. cloudflare.config.ts owns Worker settings and bindings; vite.config.ts configures development and bundling. cf is currently in beta.
Source map
Path | Responsibility |
| Worker entry point, security headers, |
| Authenticated REST routes for the dashboard and device scans. |
| D1 reads/writes, idempotent inventory events, snapshots, and retention. |
| Read and write MCP tool registration and result schemas. |
| Vite/React dashboard, session token handling, inventory views, and API client. |
| D1 schema and optional local/remote sample data. |
| PlatformIO firmware and wiring/configuration reference. |
| Worker, D1, rate-limit, static asset, observability, and cron bindings. |
Design files under docs/design/ are exploratory concepts and are labeled as such; they are not screenshots of a running deployment.
Status and security
The Worker, dashboard, tests, D1 schema, MCP surface, and reference firmware are present. Hardware and Cloudflare resources still need to be provisioned by the operator. Keep .dev.vars, config.h, Wi-Fi credentials, TLS material, and all bearer tokens out of Git. See SECURITY.md for private vulnerability reporting and token responsibilities.
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP for e-commerce: live product catalog, stock, and pricing for AI agents.
- PressoOAuthnow.presso
Connect e-commerce and marketing data to AI assistants via MCP.
Cross-tool persistent memory and context for AI assistants over MCP.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables AI assistants to manage a shared shopping list by adding, viewing, updating, and deleting products for different people via MCP tools.-
- FlicenseNot gradedqualityBmaintenanceEnables MCP-compatible clients like ChatGPT and Claude to manage a household's shared food inventory, meal plans, recipes, and preferences through natural language, with atomic updates and audit logging.-
- AlicenseNot gradedqualityBmaintenanceEnables agents to manage household pantry inventory, dietary preferences, meal planning, product search, and shopping cart workflows over Streamable HTTP, with optional Bedrock-backed meal generation.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