Own product · 2024 – present
Humboldt Kitchen
An invite-only cookbook with AI recipe scanning, a cooking assistant, and an MCP server so AI agents can use it too.
Live at humboldt.inkythesquid.dev. The MCP server is live with read and search tools; write tools are planned behind an audit log and rate limits.
Summary
A full-stack Nuxt 4 app on Cloudflare (D1, R2, KV, Workers AI) with invite-only OAuth and roles, photo-to-recipe extraction, the Humphry assistant, and a separate OAuth-protected MCP server for AI agents.
Stack
- Nuxt 4
- TypeScript
- Nuxt UI
- Cloudflare Pages + Workers
- D1 + Drizzle ORM
- R2
- KV
- Workers AI
- Vercel AI SDK
- nuxt-auth-utils
- Model Context Protocol
- Vitest
- GitHub Actions
The problem
Our recipes were scattered across cookbooks, screenshots and websites. I wanted one private place for them that would also turn a photo of a cookbook page into a structured recipe, plan the week's shopping, and let AI agents use the collection as a real signed-in user.
What I built
- Recipes with ingredients, steps, tags, servings, time, source and public or private visibility. Full-text search with filters, similar recipes, and per-user favourites.
- Photo-to-recipe extraction in two stages: a vision model transcribes the page, a deterministic parser structures it, and a larger language model takes a correction pass when the result looks weak. Fixture-based evaluation scripts measure quality.
- Humphry, a tool-calling cooking assistant with saved chat sessions. It can search recipes, read details and favourites, and build or regenerate shopping lists.
- Dated shopping lists that merge ingredients across recipes and suggest aisles, packages and substitutions. The ingredient library uses Spoonacular for autocomplete and nutrition.
- Admin tools: invite links that assign a role, plus user and role management.
Architecture
- The Nuxt 4 app runs on Cloudflare Pages through NuxtHub. Data lives in D1 (SQLite) through Drizzle ORM with versioned migrations, including an FTS index. Images are in R2, cache in KV, and the AI runs on Workers AI.
- A REST API of Nitro server routes covers recipes, ingredients, favourites, shopping lists, invites, users and assistant sessions. Recipe read and search logic sits in a shared domain module.
- The MCP server is a separate, stateless Worker using Streamable HTTP. It reads the same D1 database with the app's own schema and calls the same shared recipe queries, so the agent and web results match. Previews and production deploy from GitHub Actions after typecheck and tests.
Engineering decisions
- Invite-only identity. Sign-in is GitHub or Google OAuth with sliding cookie sessions. New accounts need an invite or a configured admin. Viewer, editor and admin abilities are enforced on the server.
- MCP auth done properly. The Worker is wrapped in Cloudflare's OAuth provider (discovery, dynamic client registration, token refresh and revocation). It has its own consent page because any client can register. Upstream GitHub or Google login only matches existing users, so agents can never bypass the invite rule.
- Scopes plus roles. There are five scopes (recipe read and write, favourites, shopping read and write). Each tool checks the granted scope and the user's current role, read from D1 on every call, so a demotion or deletion takes effect immediately.
- Tokens and secrets in KV are stored hashed, and grant data is encrypted. Tokens are tied to the server's own origin, and production serves only its custom domain.
- The MCP server is deliberately read-only for now. Write tools come after an audit log and per-user rate limits, to guard against agents bulk-editing or deleting.
- Tests: about 30 test files, including an end-to-end OAuth flow test (register, consent, both providers, scopes, token, MCP call, refresh) against an in-memory database built from the real migrations.
Status and what's next
- The app is live. The MCP server is live with get, search and list tools for recipes, tags and sources.
- Next: favourites and shopping-list read tools, then an audit log and rate limits, then write tools from the lowest risk upward.