Mcp Wikibooks Cookbook

io.github.smeet666由 GitHub 帳號 smeet666 發布v2.2.0更新於 Nov 3, 2026

Search the Wikibooks Cookbook, read a recipe and rescale it to any number of servings.

概覽

AI 產生的概覽

搜尋英文維基教科書 Cookbook,讀取食譜的食材、器具與步驟,並依任意份數換算用量。

可以做什麼
  • 依菜名或頁面內文中的食材搜尋食譜,也可只比對標題
  • 依料理類型、菜色種類或主要食材瀏覽食譜
  • 讀取單一食譜頁面:食材、器具、步驟、提示、時間、分類及頁面提供的營養資訊,可依指定份數換算
  • 依倍數或在份數之間換算任意貼上的食材清單,不會發出網路請求
適用情境
適合讓助理查找開放授權的食譜、把食譜調整成實際用餐人數,或換算你手上既有的食材清單。它只是英文維基教科書 Cookbook 的唯讀查詢工具,並非通用食譜或購物服務。
執行需求
以 stdio 在本機執行;npm 套件需要 Node 24 以上版本,也可使用 Docker 或 MCP 套件包。不需要 API 金鑰或帳號。需要連往 api.wikimedia.org 的對外 HTTPS。所有環境變數(WB_USER_AGENT、WB_MIN_INTERVAL_MS、WB_TIMEOUT_MS、WB_MAX_RETRIES、WB_CACHE_TTL_MS、WB_CACHE_MAX_ENTRIES、WB_LOG_LEVEL)皆為選用。
安裝前請注意
唯讀:只抓取頁面並計算換算後的用量,不寫入磁碟。請求只送往 api.wikimedia.org,不會傳給作者。頁面採用創用 CC 姓名標示-相同方式分享 4.0 授權,使用時須依工具回傳的授權與連結標示出處。換算結果是此伺服器自行計算,呈現時應說明為重新計算。WB_USER_AGENT 可夾帶你自己的聯絡方式給維基媒體。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mcp Wikibooks Cookbook,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

mcp-wikibooks-cookbook

[npm] [CI] [license] [MCP Registry] [Glama] [M8ven] [LobeHub] [Install in Cursor] [Install in VS Code]

The Cookbook is the recipe collection of the English Wikibooks, a Wikimedia project. Thousands of recipes are written and maintained there in the open, each with its ingredients, the equipment it calls for, its steps, the tips and variations its authors added, and the categories it files itself under: a cuisine, a kind of dish, a main ingredient. The pages are published under Creative Commons Attribution-ShareAlike 4.0.

This server connects a chat client to that collection. You can search the recipes by dish or by ingredient, list them by cuisine, kind of dish or main ingredient, read one with its ingredients rescaled to the number of people at your table, and rescale any ingredient list of your own. It needs no API key and no account.

Version française


Install

One-click install

[Install in Cursor] [Install in VS Code]

Claude Code

bash
claude mcp add wikibooks-cookbook -- npx -y mcp-wikibooks-cookbook

Claude Desktop, Cursor, and any client using the standard config format

json
{  "mcpServers": {    "wikibooks-cookbook": {      "command": "npx",      "args": ["-y", "mcp-wikibooks-cookbook"]    }  }}

Node 24 or later is required, and no environment variable has to be set.

With Docker

json
{  "mcpServers": {    "wikibooks-cookbook": {      "command": "docker",      "args": ["run", "-i", "--rm", "ghcr.io/smeet666/mcp-wikibooks-cookbook:2.2.0"]    }  }}

-i keeps stdin open, which is where the protocol travels, and -t is left out because a TTY rewrites the stream. The container needs outbound HTTPS to api.wikimedia.org, and nothing else: no volume, no port, no credential.

Bundle, without npm

Download mcp-wikibooks-cookbook-2.2.0.mcpb from the latest release and open it. A client that supports MCP bundles installs it on its own, with no npm and no configuration file to edit. The bundle carries its dependencies, so nothing is fetched at install time.

What you can ask

  • "Find me a carbonara recipe in the Cookbook."
  • "Read it for six people instead of four."
  • "What Thai soups does the collection hold?"
  • "Which recipes are built on lentils?"
  • "Scale this ingredient list by 2.5 for me."

The ordinary path runs from a search to a reading: a row carries an id, the page key, and get_recipe takes that key.

Tools

ToolWhat it does
search_recipesFinds recipes by dish or by ingredient.
get_recipeReads one recipe, rescaled to a number of servings on request.
scale_ingredientsRescales any ingredient list, with no request to the wiki.
list_recipesLists recipes by cuisine, kind of dish or main ingredient.

search_recipes

Searches the Cookbook, either across the whole text of its pages or across their titles alone.

ArgumentTypeRequiredWhat it does
querystring, 1 to 300 charactersyesA dish, such as carbonara, or an ingredient, such as guanciale.
searchtext or title, default textnotext reads the whole page; title matches the page name alone.
limitinteger, 1 to 50, default 10noRows to serve.

In return: rows carrying id, the page key get_recipe takes; title; url; image_url; description, the short gloss the wiki keeps for a page; and excerpt, the matching passage with the highlight markup taken off. Each of the last three is null where the search offered none. total_available is always null: the search route publishes no total and no paging, so result_count counts the rows this call returned.

get_recipe

Reads one recipe, and rescales its ingredients when a number of servings is given.

ArgumentTypeRequiredWhat it does
idstring, 1 to 300 charactersyesThe page key, such as Cookbook:Spaghetti_alla_Carbonara.
servingsinteger, 1 to 500noRescale the ingredients to this many servings.
max_description_charsinteger, 100 to 20000, default 1200noHow much of the page's prose to serve.

In return: title, url, ingredients, equipment, steps, tips for the notes and variations the page publishes, prep_minutes, cook_minutes, total_minutes, time_text in the page's own wording, time_phases, category and categories for every category the page files itself under. A figure the page states nothing for is null. id names the page that was read, which differs from the key asked for after a redirect, and redirected_from then names the key that led there. yield says what the recipe was written for and what it was rescaled to, and each ingredient carries scaling, reading scaled, rounded or unscaled.

scale_ingredients

Applies the same arithmetic to any list of ingredient lines, with no request to the wiki.

ArgumentTypeRequiredWhat it does
ingredientsarray of 1 to 100 strings, up to 300 charsyesThe lines to rescale.
factornumber, above 0 and up to 100one of twoThe multiplier to apply.
from_servingsnumber, above 0 and up to 500one of twoHow many servings the list is written for.
to_servingsnumber, above 0 and up to 500one of twoHow many servings are wanted.

Pass factor, or the from_servings and to_servings pair.

In return: the factor used, the rescaled ingredients in the shape get_recipe returns, and scaled_count, rounded_count and unscaled_count.

list_recipes

Lists recipes along the categories the Cookbook files them under. The arguments combine, and the answer says which search was built from them.

ArgumentTypeRequiredWhat it does
cuisinestring, up to 80 charactersnoA cuisine or a country, such as Italian or Thai.
dish_typestring, up to 80 charactersnoA kind of dish, such as soup, dessert or bread.
main_ingredientstring, up to 80 charactersnoThe ingredient a recipe is built on.
limitinteger, 1 to 50, default 15noRows to serve.

In return: the rows search_recipes returns, with query naming the search this server built from the arguments, and each argument echoed back or null where it was left out.

Rescaling the quantities

A quantity is stated in the unit that suits it, so a line can come back in a different unit from the one the recipe used: 200 g multiplied by twenty reads 4 kg.

How finely an ingredient can be divided depends on what it is. A loaf can be cut in two, in three or in four; an egg cannot be shared out. A quantity landing between the two is rounded, and the rescaled recipe then departs a little from the proportions of the original. The line carries rounded, and its note says what was done.

The figures are this server's arithmetic, so say they were recomputed when you show them. A recipe whose page states no number of servings cannot be put to a number of people, and the answer says so.

Licence and attribution

Cookbook pages are published under Creative Commons Attribution-ShareAlike 4.0. Repeating a recipe means crediting Wikibooks and the page it came from, and sharing what is built on it under the same licence. get_recipe returns both license and the page url, so an answer carries the credit with it.

Configuration

Every variable is optional. Set them in the env block of your client config.

VariableDefaultWhat it does
WB_USER_AGENTthe project identityNames your application to Wikimedia, with an address where a person can be reached.
WB_MIN_INTERVAL_MS1000Gap between two requests, from 500 to 60000.
WB_TIMEOUT_MS20000Deadline for one request, from 1000 to 120000.
WB_MAX_RETRIES3Attempts after a transient failure, from 0 to 8.
WB_CACHE_TTL_MS900000How long a page stays in memory, from 0 to 86400000.
WB_CACHE_MAX_ENTRIES200Pages held in memory at once, from 1 to 5000.
WB_MAX_BODY_BYTES8000000Largest page this reads, in bytes, from 100000 to 64000000.
WB_LOG_LEVELerrorsilent, error, info or debug, written to stderr.

A value outside its range falls back to the default, and the reason is written to stderr.

Errors

Every failure carries one of six codes, a message, and where it helps a hint naming the next move.

CodeWhat happenedWhat to do
not_foundThe wiki answered, and holds no such page.Check the page key with search_recipes.
invalid_inputThe arguments were refused before any request went out.Read the message, which names the argument.
rate_limitedWikimedia asked this client to slow down.Wait the number of seconds the hint names and call again with the same arguments. The recipe is still there.
parse_failureThe page loaded and the expected content was absent.Report it at the issue tracker.
network_errorThe request did not complete.Try again shortly.
timeoutThe request passed its deadline.Raise WB_TIMEOUT_MS, or ask for fewer rows.

As a library

The layer reading the wiki is published on its own, with its pacing, its cache and its errors, and with no protocol attached.

ts
import { WikibooksClient } from "mcp-wikibooks-cookbook/client";
const client = new WikibooksClient();const { data, cached } = await client.getRecipe("Cookbook:Spaghetti_alla_Carbonara");console.log(data.title, data.ingredients.length, cached);

search and getRecipe each answer { data, cached }, and throw an error carrying one of the six codes. The floor between two requests holds here as well.

Pacing and attribution

Requests go out one at a time with at least a second between them, and the floor of half a second holds however the server is configured. The User-Agent always ends with the project identity and an address where a person can be reached.

Reads go to api.wikimedia.org, the host Wikimedia documents and maintains for developers. Every result carries the address of the page it was read from, and the licence it is published under.

This MCP server is an unofficial project, with no affiliation to Wikimedia or to the Wikibooks community.

Privacy

This server collects nothing about you and sends nothing to its author. It runs on your machine, contacts api.wikimedia.org and nothing else, holds its answers in memory while it runs, and writes nothing to disk. PRIVACY.md states what a request carries and which settings change any of it.

Development

bash
npm installnpm run build:fixturesnpm testnpm run check

Tests run against generated fixtures and make no network request. The live suite, npm run test:live, makes one request per route and runs nightly against the service itself.

Contributing

Bugs, questions and ideas belong in the issue tracker. Pull requests are welcome; opening an issue first helps agree on the shape of the change. See CONTRIBUTING.md.

License

MIT for this server's own code, see LICENSE. The Cookbook pages belong to their authors and to the Wikibooks community, under CC BY-SA 4.0.


mcp-wikibooks-cookbook (français)

English version

Le Cookbook est la collection de recettes des Wikibooks anglophones, un projet Wikimedia. Des milliers de recettes y sont écrites et entretenues à découvert, chacune avec ses ingrédients, le matériel qu'elle demande, ses étapes, les conseils et variantes que ses auteurs ont ajoutés, et les catégories sous lesquelles elle se range : une cuisine, un type de plat, un ingrédient principal. Les pages sont publiées sous Creative Commons Attribution-Partage dans les mêmes conditions 4.0.

Ce serveur relie un client de conversation à cette collection. On peut y chercher des recettes par plat ou par ingrédient, les lister par cuisine, type de plat ou ingrédient principal, en lire une avec ses ingrédients adaptés au nombre de convives, et adapter n'importe quelle liste d'ingrédients. Aucune clé d'API, aucun compte.

Installation

Installation en un clic

[Install in Cursor] [Install in VS Code]

Claude Code

bash
claude mcp add wikibooks-cookbook -- npx -y mcp-wikibooks-cookbook

Claude Desktop, Cursor, et tout client au format de configuration standard

json
{  "mcpServers": {    "wikibooks-cookbook": {      "command": "npx",      "args": ["-y", "mcp-wikibooks-cookbook"]    }  }}

Node 24 ou plus récent est nécessaire, et aucune variable d'environnement n'est à renseigner.

Avec Docker

json
{  "mcpServers": {    "wikibooks-cookbook": {      "command": "docker",      "args": ["run", "-i", "--rm", "ghcr.io/smeet666/mcp-wikibooks-cookbook:2.2.0"]    }  }}

-i garde l'entrée standard ouverte, qui est le canal du protocole, et -t est omis parce qu'un TTY réécrit le flux. Le conteneur a besoin d'un accès HTTPS sortant vers api.wikimedia.org, et de rien d'autre : aucun volume, aucun port, aucun identifiant.

Bundle, sans npm

Téléchargez mcp-wikibooks-cookbook-2.2.0.mcpb depuis la dernière publication et ouvrez-le. Un client qui gère les bundles MCP l'installe seul, sans npm et sans fichier de configuration à modifier. Le bundle emporte ses dépendances, donc rien n'est téléchargé à l'installation.

Ce qu'on peut demander

  • « Trouve-moi une recette de carbonara dans le Cookbook. »
  • « Lis-la pour six personnes au lieu de quatre. »
  • « Quelles soupes thaïes la collection contient-elle ? »
  • « Quelles recettes sont bâties sur les lentilles ? »
  • « Multiplie cette liste d'ingrédients par 2,5. »

Le chemin ordinaire va d'une recherche à une lecture : une ligne porte un id, la clé de page, et get_recipe reprend cette clé.

Les outils

OutilCe qu'il fait
search_recipesTrouve des recettes par plat ou par ingrédient.
get_recipeLit une recette, adaptée à un nombre de parts sur demande.
scale_ingredientsAdapte n'importe quelle liste d'ingrédients, sans requête au wiki.
list_recipesListe des recettes par cuisine, type de plat ou ingrédient principal.

search_recipes

Cherche dans le Cookbook, soit dans tout le texte de ses pages, soit dans leurs seuls titres.

ArgumentTypeRequisCe qu'il fait
querychaîne, 1 à 300 caractèresouiUn plat, comme carbonara, ou un ingrédient, comme guanciale.
searchtext ou title, défaut textnontext lit toute la page ; title ne correspond qu'au nom de la page.
limitentier, 1 à 50, défaut 10nonLignes à servir.

En retour : des lignes portant id, la clé de page que get_recipe reprend ; title ; url ; image_url ; description, la courte glose que le wiki garde pour une page ; et excerpt, le passage correspondant débarrassé de son balisage de surlignage. Chacun des trois derniers vaut null là où la recherche n'en a proposé aucun. total_available vaut toujours null : la route de recherche ne publie ni total ni pagination, donc result_count compte les lignes rendues par cet appel.

get_recipe

Lit une recette, et adapte ses ingrédients quand un nombre de parts est donné.

ArgumentTypeRequisCe qu'il fait
idchaîne, 1 à 300 caractèresouiLa clé de page, comme Cookbook:Spaghetti_alla_Carbonara.
servingsentier, 1 à 500nonAdapte les ingrédients à ce nombre de parts.
max_description_charsentier, 100 à 20000, défaut 1200nonLa quantité de prose de la page à servir.

En retour : title, url, ingredients, equipment, steps, tips pour les notes et variantes que la page publie, prep_minutes, cook_minutes, total_minutes, time_text dans les termes de la page, time_phases, category et categories pour chaque catégorie sous laquelle la page se range. Un chiffre que la page n'indique pas vaut null. id nomme la page qui a été lue, qui diffère de la clé demandée après une redirection, et redirected_from nomme alors la clé qui y a mené. yield dit pour quoi la recette est écrite et vers quoi elle a été adaptée, et chaque ingrédient porte scaling, valant scaled, rounded ou unscaled.

scale_ingredients

Applique la même arithmétique à n'importe quelle liste d'ingrédients, sans requête au wiki.

ArgumentTypeRequisCe qu'il fait
ingredientstableau de 1 à 100 chaînes, jusqu'à 300 caractèresouiLes lignes à adapter.
factornombre, au-delà de 0 jusqu'à 100l'un des deuxLe multiplicateur à appliquer.
from_servingsnombre, au-delà de 0 jusqu'à 500l'un des deuxLe nombre de parts de la liste d'origine.
to_servingsnombre, au-delà de 0 jusqu'à 500l'un des deuxLe nombre de parts voulu.

Passez factor, ou le couple from_servings et to_servings.

En retour : le factor employé, les ingredients adaptés dans la forme que rend get_recipe, et scaled_count, rounded_count et unscaled_count.

list_recipes

Liste des recettes selon les catégories sous lesquelles le Cookbook les range. Les arguments se combinent, et la réponse dit quelle recherche en a été bâtie.

ArgumentTypeRequisCe qu'il fait
cuisinechaîne, jusqu'à 80 caractèresnonUne cuisine ou un pays, comme Italian ou Thai.
dish_typechaîne, jusqu'à 80 caractèresnonUn type de plat, comme soup, dessert ou bread.
main_ingredientchaîne, jusqu'à 80 caractèresnonL'ingrédient sur lequel une recette est bâtie.
limitentier, 1 à 50, défaut 15nonLignes à servir.

En retour : les lignes que rend search_recipes, avec query qui nomme la recherche bâtie par ce serveur à partir des arguments, et chaque argument redonné ou null là où il a été omis.

L'adaptation des quantités

Une quantité est exprimée dans l'unité qui lui convient. Après adaptation, une ligne peut donc apparaître dans une autre unité que celle de la recette : 200 g multipliés par vingt donnent 4 kg.

La finesse à laquelle un ingrédient se coupe dépend de sa nature. Un pain se coupe en deux, en trois ou en quatre ; un oeuf ne se partage pas. Une quantité qui tombe entre les deux est donc arrondie, et la recette adaptée s'écarte alors un peu des proportions de l'originale. La ligne porte rounded, et sa note dit ce qui a été fait.

Les chiffres sont l'arithmétique de ce serveur, donc dites qu'ils ont été recalculés quand vous les montrez. Une recette dont la page n'indique aucun nombre de parts ne peut pas être portée à un nombre de convives, et la réponse le dit.

La licence et l'attribution

Les pages du Cookbook sont publiées sous Creative Commons Attribution-Partage dans les mêmes conditions 4.0. Reprendre une recette demande de créditer Wikibooks et la page d'où elle vient, et de partager ce qu'on bâtit dessus sous la même licence. get_recipe rend à la fois license et l'url de la page, donc une réponse emporte le crédit avec elle.

Configuration

Chaque variable est facultative. Elles se posent dans le bloc env de la configuration du client.

VariableDéfautCe qu'elle fait
WB_USER_AGENTl'identité du projetNomme votre application auprès de Wikimedia, avec une adresse où joindre une personne.
WB_MIN_INTERVAL_MS1000Écart entre deux requêtes, de 500 à 60000.
WB_TIMEOUT_MS20000Délai d'une requête, de 1000 à 120000.
WB_MAX_RETRIES3Tentatives après un échec passager, de 0 à 8.
WB_CACHE_TTL_MS900000Durée pendant laquelle une page reste en mémoire, de 0 à 86400000.
WB_CACHE_MAX_ENTRIES200Pages gardées en mémoire à la fois, de 1 à 5000.
WB_MAX_BODY_BYTES8000000Plus grande page lue, en octets, de 100000 à 64000000.
WB_LOG_LEVELerrorsilent, error, info ou debug, écrit sur la sortie d'erreur.

Une valeur hors de sa plage retombe sur le défaut, et la raison est écrite sur la sortie d'erreur.

Erreurs

Chaque échec porte un des six codes, un message, et quand cela aide une indication du geste suivant.

CodeCe qui s'est passéQue faire
not_foundLe wiki a répondu, et n'a pas cette page.Vérifiez la clé de page avec search_recipes.
invalid_inputLes arguments ont été refusés avant toute requête.Lisez le message, qui nomme l'argument.
rate_limitedWikimedia demande à ce client de ralentir.Attendez les secondes indiquées et rappelez avec les mêmes arguments. La recette est toujours là.
parse_failureLa page a chargé et le contenu attendu est absent.Signalez-le sur le suivi d'incidents.
network_errorLa requête n'a pas abouti.Réessayez sous peu.
timeoutLa requête a dépassé son délai.Augmentez WB_TIMEOUT_MS, ou demandez moins de lignes.

Comme bibliothèque

La couche qui lit le wiki est publiée seule, avec son rythme, son cache et ses erreurs, sans protocole attaché.

ts
import { WikibooksClient } from "mcp-wikibooks-cookbook/client";
const client = new WikibooksClient();const { data, cached } = await client.getRecipe("Cookbook:Spaghetti_alla_Carbonara");console.log(data.title, data.ingredients.length, cached);

search et getRecipe répondent chacun { data, cached }, et lèvent une erreur portant un des six codes. Le plancher entre deux requêtes tient également ici.

Rythme et attribution

Les requêtes partent une à une avec au moins une seconde entre elles, et le plancher d'une demi-seconde tient quelle que soit la configuration. Le User-Agent se termine toujours par l'identité du projet et une adresse où joindre une personne.

Les lectures vont vers api.wikimedia.org, l'hôte que Wikimedia documente et maintient pour les développeurs. Chaque résultat porte l'adresse de la page d'où il a été lu, et la licence sous laquelle elle est publiée.

Ce MCP est un projet non officiel, sans affiliation à Wikimedia ni à la communauté Wikibooks.

Confidentialité

Ce serveur ne collecte rien sur vous et n'envoie rien à son auteur. Il tourne sur votre machine, ne joint que api.wikimedia.org, garde ses réponses en mémoire le temps qu'il tourne, et n'écrit rien sur le disque. PRIVACY.md dit ce qu'une requête emporte et quels réglages changent cela.

Développement

bash
npm installnpm run build:fixturesnpm testnpm run check

Les tests s'exécutent sur des fixtures engendrées et n'émettent aucune requête. La suite en direct, npm run test:live, émet une requête par route et tourne chaque nuit contre le service lui-même.

Contribuer

Les anomalies, les questions et les idées ont leur place dans le suivi d'incidents. Les propositions de modification sont bienvenues ; ouvrir un ticket d'abord aide à s'accorder sur la forme du changement. Voir CONTRIBUTING.md.

Licence

MIT pour le code de ce serveur, voir LICENSE. Les pages du Cookbook appartiennent à leurs auteurs et à la communauté Wikibooks, sous CC BY-SA 4.0.

來源:README.md,提交 a32ef67

工具

4

search_recipes

Search the Cookbook

Search the Wikibooks Cookbook for a recipe, by dish name or by an ingredient it uses. 'text' searches the whole of each page, which is what finds a dish from an ingredient inside it; 'title' matches the page name only, which is exact and misses a dish the Cookbook names differently. The Cookbook also holds reference pages on ingredients, techniques and cuisines, and those rank alongside recipes: a row is a page, and only get_recipe can say whether it carries an ingredient list. A full-text row can be a page that merely names the dish: when the titles do not say the words searched for, the notes say so, because the Cookbook links to dishes it does not hold. On a title search the same rows are pages the Cookbook files under another name, such as 'Eggplant' for 'aubergine', since that search opens no page. 'total_available' is null because the search route reports no total and offers no second page. Narrow the query rather than asking for more. Every row carries an 'id', which get_recipe takes.

輸入參數limitquery必填search

get_recipe

Read a recipe

Read one Wikibooks Cookbook page: ingredients, equipment, steps, yield, time, difficulty, category, and the nutrition panel when the page carries one. 'id' is the page key from search_recipes or list_recipes, such as 'Cookbook:Spaghetti_alla_Carbonara'. A plain dish name is accepted and the Cookbook namespace is added. Pass 'servings' to rescale: a countable thing lands on the smallest share a cook can take out of one of it, which is a whole one where half of one cannot be measured out at all, such as an egg or a whole clove, a half where half of one pours, weighs or splits, such as a can or a packet, and a quarter where a knife or the size of the thing goes further, such as an onion, a slice of bread or a jar; a measurement is moved to a smaller unit before rounding so nothing disappears; and anything that cannot be multiplied is flagged instead. Read 'scaling' on each ingredient rather than doing the arithmetic yourself. A page that groups its ingredients by what they are for, such as a cake and its glaze, states that group on every line; a page that lists them flat states null. Two lines can read alike and belong to different parts of the dish. A page offering several versions of the dish states which one each line came from in 'variant'. Those lists replace one another: one of them is used, even where the procedure says to mix all the ingredients. A measurement the page writes as a conversion template is read as the value and the unit the page wrote, and the counterpart the template computes is left out: nothing here is converted between measuring systems. A line asking for as much as is needed and giving an indication in brackets, such as 'water as required (about 1 ½ cups)', states a quantity: the indication is scaled with the recipe and the wording in front of it is left as the page wrote it. A line offering an alternative in brackets, such as '4 eggs (or 8 egg yolks)', has both branches scaled, since a cook takes one of them. The Cookbook keeps recipes and t

輸入參數id必填servingsmax_description_chars

scale_ingredients

Rescale an ingredient list

Rescale a list of English ingredient lines. This contacts no website and works on a list from anywhere, including one the user pasted in. Give either 'factor' directly, or 'from_servings' and 'to_servings' and the factor is computed. Grams, millilitres, ounces and pounds are multiplied and rounded to what a scale can show; a quantity that would fall below one is moved to a smaller unit first, so it never rounds away to nothing. Countable things land where a kitchen can follow, and what decides is the content rather than the container: a can, a packet, a sheet of gelatine or a spoon lands on a half, because half of one pours, weighs or cuts. An egg, a yolk, a white, a zest or a whole clove lands on a whole one, since there is no half of it to measure out, which is what stops an answer like '2.4 eggs'. A bottle, a jar, a block and a slice go one step further, to the quarter, as a whole food a knife shares out does. An approximate measure is scaled as a count, so a pinch taken from 6 servings to 25 is 4 pinches; the note gives the everyday equivalence, and the quantity stays in the unit the line used. That covers the gestures, such as a pinch, a dash, a glug or a handful, and anything named after what holds it, such as a capful or a spoonful. A line with no quantity at all comes back untouched and flagged. A bracketed equivalent, as in '450 g (1 pound)', is scaled with the amount it restates rather than left to contradict it, and so is one written after a slash, as in '500 g / 1.1 lb'. A line offering a choice, as in '2 tablespoons butter OR 30 g margarine', has both branches scaled, so whichever one the cook takes carries the same share. Prefer this over doing the arithmetic yourself.

輸入參數factoringredients必填to_servingsfrom_servings

list_recipes

Browse the Cookbook

Browse the Wikibooks Cookbook by cuisine, by kind of dish, or by main ingredient. Give at least one of the three; giving several narrows the result. This is built on the Cookbook's search, because the route this server is allowed to use publishes no way to list the members of a category. What comes back is therefore a ranked sample and not the category itself: it is neither complete nor ordered, and its length says nothing about how many recipes the Cookbook holds on the subject. The Cookbook also holds reference pages on ingredients and techniques, and those rank alongside recipes. Open a row with get_recipe before describing it as a recipe. Use search_recipes instead when there is a dish name to look up.

輸入參數limitcuisinedish_typemain_ingredient

版本歷史

2
  1. v2.2.0最新Oct 29, 2026
  2. v2.1.0Sep 16, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分