{
  "markdown": "# mcp-wikibooks-cookbook\n\n[![npm](https://img.shields.io/npm/v/mcp-wikibooks-cookbook.svg)](https://www.npmjs.com/package/mcp-wikibooks-cookbook)\n[![CI](https://github.com/smeet666/mcp-wikibooks-cookbook/actions/workflows/ci.yml/badge.svg)](https://github.com/smeet666/mcp-wikibooks-cookbook/actions/workflows/ci.yml)\n[![license](https://img.shields.io/npm/l/mcp-wikibooks-cookbook.svg)](./LICENSE)\n[![MCP Registry](https://img.shields.io/badge/MCP_Registry-listed-6E56CF)](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.smeet666/mcp-wikibooks-cookbook)\n[![Glama](https://glama.ai/mcp/servers/smeet666/mcp-wikibooks-cookbook/badges/score.svg)](https://glama.ai/mcp/servers/smeet666/mcp-wikibooks-cookbook)\n[![M8ven](https://m8ven.ai/badge/mcp/smeet666-mcp-wikibooks-cookbook-1n3o1b?variant=verified)](https://m8ven.ai/mcp/smeet666-mcp-wikibooks-cookbook-1n3o1b)\n[![LobeHub](https://lobehub.com/badge/mcp/smeet666-mcp-wikibooks-cookbook)](https://lobehub.com/mcp/smeet666-mcp-wikibooks-cookbook)\n[![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=wikibooks-cookbook&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIm1jcC13aWtpYm9va3MtY29va2Jvb2siXX0%3D)\n[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=wikibooks-cookbook&config=%7B%22name%22%3A%22wikibooks-cookbook%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22mcp-wikibooks-cookbook%22%5D%7D)\n\n<!-- m8ven-verify: b1666486e14cfe82ed7e94a03c514317 -->\n\nThe [Cookbook](https://en.wikibooks.org/wiki/Cookbook:Table_of_Contents) is the\nrecipe collection of the English Wikibooks, a Wikimedia project. Thousands of\nrecipes are written and maintained there in the open, each with its ingredients,\nthe equipment it calls for, its steps, the tips and variations its authors added,\nand the categories it files itself under: a cuisine, a kind of dish, a main\ningredient. The pages are published under Creative Commons Attribution-ShareAlike\n4.0.\n\nThis server connects a chat client to that collection. You can search the recipes\nby dish or by ingredient, list them by cuisine, kind of dish or main ingredient,\nread one with its ingredients rescaled to the number of people at your table, and\nrescale any ingredient list of your own. It needs no API key and no account.\n\n_[Version française](#mcp-wikibooks-cookbook-français)_\n\n---\n\n## Install\n\n**One-click install**\n\n[![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=wikibooks-cookbook&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIm1jcC13aWtpYm9va3MtY29va2Jvb2siXX0%3D)\n[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=wikibooks-cookbook&config=%7B%22name%22%3A%22wikibooks-cookbook%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22mcp-wikibooks-cookbook%22%5D%7D)\n\n**Claude Code**\n\n```bash\nclaude mcp add wikibooks-cookbook -- npx -y mcp-wikibooks-cookbook\n```\n\n**Claude Desktop, Cursor, and any client using the standard config format**\n\n```json\n{\n  \"mcpServers\": {\n    \"wikibooks-cookbook\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-wikibooks-cookbook\"]\n    }\n  }\n}\n```\n\nNode 24 or later is required, and no environment variable has to be set.\n\n### With Docker\n\n```json\n{\n  \"mcpServers\": {\n    \"wikibooks-cookbook\": {\n      \"command\": \"docker\",\n      \"args\": [\"run\", \"-i\", \"--rm\", \"ghcr.io/smeet666/mcp-wikibooks-cookbook:2.0.1\"]\n    }\n  }\n}\n```\n\n`-i` keeps stdin open, which is where the protocol travels, and `-t` is left out\nbecause a TTY rewrites the stream. The container needs outbound HTTPS to\n`api.wikimedia.org`, and nothing else: no volume, no port, no credential.\n\n### Bundle, without npm\n\nDownload `mcp-wikibooks-cookbook-2.0.1.mcpb` from\n[the latest release](https://github.com/smeet666/mcp-wikibooks-cookbook/releases/latest)\nand open it. A client that supports MCP bundles installs it on its own, with no\nnpm and no configuration file to edit. The bundle carries its dependencies, so\nnothing is fetched at install time.\n\n## What you can ask\n\n- \"Find me a carbonara recipe in the Cookbook.\"\n- \"Read it for six people instead of four.\"\n- \"What Thai soups does the collection hold?\"\n- \"Which recipes are built on lentils?\"\n- \"Scale this ingredient list by 2.5 for me.\"\n\nThe ordinary path runs from a search to a reading: a row carries an `id`, the\npage key, and `get_recipe` takes that key.\n\n## Tools\n\n| Tool                | What it does                                                   |\n| ------------------- | -------------------------------------------------------------- |\n| `search_recipes`    | Finds recipes by dish or by ingredient.                        |\n| `get_recipe`        | Reads one recipe, rescaled to a number of servings on request. |\n| `scale_ingredients` | Rescales any ingredient list, with no request to the wiki.     |\n| `list_recipes`      | Lists recipes by cuisine, kind of dish or main ingredient.     |\n\n### `search_recipes`\n\nSearches the Cookbook, either across the whole text of its pages or across their\ntitles alone.\n\n| Argument | Type                              | Required | What it does                                                        |\n| -------- | --------------------------------- | -------- | ------------------------------------------------------------------- |\n| `query`  | string, 1 to 300 characters       | yes      | A dish, such as `carbonara`, or an ingredient, such as `guanciale`. |\n| `search` | `text` or `title`, default `text` | no       | `text` reads the whole page; `title` matches the page name alone.   |\n| `limit`  | integer, 1 to 50, default `10`    | no       | Rows to serve.                                                      |\n\n**In return:** rows carrying `id`, the page key `get_recipe` takes; `title`;\n`url`; `image_url`; `description`, the short gloss the wiki keeps for a page; and\n`excerpt`, the matching passage with the highlight markup taken off. Each of the\nlast three is `null` where the search offered none. `total_available` is always\n`null`: the search route publishes no total and no paging, so `result_count`\ncounts the rows this call returned.\n\n### `get_recipe`\n\nReads one recipe, and rescales its ingredients when a number of servings is\ngiven.\n\n| Argument                | Type                                  | Required | What it does                                               |\n| ----------------------- | ------------------------------------- | -------- | ---------------------------------------------------------- |\n| `id`                    | string, 1 to 300 characters           | yes      | The page key, such as `Cookbook:Spaghetti_alla_Carbonara`. |\n| `servings`              | integer, 1 to 500                     | no       | Rescale the ingredients to this many servings.             |\n| `max_description_chars` | integer, 100 to 20000, default `1200` | no       | How much of the page's prose to serve.                     |\n\n**In return:** `title`, `url`, `ingredients`, `equipment`, `steps`, `tips` for\nthe notes and variations the page publishes, `prep_minutes`, `cook_minutes`,\n`total_minutes`, `time_text` in the page's own wording, `time_phases`, `category`\nand `categories` for every category the page files itself under. A figure the\npage states nothing for is `null`. `id` names the page that was read, which\ndiffers from the key asked for after a redirect, and `redirected_from` then names\nthe key that led there. `yield` says what the recipe was written for and what it\nwas rescaled to, and each ingredient carries `scaling`, reading `scaled`,\n`rounded` or `unscaled`.\n\n### `scale_ingredients`\n\nApplies the same arithmetic to any list of ingredient lines, with no request to\nthe wiki.\n\n| Argument        | Type                                       | Required   | What it does                               |\n| --------------- | ------------------------------------------ | ---------- | ------------------------------------------ |\n| `ingredients`   | array of 1 to 100 strings, up to 300 chars | yes        | The lines to rescale.                      |\n| `factor`        | number, above 0 and up to 100              | one of two | The multiplier to apply.                   |\n| `from_servings` | number, above 0 and up to 500              | one of two | How many servings the list is written for. |\n| `to_servings`   | number, above 0 and up to 500              | one of two | How many servings are wanted.              |\n\nPass `factor`, or the `from_servings` and `to_servings` pair.\n\n**In return:** the `factor` used, the rescaled `ingredients` in the shape\n`get_recipe` returns, and `scaled_count`, `rounded_count` and `unscaled_count`.\n\n### `list_recipes`\n\nLists recipes along the categories the Cookbook files them under. The arguments\ncombine, and the answer says which search was built from them.\n\n| Argument          | Type                           | Required | What it does                                          |\n| ----------------- | ------------------------------ | -------- | ----------------------------------------------------- |\n| `cuisine`         | string, up to 80 characters    | no       | A cuisine or a country, such as `Italian` or `Thai`.  |\n| `dish_type`       | string, up to 80 characters    | no       | A kind of dish, such as `soup`, `dessert` or `bread`. |\n| `main_ingredient` | string, up to 80 characters    | no       | The ingredient a recipe is built on.                  |\n| `limit`           | integer, 1 to 50, default `15` | no       | Rows to serve.                                        |\n\n**In return:** the rows `search_recipes` returns, with `query` naming the search\nthis server built from the arguments, and each argument echoed back or `null`\nwhere it was left out.\n\n## Rescaling the quantities\n\nA quantity is stated in the unit that suits it, so a line can come back in a\ndifferent unit from the one the recipe used: 200 g multiplied by twenty reads\n`4 kg`.\n\nHow finely an ingredient can be divided depends on what it is. A loaf can be cut\nin two, in three or in four; an egg cannot be shared out. A quantity landing\nbetween the two is rounded, and the rescaled recipe then departs a little from\nthe proportions of the original. The line carries `rounded`, and its note says\nwhat was done.\n\nThe figures are this server's arithmetic, so say they were recomputed when you\nshow them. A recipe whose page states no number of servings cannot be put to a\nnumber of people, and the answer says so.\n\n## Licence and attribution\n\nCookbook pages are published under\n[Creative Commons Attribution-ShareAlike 4.0](https://creativecommons.org/licenses/by-sa/4.0/).\nRepeating a recipe means crediting Wikibooks and the page it came from, and\nsharing what is built on it under the same licence. `get_recipe` returns both\n`license` and the page `url`, so an answer carries the credit with it.\n\n## Configuration\n\nEvery variable is optional. Set them in the `env` block of your client config.\n\n| Variable               | Default              | What it does                                                                        |\n| ---------------------- | -------------------- | ----------------------------------------------------------------------------------- |\n| `WB_USER_AGENT`        | the project identity | Names your application to Wikimedia, with an address where a person can be reached. |\n| `WB_MIN_INTERVAL_MS`   | `1000`               | Gap between two requests, from 500 to 60000.                                        |\n| `WB_TIMEOUT_MS`        | `20000`              | Deadline for one request, from 1000 to 120000.                                      |\n| `WB_MAX_RETRIES`       | `3`                  | Attempts after a transient failure, from 0 to 8.                                    |\n| `WB_CACHE_TTL_MS`      | `900000`             | How long a page stays in memory, from 0 to 86400000.                                |\n| `WB_CACHE_MAX_ENTRIES` | `200`                | Pages held in memory at once, from 1 to 5000.                                       |\n| `WB_LOG_LEVEL`         | `error`              | `silent`, `error`, `info` or `debug`, written to stderr.                            |\n\nA value outside its range falls back to the default, and the reason is written to\nstderr.\n\n## Errors\n\nEvery failure carries one of six codes, a message, and where it helps a hint\nnaming the next move.\n\n| Code            | What happened                                           | What to do                                                                                                   |\n| --------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |\n| `not_found`     | The wiki answered, and holds no such page.              | Check the page key with `search_recipes`.                                                                    |\n| `invalid_input` | The arguments were refused before any request went out. | Read the message, which names the argument.                                                                  |\n| `rate_limited`  | Wikimedia 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. |\n| `parse_failure` | The page loaded and the expected content was absent.    | Report it at [the issue tracker](https://github.com/smeet666/mcp-wikibooks-cookbook/issues).                 |\n| `network_error` | The request did not complete.                           | Try again shortly.                                                                                           |\n| `timeout`       | The request passed its deadline.                        | Raise `WB_TIMEOUT_MS`, or ask for fewer rows.                                                                |\n\n## As a library\n\nThe layer reading the wiki is published on its own, with its pacing, its cache\nand its errors, and with no protocol attached.\n\n```ts\nimport { WikibooksClient } from \"mcp-wikibooks-cookbook/client\";\n\nconst client = new WikibooksClient();\nconst { data, cached } = await client.getRecipe(\"Cookbook:Spaghetti_alla_Carbonara\");\nconsole.log(data.title, data.ingredients.length, cached);\n```\n\n`search` and `getRecipe` each answer `{ data, cached }`, and throw an error\ncarrying one of the six codes. The floor between two requests holds here as well.\n\n## Pacing and attribution\n\nRequests go out one at a time with at least a second between them, and the floor\nof half a second holds however the server is configured. The `User-Agent` always\nends with the project identity and an address where a person can be reached.\n\nReads go to `api.wikimedia.org`, the host Wikimedia documents and maintains for\ndevelopers. Every result carries the address of the page it was read from, and\nthe licence it is published under.\n\nThis MCP server is an unofficial project, with no affiliation to Wikimedia or to\nthe Wikibooks community.\n\n## Privacy\n\nThis server collects nothing about you and sends nothing to its author. It runs\non your machine, contacts `api.wikimedia.org` and nothing else, holds its answers in memory\nwhile it runs, and writes nothing to disk.\n[PRIVACY.md](PRIVACY.md) states what a request carries and which settings change\nany of it.\n\n## Development\n\n```bash\nnpm install\nnpm run build:fixtures\nnpm test\nnpm run check\n```\n\nTests run against generated fixtures and make no network request. The live suite,\n`npm run test:live`, makes one request per route and runs nightly against the\nservice itself.\n\n## Contributing\n\nBugs, questions and ideas belong in\n[the issue tracker](https://github.com/smeet666/mcp-wikibooks-cookbook/issues).\nPull requests are welcome; opening an issue first helps agree on the shape of the\nchange. See [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\nMIT for this server's own code, see [LICENSE](LICENSE). The Cookbook pages belong\nto their authors and to the Wikibooks community, under CC BY-SA 4.0.\n\n---\n\n<a name=\"mcp-wikibooks-cookbook-français\"></a>\n\n# mcp-wikibooks-cookbook (français)\n\n_[English version](#mcp-wikibooks-cookbook)_\n\nLe [Cookbook](https://en.wikibooks.org/wiki/Cookbook:Table_of_Contents) est la\ncollection de recettes des Wikibooks anglophones, un projet Wikimedia. Des\nmilliers de recettes y sont écrites et entretenues à découvert, chacune avec ses\ningrédients, le matériel qu'elle demande, ses étapes, les conseils et variantes\nque ses auteurs ont ajoutés, et les catégories sous lesquelles elle se range : une\ncuisine, un type de plat, un ingrédient principal. Les pages sont publiées sous\nCreative Commons Attribution-Partage dans les mêmes conditions 4.0.\n\nCe serveur relie un client de conversation à cette collection. On peut y chercher\ndes recettes par plat ou par ingrédient, les lister par cuisine, type de plat ou\ningrédient principal, en lire une avec ses ingrédients adaptés au nombre de\nconvives, et adapter n'importe quelle liste d'ingrédients. Aucune clé d'API,\naucun compte.\n\n## Installation\n\n**Installation en un clic**\n\n[![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=wikibooks-cookbook&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIm1jcC13aWtpYm9va3MtY29va2Jvb2siXX0%3D)\n[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=wikibooks-cookbook&config=%7B%22name%22%3A%22wikibooks-cookbook%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22mcp-wikibooks-cookbook%22%5D%7D)\n\n**Claude Code**\n\n```bash\nclaude mcp add wikibooks-cookbook -- npx -y mcp-wikibooks-cookbook\n```\n\n**Claude Desktop, Cursor, et tout client au format de configuration standard**\n\n```json\n{\n  \"mcpServers\": {\n    \"wikibooks-cookbook\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-wikibooks-cookbook\"]\n    }\n  }\n}\n```\n\nNode 24 ou plus récent est nécessaire, et aucune variable d'environnement n'est à\nrenseigner.\n\n### Avec Docker\n\n```json\n{\n  \"mcpServers\": {\n    \"wikibooks-cookbook\": {\n      \"command\": \"docker\",\n      \"args\": [\"run\", \"-i\", \"--rm\", \"ghcr.io/smeet666/mcp-wikibooks-cookbook:2.0.1\"]\n    }\n  }\n}\n```\n\n`-i` garde l'entrée standard ouverte, qui est le canal du protocole, et `-t` est\nomis parce qu'un TTY réécrit le flux. Le conteneur a besoin d'un accès HTTPS\nsortant vers `api.wikimedia.org`, et de rien d'autre : aucun volume, aucun port,\naucun identifiant.\n\n### Bundle, sans npm\n\nTéléchargez `mcp-wikibooks-cookbook-2.0.1.mcpb` depuis\n[la dernière publication](https://github.com/smeet666/mcp-wikibooks-cookbook/releases/latest)\net ouvrez-le. Un client qui gère les bundles MCP l'installe seul, sans npm et\nsans fichier de configuration à modifier. Le bundle emporte ses dépendances, donc\nrien n'est téléchargé à l'installation.\n\n## Ce qu'on peut demander\n\n- « Trouve-moi une recette de carbonara dans le Cookbook. »\n- « Lis-la pour six personnes au lieu de quatre. »\n- « Quelles soupes thaïes la collection contient-elle ? »\n- « Quelles recettes sont bâties sur les lentilles ? »\n- « Multiplie cette liste d'ingrédients par 2,5. »\n\nLe chemin ordinaire va d'une recherche à une lecture : une ligne porte un `id`,\nla clé de page, et `get_recipe` reprend cette clé.\n\n## Les outils\n\n| Outil               | Ce qu'il fait                                                         |\n| ------------------- | --------------------------------------------------------------------- |\n| `search_recipes`    | Trouve des recettes par plat ou par ingrédient.                       |\n| `get_recipe`        | Lit une recette, adaptée à un nombre de parts sur demande.            |\n| `scale_ingredients` | Adapte n'importe quelle liste d'ingrédients, sans requête au wiki.    |\n| `list_recipes`      | Liste des recettes par cuisine, type de plat ou ingrédient principal. |\n\n### `search_recipes`\n\nCherche dans le Cookbook, soit dans tout le texte de ses pages, soit dans leurs\nseuls titres.\n\n| Argument | Type                             | Requis | Ce qu'il fait                                                          |\n| -------- | -------------------------------- | ------ | ---------------------------------------------------------------------- |\n| `query`  | chaîne, 1 à 300 caractères       | oui    | Un plat, comme `carbonara`, ou un ingrédient, comme `guanciale`.       |\n| `search` | `text` ou `title`, défaut `text` | non    | `text` lit toute la page ; `title` ne correspond qu'au nom de la page. |\n| `limit`  | entier, 1 à 50, défaut `10`      | non    | Lignes à servir.                                                       |\n\n**En retour :** des lignes portant `id`, la clé de page que `get_recipe`\nreprend ; `title` ; `url` ; `image_url` ; `description`, la courte glose que le\nwiki garde pour une page ; et `excerpt`, le passage correspondant débarrassé de\nson balisage de surlignage. Chacun des trois derniers vaut `null` là où la\nrecherche n'en a proposé aucun. `total_available` vaut toujours `null` : la route\nde recherche ne publie ni total ni pagination, donc `result_count` compte les\nlignes rendues par cet appel.\n\n### `get_recipe`\n\nLit une recette, et adapte ses ingrédients quand un nombre de parts est donné.\n\n| Argument                | Type                               | Requis | Ce qu'il fait                                              |\n| ----------------------- | ---------------------------------- | ------ | ---------------------------------------------------------- |\n| `id`                    | chaîne, 1 à 300 caractères         | oui    | La clé de page, comme `Cookbook:Spaghetti_alla_Carbonara`. |\n| `servings`              | entier, 1 à 500                    | non    | Adapte les ingrédients à ce nombre de parts.               |\n| `max_description_chars` | entier, 100 à 20000, défaut `1200` | non    | La quantité de prose de la page à servir.                  |\n\n**En retour :** `title`, `url`, `ingredients`, `equipment`, `steps`, `tips` pour\nles notes et variantes que la page publie, `prep_minutes`, `cook_minutes`,\n`total_minutes`, `time_text` dans les termes de la page, `time_phases`,\n`category` et `categories` pour chaque catégorie sous laquelle la page se range.\nUn chiffre que la page n'indique pas vaut `null`. `id` nomme la page qui a été\nlue, qui diffère de la clé demandée après une redirection, et `redirected_from`\nnomme alors la clé qui y a mené. `yield` dit pour quoi la recette est écrite et\nvers quoi elle a été adaptée, et chaque ingrédient porte `scaling`, valant\n`scaled`, `rounded` ou `unscaled`.\n\n### `scale_ingredients`\n\nApplique la même arithmétique à n'importe quelle liste d'ingrédients, sans\nrequête au wiki.\n\n| Argument        | Type                                               | Requis        | Ce qu'il fait                             |\n| --------------- | -------------------------------------------------- | ------------- | ----------------------------------------- |\n| `ingredients`   | tableau de 1 à 100 chaînes, jusqu'à 300 caractères | oui           | Les lignes à adapter.                     |\n| `factor`        | nombre, au-delà de 0 jusqu'à 100                   | l'un des deux | Le multiplicateur à appliquer.            |\n| `from_servings` | nombre, au-delà de 0 jusqu'à 500                   | l'un des deux | Le nombre de parts de la liste d'origine. |\n| `to_servings`   | nombre, au-delà de 0 jusqu'à 500                   | l'un des deux | Le nombre de parts voulu.                 |\n\nPassez `factor`, ou le couple `from_servings` et `to_servings`.\n\n**En retour :** le `factor` employé, les `ingredients` adaptés dans la forme que\nrend `get_recipe`, et `scaled_count`, `rounded_count` et `unscaled_count`.\n\n### `list_recipes`\n\nListe des recettes selon les catégories sous lesquelles le Cookbook les range.\nLes arguments se combinent, et la réponse dit quelle recherche en a été bâtie.\n\n| Argument          | Type                          | Requis | Ce qu'il fait                                        |\n| ----------------- | ----------------------------- | ------ | ---------------------------------------------------- |\n| `cuisine`         | chaîne, jusqu'à 80 caractères | non    | Une cuisine ou un pays, comme `Italian` ou `Thai`.   |\n| `dish_type`       | chaîne, jusqu'à 80 caractères | non    | Un type de plat, comme `soup`, `dessert` ou `bread`. |\n| `main_ingredient` | chaîne, jusqu'à 80 caractères | non    | L'ingrédient sur lequel une recette est bâtie.       |\n| `limit`           | entier, 1 à 50, défaut `15`   | non    | Lignes à servir.                                     |\n\n**En retour :** les lignes que rend `search_recipes`, avec `query` qui nomme la\nrecherche bâtie par ce serveur à partir des arguments, et chaque argument redonné\nou `null` là où il a été omis.\n\n## L'adaptation des quantités\n\nUne quantité est exprimée dans l'unité qui lui convient. Après adaptation, une\nligne peut donc apparaître dans une autre unité que celle de la recette : 200 g\nmultipliés par vingt donnent `4 kg`.\n\nLa finesse à laquelle un ingrédient se coupe dépend de sa nature. Un pain se\ncoupe en deux, en trois ou en quatre ; un oeuf ne se partage pas. Une quantité\nqui tombe entre les deux est donc arrondie, et la recette adaptée s'écarte alors\nun peu des proportions de l'originale. La ligne porte `rounded`, et sa note dit\nce qui a été fait.\n\nLes chiffres sont l'arithmétique de ce serveur, donc dites qu'ils ont été\nrecalculés quand vous les montrez. Une recette dont la page n'indique aucun\nnombre de parts ne peut pas être portée à un nombre de convives, et la réponse le\ndit.\n\n## La licence et l'attribution\n\nLes pages du Cookbook sont publiées sous\n[Creative Commons Attribution-Partage dans les mêmes conditions 4.0](https://creativecommons.org/licenses/by-sa/4.0/deed.fr).\nReprendre une recette demande de créditer Wikibooks et la page d'où elle vient,\net de partager ce qu'on bâtit dessus sous la même licence. `get_recipe` rend à la\nfois `license` et l'`url` de la page, donc une réponse emporte le crédit avec\nelle.\n\n## Configuration\n\nChaque variable est facultative. Elles se posent dans le bloc `env` de la\nconfiguration du client.\n\n| Variable               | Défaut               | Ce qu'elle fait                                                                        |\n| ---------------------- | -------------------- | -------------------------------------------------------------------------------------- |\n| `WB_USER_AGENT`        | l'identité du projet | Nomme votre application auprès de Wikimedia, avec une adresse où joindre une personne. |\n| `WB_MIN_INTERVAL_MS`   | `1000`               | Écart entre deux requêtes, de 500 à 60000.                                             |\n| `WB_TIMEOUT_MS`        | `20000`              | Délai d'une requête, de 1000 à 120000.                                                 |\n| `WB_MAX_RETRIES`       | `3`                  | Tentatives après un échec passager, de 0 à 8.                                          |\n| `WB_CACHE_TTL_MS`      | `900000`             | Durée pendant laquelle une page reste en mémoire, de 0 à 86400000.                     |\n| `WB_CACHE_MAX_ENTRIES` | `200`                | Pages gardées en mémoire à la fois, de 1 à 5000.                                       |\n| `WB_LOG_LEVEL`         | `error`              | `silent`, `error`, `info` ou `debug`, écrit sur la sortie d'erreur.                    |\n\nUne valeur hors de sa plage retombe sur le défaut, et la raison est écrite sur la\nsortie d'erreur.\n\n## Erreurs\n\nChaque échec porte un des six codes, un message, et quand cela aide une\nindication du geste suivant.\n\n| Code            | Ce qui s'est passé                                 | Que faire                                                                                          |\n| --------------- | -------------------------------------------------- | -------------------------------------------------------------------------------------------------- |\n| `not_found`     | Le wiki a répondu, et n'a pas cette page.          | Vérifiez la clé de page avec `search_recipes`.                                                     |\n| `invalid_input` | Les arguments ont été refusés avant toute requête. | Lisez le message, qui nomme l'argument.                                                            |\n| `rate_limited`  | Wikimedia demande à ce client de ralentir.         | Attendez les secondes indiquées et rappelez avec les mêmes arguments. La recette est toujours là.  |\n| `parse_failure` | La page a chargé et le contenu attendu est absent. | Signalez-le sur [le suivi d'incidents](https://github.com/smeet666/mcp-wikibooks-cookbook/issues). |\n| `network_error` | La requête n'a pas abouti.                         | Réessayez sous peu.                                                                                |\n| `timeout`       | La requête a dépassé son délai.                    | Augmentez `WB_TIMEOUT_MS`, ou demandez moins de lignes.                                            |\n\n## Comme bibliothèque\n\nLa couche qui lit le wiki est publiée seule, avec son rythme, son cache et ses\nerreurs, sans protocole attaché.\n\n```ts\nimport { WikibooksClient } from \"mcp-wikibooks-cookbook/client\";\n\nconst client = new WikibooksClient();\nconst { data, cached } = await client.getRecipe(\"Cookbook:Spaghetti_alla_Carbonara\");\nconsole.log(data.title, data.ingredients.length, cached);\n```\n\n`search` et `getRecipe` répondent chacun `{ data, cached }`, et lèvent une erreur\nportant un des six codes. Le plancher entre deux requêtes tient également ici.\n\n## Rythme et attribution\n\nLes requêtes partent une à une avec au moins une seconde entre elles, et le\nplancher d'une demi-seconde tient quelle que soit la configuration. Le\n`User-Agent` se termine toujours par l'identité du projet et une adresse où\njoindre une personne.\n\nLes lectures vont vers `api.wikimedia.org`, l'hôte que Wikimedia documente et\nmaintient pour les développeurs. Chaque résultat porte l'adresse de la page d'où\nil a été lu, et la licence sous laquelle elle est publiée.\n\nCe MCP est un projet non officiel, sans affiliation à Wikimedia ni à la\ncommunauté Wikibooks.\n\n## Confidentialité\n\nCe serveur ne collecte rien sur vous et n'envoie rien à son auteur. Il tourne sur\nvotre machine, ne joint que `api.wikimedia.org`, garde ses réponses en mémoire le temps qu'il\ntourne, et n'écrit rien sur le disque. [PRIVACY.md](PRIVACY.md) dit ce qu'une\nrequête emporte et quels réglages changent cela.\n\n## Développement\n\n```bash\nnpm install\nnpm run build:fixtures\nnpm test\nnpm run check\n```\n\nLes tests s'exécutent sur des fixtures engendrées et n'émettent aucune requête.\nLa suite en direct, `npm run test:live`, émet une requête par route et tourne\nchaque nuit contre le service lui-même.\n\n## Contribuer\n\nLes anomalies, les questions et les idées ont leur place dans\n[le suivi d'incidents](https://github.com/smeet666/mcp-wikibooks-cookbook/issues).\nLes propositions de modification sont bienvenues ; ouvrir un ticket d'abord aide\nà s'accorder sur la forme du changement. Voir [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Licence\n\nMIT pour le code de ce serveur, voir [LICENSE](LICENSE). Les pages du Cookbook\nappartiennent à leurs auteurs et à la communauté Wikibooks, sous CC BY-SA 4.0.\n",
  "bytes": 31590,
  "sha": "ebdc4f64de056cacfa32c3a2bc56dd1689b45153b0269e79ade7634fcab615bc",
  "repo_slug": "smeet666/mcp-wikibooks-cookbook",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_smeet666_mcp_wikibooks_cookboo_91b1f53c/readme"
}