recipal-mcp-unofficial
recipal-mcp-unofficial
一个用于 ReciPal 营养标签 API 的 MCP 服务器。它让 AI 助手可以直接读取和编辑你的食谱、配料和子食谱——包括在网页界面中需要数小时才能完成的批量操作。
非官方。 与 ReciPal 无关联、未经其认可,也不受其支持。由该产品的用户基于其公开 API 构建。
过渡项目——本仓库将被归档。 ReciPal 正在构建官方的 MCP 服务器。当他们的版本发布后,本项目将更新以指向它,然后归档为只读。不要在其上构建任何关键功能。参见 SUNSET.md。
你需要一个有效的付费 ReciPal 订阅。 API 访问是付费功能;密钥来自你的账户设置中的 API access。没有它,这个服务器什么都做不了。
用途
ReciPal 的网页界面适合编辑单个食谱。但当你需要对四十个食谱做同样的操作时就很痛苦——修复整个目录中的份量、重命名带有 (copy) 后缀的配料,或构建一组仅一种配料不同的产品变体。这个服务器暴露了 API,让助手可以循环完成这些工作,并先进行试运行。
最有价值的工具是 bulk_clone_and_swap:将一个完全配置好的食谱作为模板,克隆 N 次,并在每个克隆中替换一种配料。标签设置、标签和份量都会继承,因此克隆出来的结果是一致的。
Related MCP server: cookwith-mcp
范围和分发
刻意保持狭窄,并且会一直如此:
你需要克隆并自行构建的源码。 没有一键插件包,没有
npx包,也没有出现在任何 MCP 目录或市场中。这是对 ReciPal 的承诺,不是疏忽或待办事项。不发布到 npm。
package.json有意标记为private。按 ReciPal 的要求命名为
recipal-mcp-unofficial,以免被误认为是他们的官方服务器。
添加打包分发、市场提交或更友好的消费者安装路径的拉取请求将被拒绝。参见 CONTRIBUTING.md 了解哪些内容是受欢迎的。
安装
需要 Node.js 18 或更高版本。
git clone https://github.com/BlackBlack/recipal-mcp-unofficial.git
cd recipal-mcp-unofficial
npm install
npm run build然后将其注册到你的 MCP 客户端。对于 Claude Code:
claude mcp add --transport stdio recipal-mcp-unofficial \
--env RECIPAL_API_KEY=your_key_here \
-- node /absolute/path/to/recipal-mcp-unofficial/build/index.js对于 Claude Desktop,添加到 claude_desktop_config.json:
{
"mcpServers": {
"recipal-mcp-unofficial": {
"command": "node",
"args": ["/absolute/path/to/recipal-mcp-unofficial/build/index.js"],
"env": { "RECIPAL_API_KEY": "your_key_here" }
}
}
}重启客户端,然后让它列出你的食谱。你应该会看到 19 个可用工具。完整教程见 docs/SETUP.md。
⚠️ 在将其指向你关心的目录之前,请先阅读此内容
confirm: true 和 dry_run 防护由模型提供,而不是由你提供。 它们可以阻止措辞模糊的提示造成损害。但它们无法阻止一个坚定或困惑的代理——一个决定删除食谱的助手会在同一次调用中传入 confirm: true。ReciPal 没有撤销功能。
因此,真正具有破坏性的工具默认关闭。启用它们是运行服务器的人的有意行为,而不是对话可以做到的事情:
环境变量 | 启用的功能 | 为何需要门控 |
|
| 永久性数据丢失,无法撤销 |
|
| 可以用任何方法调用任何端点 |
其他所有内容——所有读取操作以及常规的创建/更新工具——开箱即用。批量工具始终可用,但默认为 dry_run: true,并且除非调用者同时传入 dry_run: false 和 confirm: true,否则拒绝执行。
无论何种情况都建议的做法:先针对一次性食谱进行操作。 多个端点的行为与文档所暗示的不同(参见已知限制)。
配置
变量 | 默认值 | 用途 |
| — | 必需。 来自 ReciPal 账户设置 → API access |
| 关闭 | 暴露两个删除工具 |
| 关闭 | 暴露 |
| 关闭 | 将完整请求体记录到 stderr。请求体包含食谱数据,而你的客户端可能会将 stderr 记录到磁盘,因此日常使用请保持关闭 |
|
| HTTP 429 时的重试次数 |
|
| 覆盖端点。必须是 https 且为 |
| 关闭 | 允许非 |
参见 .env.example。
工具
共 22 个工具,默认暴露 19 个。包含每个参数的生成参考文档:docs/TOOLS.md。
分组 | 工具 |
读取 |
|
食谱写入 |
|
配料行写入 |
|
标签 |
|
批量 |
|
逃生通道 |
|
† 默认禁用。
写入工具接受开放的 fields 对象,而不是固定的参数列表。ReciPal 发布的文档在完整的食谱属性列表之前就截断了,因此硬编码字段名意味着猜测;相反,fields 会被直接传递,以 Rails 风格的表单编码(recipe[name]=...)发送。未记录的属性无需修改代码即可工作。如果端点偏好 JSON,请设置 as_json: true。
在写入食谱之前,先读取一个真实的食谱。 对现有食谱执行 get_recipe 会显示你的账户使用的确切属性名。
已知限制
这些是真实的、已针对实时 API 验证过的问题,在基于此构建之前值得了解:
create_recipe_shortcut无法工作。 它对尝试过的每种配料数组格式都返回 HTTP 422。ReciPal 的文档在参数列表之前就截断了,因此正确的格式未知。请使用create_recipe+create_recipe_ingredient,或使用scale_recipe克隆已配置的模板。该工具被保留,以便可以发现正确的格式——如果你弄清楚了,请提交 PR。PUT /recipe_ingredients/{id}会静默忽略ingredient_id。 它返回 HTTP 200,但原始配料仍然保留。将一种配料替换为另一种必须通过先删除再创建来完成,这正是bulk_clone_and_swap内部所做的。ReciPal 几乎对每个响应都进行双重包装——
{recipe: {recipe_ingredients: [{recipe_ingredient: {…}}]}}。从外层信封读取字段会得到undefined且没有错误。如果你扩展这个服务器,请使用现有的unwrap()/extractRecords()辅助函数。scale_recipe和create_subrecipe的参数名未发布。 它们通过透传的fields工作,但在循环之前,请针对一次性食谱各运行一次并读取响应。文档将
/recipes/{id}/scale列为PUT;实际有效的是POST。 未经测试不要"修复"这个问题。没有分页辅助。
list_recipes每页最多 100 条;请自行遍历页面。
速率限制
ReciPal 文档说明大约 175,000 次请求/周,1,000 次/分钟(超过则返回 HTTP 429),以及最多 5 个并发标签渲染。此服务器遵循 429 并使用 Retry-After 和指数退避,当剩余请求少于 100 次时在 stderr 上发出警告,并且每个批量循环都严格串行运行,带有可配置的延迟。不要并行化标签渲染。
开发
npm run typecheck # tsc --noEmit
npm run build # -> build/index.js
npm test # offline smoke tests, no API key or network needed
npm run gen:docs # regenerate docs/TOOLS.md from the running server
npm run verify # all of the abovedocs/TOOLS.md 通过启动构建后的服务器并询问其自身的工具列表来生成,因此参考文档不会与代码脱节。如果它过期了,CI 会失败。如果你添加或更改了工具,请运行 npm run build && npm run gen:docs 并提交结果。
欢迎在上述范围内贡献——从 CONTRIBUTING.md 开始,然后参阅 docs/TESTING.md 了解如何针对真实账户验证更改,以及 docs/DESIGN.md 了解各部分如何组合。
许可证
"ReciPal" 是其所有者的商标,此处仅用于描述此软件所交互的对象。
Available Tools
17 toolsbulk_clone_and_swapA
The copy-and-swap loop. For each entry: clone template_recipe_id via scale_recipe, rename it, then replace the designated ingredient line with a different ingredient_id. Runs sequentially and independently per entry, so one failure does not poison the rest. Defaults to dry_run:true.
Inputs: entries (required), template_recipe_id (required), swap_recipe_ingredient_id (required), confirm, +2 more.
bulk_create_subrecipesA
Flag many recipes as subrecipes, sequentially. Defaults to dry_run:true — returns the plan without touching anything. Set dry_run:false AND confirm:true to execute. Returns a per-recipe success/failure report including the new ingredient_ids.
Inputs: recipe_ids (required), confirm, dry_run, delay_ms.
create_recipeA
Create a new empty recipe. POST /recipes. Prefer scale_recipe (clone a fully-configured template) when you need label settings to match existing recipes.
Inputs: fields (required), as_json.
create_recipe_ingredientA
Add an ingredient line to a recipe. POST /recipes/{id}/recipe_ingredients. Accepts ingredient_id (required) plus unit + quantity, or total_grams.
Inputs: fields (required), recipe_id (required), as_json.
create_recipe_shortcutA
Create a complete recipe with its ingredients in one request. POST /recipes/shortcut. The fastest path for building many recipes. Requires ingredient_ids and ingredient_weights: parallel lists of the same length, weights in grams. Either may be given as an array or a comma-separated string. Note this does NOT inherit label settings from an existing recipe -- serving size, package yield and tags all come back unset, so use scale_recipe to clone a configured template when label settings matter.
Inputs: fields (required), as_json.
create_subrecipeA
Flag an existing recipe as a subrecipe so it becomes usable as an ingredient in other recipes. POST /recipes/{id}/create_subrecipe. Returns the new ingredient record — capture its ingredient_id, that is what you add to other recipes.
Inputs: recipe_id (required), fields, as_json.
get_ingredientA
Get one ingredient with its full nutrition data and available units.
Inputs: ingredient_id (required).
get_recipeA
Get one recipe in full, including nutrition, serving size, package yield, tags and label settings. Use this to read a template recipe's exact settings before cloning it.
Inputs: recipe_id (required).
get_recipe_ingredientB
Get one ingredient line on a recipe.
Inputs: recipe_id (required), recipe_ingredient_id (required).
get_recipe_nutritionA
Get only the nutrition sub-object for a recipe.
Inputs: recipe_id (required).
list_ingredientsA
List the account's ingredient library. Subrecipes appear here once created, which is how you find the ingredient_id needed to add a subrecipe to another recipe. Paginated; per_page max 20. Larger values are silently reduced to 20, so callers must paginate.
Inputs: page, search, per_page.
list_recipe_ingredientsA
List every ingredient line on a recipe, with recipe_ingredient IDs, ingredient IDs, quantities, units and total_grams.
Inputs: recipe_id (required).
list_recipesA
List recipes from ReciPal with IDs, names, and tags. Paginated; per_page max 20. Larger values are silently reduced to 20, so callers must paginate.
Inputs: page, per_page.
scale_recipeA
Copy (and optionally scale) an existing recipe. POST /recipes/{id}/scale. This is the copy-and-swap primitive: cloning a configured template carries its label settings and tags forward, so you only replace one ingredient afterward. Pass a scale factor of 1 for a straight copy.
Inputs: recipe_id (required), fields, as_json.
update_ingredientA
Update an ingredient in the library. PUT /ingredients/{id}. Use for renaming (e.g. stripping '(copy)' suffixes).
Inputs: fields (required), ingredient_id (required), as_json.
update_recipeA
Update a recipe's attributes. PUT /recipes/{id}.
Inputs: fields (required), recipe_id (required), as_json.
update_recipe_ingredientA
Update one ingredient line. PUT /recipes/{id}/recipe_ingredients/{ri_id}. NOTE: this endpoint silently ignores ingredient_id — it returns 200 with the original ingredient still attached. To swap one ingredient for another you must delete the line and create a new one.
Inputs: fields (required), recipe_id (required), recipe_ingredient_id (required), as_json.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Most tools target distinct resources or actions, and descriptions clearly separate list/get/create/update/bulk workflows. A few overlaps exist—get_recipe versus get_recipe_nutrition, and create_recipe versus create_recipe_shortcut versus scale_recipe—but the descriptions are detailed enough to prevent serious misselection.
Tool names consistently follow lowercase snake_case verb_noun patterns like list_recipes, get_recipe, create_recipe, update_recipe, and bulk_create_subrecipes. Compound names like create_recipe_shortcut and bulk_clone_and_swap are minor extensions but do not break the overall predictable convention.
17 tools is slightly above the ideal 3-15 range, but the count is justified by the combination of single-resource operations, bulk utilities, and shortcut creation. Each tool serves a recognizable recipe-management workflow, so the set feels somewhat heavy but not bloated.
The tool surface covers read, create, update, copy, and bulk operations, but there are no delete endpoints for recipes, ingredients, or recipe ingredient lines. This is a significant gap because update_recipe_ingredient silently ignores ingredient_id and the documentation explicitly says swapping requires deleting the line and creating a new one—yet no delete tool exists to complete that workflow.
Maintenance
Related MCP Connectors
MCP server that lets AI assistants use all OneSchema features exposed via the public API.
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Hosted MCP server to manage a restaurant menu from AI agents - 39 tools over the DuckHub API.
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that transforms AI assistants into personal chefs by providing recipe recommendations and meal planning features based on the HowToCook repository.5813ISC
- AlicenseBqualityDmaintenanceAn MCP server that enables AI-powered recipe generation and transformation using natural language, supporting dietary restrictions, allergies, and nutritional goals.2MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for MealMastery AI meal planning that enables users to manage meal plans, recipes, and grocery lists through natural language conversation with AI agents like Claude.49 npmMIT
- FlicenseAqualityDmaintenanceMCP server enabling AI assistants to manage recipes and ingredients in the WeekPlan app via its REST API.81-