
Plan To Eat
io.github.alex-zwingli由 GitHub 帳號 alex-zwingli 發布v0.8.0更新於 Oct 31, 2026
Unofficial Plan to Eat client: recipes, meal planner, leftovers, freezer, and shopping list.
概覽
非官方的 Plan to Eat 用戶端,讓助理讀寫你的食譜、膳食計畫、冷凍庫存和購物清單。
- 可以做什麼
- 搜尋、檢視、建立、修改和刪除食譜,包含食材、做法、時間、評分與標籤
- 依日期範圍檢視計畫事件,並安排、移動、複製、排序、改份數或刪除食譜、備註和食材項目
- 管理剩菜與冷凍份數,包括列出冷凍項目和標記已食用
- 讀取購物清單及其商店與貨架分類,並新增、改名、改數量、移動、移除或還原項目
- 查詢菜式、菜系、主要食材、標籤、商店、貨架分類、菜單、好友和數量統計
- 適用情境
- 適合已有 Plan to Eat 帳號、希望透過助理而非網頁應用來安排一週餐食、匯入或編輯食譜、整理購物清單的使用者。
- 執行需求
- 以 stdio 在本機執行,可透過 npx 或全域 npm 安裝;需要 Node 18+ 和 Plan to Eat 帳號。需在宿主環境設定 PLAN_TO_EAT_USERNAME 與 PLAN_TO_EAT_PASSWORD,PLAN_TO_EAT_SESSION_FILE 為選用,用於指定 cookie 工作階段快取位置。需要連線至 Plan to Eat 網站的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Plan To Eat,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
🍽️ plan-to-eat-mcp
Stop typing recipes. Start telling them. Hand your favorite LLM the keys to your Plan to Eat recipe book, planner, and shopping list — over the Model Context Protocol.
A drop-in MCP server, a CLI, and a standalone Node client that give Claude, ChatGPT, any MCP-aware assistant, or your own shell full read/write access to your Plan to Eat account.
…or, when you'd rather not talk to anything:
That's it. No recipe re-typing. No copy-pasting URLs into a phone app. Just talk.
❤️ Why Plan to Eat?
If you're not already using it, Plan to Eat is genuinely the best meal-planning app I've ever used:
- A clip-anywhere recipe importer that actually works on real-world food blogs.
- Drag-and-drop weekly planner that automatically rolls ingredients into a shopping list, with smart units and pantry deduplication.
- Yours forever — your recipe book is portable, exportable, and not held hostage by an algorithm.
- Family-friendly — share recipes and menus with friends in-app.
- 14-day free trial, no credit card needed.
👉 Sign up with my referral link — you get the trial, and I get a tiny thank-you. Win/win.
✨ What this gives you
- 🤖 MCP server out of the box — point Claude Desktop, Claude Code, OpenClaw, or any MCP-compatible host at it and start talking to your recipe book.
- ⌨️ A CLI over the same tools — every MCP tool is also a
plan-to-eatsubcommand, with tables for humans and--jsonfor scripts. One registry feeds both surfaces, so they can't drift. - 🔐 Auto-auth & auto-recovery — set your credentials once, the server handles login, caches the cookie session to disk, and silently re-auths whenever Plan to Eat invalidates it.
- 🧰 36 tools, all the verbs that matter — full recipe CRUD, full meal-planner CRUD (add / move / duplicate / delete recipes, notes, and ingredient entries), reorder events in a slot, leftovers as a first-class workflow, freezer tracking, browse courses & cuisines & tags, count what's in your queue.
- 🗓️ Real planner control — view a week's plan with recipe titles pre-joined, schedule recipes on dates, attach prep notes, reschedule with one tool call, change servings, duplicate, search for duplicates, reorder same-slot events.
- 🛒 A shopping list you can actually work with — read it with the store and aisle each item is filed under, add items (Plan to Eat guesses the aisle and reuses the store you last picked), retitle or re-quantify a line, move items between stores, remove them, put them back.
- ❄️ Freezer tracking — after cooking, mark N portions as frozen with
freeze_recipe_portions; check what's stashed withlist_frozen_recipes; consume entries when you eat them (soft-delete, history preserved). - 🍳 Real CRUD — including ingredient lists with proper units, directions, prep/cook times, nutrition, ratings, and tags.
- 📦 Tiny runtime — no Playwright, no headless browser, no native modules.
Just
fetch, the MCP SDK, and Zod. Boots in under a second. - 🦺 100% TypeScript — fully typed
Recipe,Ingredient,PlannerEventshapes plus a generic_json<T>so your tools never have to guess what comes back. - 📚 A library too —
core/client.tsis a clean, plain-Node API client you can drop into any script. - 🧠 Bundled Claude Code skill —
.claude/skills/plan-to-eat/SKILL.mdteaches any agent the common workflows and gotchas (the supper-vs-dinner alias, thedescription-vs-titlemismatch, etc.) so it doesn't have to rediscover them.
Reverse-engineered from the live web app. There's no public Plan to Eat API, but the desktop site uses these same endpoints internally. Use at your own risk — they could change anything at any time.
🚀 Quick start
Requires Node 18+ (for built-in fetch) and a
Plan to Eat account.
The package ships two bins: plan-to-eat-mcp (the MCP server) and
plan-to-eat (the CLI). To run the CLI through npx without installing, note
that you have to select it explicitly, since the default bin is the server:
Building from a clone instead (for development, or the Claude Code plugin)
The build emits CommonJS to dist/.
Configuration
The CLI also reads a .env in the working directory (shell variables win). The
MCP server does not — MCP hosts pass env explicitly, as shown below.
🤖 Use it with an agent
Any host that can launch a local stdio MCP server works. The server needs one command, two env vars, and nothing else — no ports, no OAuth, no daemon.
Claude Code, the easy way: install the plugin
The repo ships as a Claude Code plugin — MCP server and both skills in one step:
That gives you:
Confirm with claude plugin details plan-to-eat@plan-to-eat and claude mcp list.
The server reads PLAN_TO_EAT_USERNAME / PLAN_TO_EAT_PASSWORD from the
environment Claude Code was launched with, so export them in your shell profile
rather than committing them anywhere.
Claude Code, manually
Add --scope user to make it available in every project instead of just this
one. Check it connected with claude mcp list, or /mcp inside a session.
Claude Desktop
Edit claude_desktop_config.json — Settings → Developer → Edit Config, or:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Restart Claude Desktop, and you're cooking.
Any other MCP host
Cursor, Windsurf, Zed, Cline, Continue, OpenClaw, VS Code's MCP support, and custom SDK clients all take the same three things. Point them at:
Most of them use the same mcpServers JSON block as Claude Desktop above —
often in .cursor/mcp.json, .vscode/mcp.json, or the host's settings UI.
If you installed globally (npm i -g plan-to-eat-mcp), use the
plan-to-eat-mcp bin as the command and drop the args entirely. If you built
from a clone, the command is node with
["/absolute/path/to/plan-to-eat-mcp/dist/mcp/server.js"].
Absolute paths matter for the clone route. MCP hosts don't launch servers from your project directory, so a relative path will fail to resolve. The
npxcommand above sidesteps this entirely.
Verify it works
You should see [plan-to-eat] mcp server ready on stdio (36 tools) on stderr.
That's the server waiting for a client — Ctrl-C out. If instead you get a
credentials error, fix that before wiring up a host, where the failure is
harder to see.
Teach your agent the workflows
Two skills ship in .claude/skills/, covering the common flows and the sharp
edges (the supper-vs-dinner alias, the description-vs-title mismatch on
note entries, checking for duplicates before scheduling):
plan-to-eat— for agents calling the MCP tools.plan-to-eat-cli— for agents that have a shell but no MCP server. Same 30 capabilities, driven through subcommands, with--jsonfor parsing.
The plugin install above registers both. Agents on other hosts can read them as plain context — point them at the files, or paste one into your system prompt.
Or install just the skills, into any of 18+ agents, with the skills.sh CLI:
That copies both SKILL.md files into .agents/skills/ and symlinks them for
Claude Code, Cursor, Codex, Copilot, Gemini CLI and the rest. Add
--skill plan-to-eat-cli to take only one. Note that this installs the skills
and not the server — each skill's setup section walks the agent through building
the MCP server or CLI if it isn't already there.
For OpenClaw agents, both skills are on ClawHub:
Their frontmatter declares the credentials and binaries each one needs under
metadata.openclaw, so ClawHub can check your environment at install time.
⌨️ Use it from the terminal
Every MCP tool is also a subcommand. Underscores become dashes; both spellings work.
Or without installing — note the -p, since the package's default bin is the
MCP server, not the CLI:
- Positional or flagged —
get-recipe 123andget-recipe --id 123are the same.<command> --helplists which arguments are positional. --jsonprints the raw payload instead of a table, for piping intojq.- Arrays repeat the flag (
--event_ids 11 --event_ids 22) or take JSON (--event_ids '[11,22]'). Object arguments take JSON:--ingredients '{"title":"bread","amount":"2"}'. - Validation is the same Zod schema the MCP server uses, so a bad enum or a malformed date fails the same way in both surfaces.
🧰 The 36 tools
Each is an MCP tool and a CLI subcommand — add_planner_recipe the tool is
plan-to-eat add-planner-recipe in the shell. Full reference with input
schemas and return shapes: docs/TOOLS.md.
Recipes
Planner — read
Planner — write
Freezer
Shopping list
A line is addressed by its item_ids array, not a scalar id — Plan to Eat
merges duplicate ingredients into one line that keeps every underlying row id.
Lookup tables & extras
📚 Use the client as a library
The client stashes credentials internally on first login so it can transparently re-authenticate if the cached cookies expire mid-session.
The tool registry is exported too, if you want to build your own adapter over the same 36 capabilities:
🧪 API reference (the parts that work)
All paths under https://app.plantoeat.com.
JSON endpoints (/api/v1/*)
Planner write endpoints (/planner/*)
A different style: form-encoded bodies, text/javascript (empty) responses. The server mutates state and the UI re-fetches separately. Required headers: X-CSRF-Token, X-Requested-With: XMLHttpRequest, Accept: text/javascript. Because the response body is empty, the client recovers any new event ID by diffing /api/v1/events before and after.
section values are breakfast, lunch, dinner, snacks. Note that the server may normalize dinner → supper based on the user's per-account preference; reads will reflect the canonical name.
Authentication
Cookie-based. The client supports two flows:
- Login.
POST /loginwithlogin[email]andlogin[password]plus theauthenticity_tokenfrom the meta tag onGET /login. Server returns a 302 and sets cookies. - Reuse cookies. The "remember me" pair
ptermid2(user id) andptermxt2(long-lived token) is sufficient on its own — stash those and skip re-login until they're invalidated.
Write requests need an X-CSRF-Token header. The client grabs it from the
<meta name="csrf-token"> tag on the /recipes page on demand.
HTTP Basic auth on /api/v1/... is not supported (returns 401).
Recipe payload shape
The single-recipe response has 65 fields. Writable on POST/PUT include:
title, description, source, url, servings, yield, scaling,
prep_time, cook_time, total_time (minutes),
course_id, cuisine_id, main_ingredient_id, tag_titles (comma list),
directions (free text), private, draft, rating,
nutrition strings (calories, sodium, etc.), and ingredients.
Ingredients use Rails nested-attributes — the wire field is
recipe_ingredients_attributes, not ingredients. The client and the
create_recipe / update_recipe tools accept the friendlier name
ingredients and translate. Each entry:
To delete an existing ingredient on update, include its id plus
"_destroy": true. The server back-fills amount_float, metric_amount,
metric_unit, and similar_titles.
📁 Layout
One package, three layers. The logic lives in core/; the MCP server and the
CLI are thin adapters over the same registry.
Adding a tool means adding one entry to src/core/tools.ts. It appears in
the MCP server and the CLI at once, with the same name, schema, and
description — they can't drift apart.
Other files worth knowing:
docs/TOOLS.md— per-tool reference with input/output shapes and gotchas. Hand-written;npm run check:docsfails if it and the registry disagree about which tools exist..claude/skills/plan-to-eat/SKILL.md— how to use the MCP tools well..claude/skills/plan-to-eat-cli/SKILL.md— the same, for the CLI..claude-plugin/— Claude Code plugin and marketplace manifests..mcp.json— the plugin's MCP server declaration.dist/— emitted bynpm run build.
Upgrading from ≤0.4? The server moved from
dist/server.jstodist/mcp/server.js. The old path still works — it's a shim that loads the new one — so existing host configs and deployments keep running. New configs should use the new path or theplan-to-eat-mcpbin.
Playwright was used during reverse engineering and is kept as a devDependency
for any future API-discovery work; the runtime depends only on fetch, the
MCP SDK, and Zod.
Scripts
The verify* and test scripts hit your real account (test:unit doesn't). They create and delete
their own test data, but they are not a dry run — see
CONTRIBUTING.md.
🤝 Contributing
Bug reports, new endpoints, and upstream-breakage fixes are all welcome — see CONTRIBUTING.md. The one thing to know up front: the test scripts run against a real Plan to Eat account and create real data (then clean it up). Use your own.
🙏 Support Plan to Eat
This whole project exists because Plan to Eat is great. If you find this useful, the best thing you can do is give Plan to Eat a try with my referral link. Free 14-day trial, no card needed.
License
MIT — see LICENSE. Do whatever you want with it; just don't blame me if Plan to Eat ships a breaking change.
來源:README.md,提交 a23db4a
工具
0版本歷史
2- v0.8.0最新Oct 17, 2026
- v0.7.3Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分