Cook MCPFree · nutrition & photo import on Cook Basic & Pro
Cook MCP gives the AI tools you already use access to your Cooklang recipe collection. It is a
local MCP (Model Context Protocol) server for Claude Code, Claude Desktop, Cursor, ChatGPT, Codex, Gemini CLI, VS Code and any
other MCP-capable client. Your recipes stay as plain .cook and .menu files in a
folder you own; the agent can read, search, validate and write them, build shopping lists, track a
pantry and render reports, all on your machine and without an account.
It runs as a subprocess of your client over stdio, not as a network service. With a cook.md login it can also compute nutrition (through the Nutrition API) and import recipes from photos and social links. The code is MIT licensed: github.com/cook-md/cook-mcp.
Install
The Cooklang plugin (cooklang/cooklang-skills,
v2.0.0) is the easiest way in. It bundles the 14 skills and this server, so your agent gets the tools and
the guides for using them in one step. The server is published on npm as @cookmd/mcp (0.2.2 or newer for the plugin setups) and runs
through npx, so you need Node.js. Your recipe folder is the project you have open; see
how the recipe folder is chosen.
Claude Code: install the Cooklang plugin
Recommended for Claude Code: skills and server together, with your project folder as the recipe folder.
/plugin marketplace add cooklang/cooklang-skills
/plugin install cooklang@cooklang-skills
Check it with /mcp; the server is listed as plugin:cooklang:cook.
If you added the server by hand earlier with claude mcp add cook, remove it
(claude mcp remove cook). While both exist, Claude Code uses yours and skips the plugin's.
Codex
codex plugin marketplace add cooklang/cooklang-skills
codex plugin add cooklang@cooklang-skills
Codex sends no workspace folder to MCP servers and starts plugin servers inside the plugin's install folder, so the server can't find your recipes by itself. Tell it where they are:
codex mcp add cook --env COOK_RECIPES_DIR=/path/to/recipes -- npx -y @cookmd/mcp
A server you add yourself named cook takes the place of the plugin's, so only one runs.
Gemini CLI
gemini extensions install https://github.com/cooklang/cooklang-skills
The extension adds the skills and the server, with your workspace as the recipe folder. Check it with gemini mcp list.
Cursor
The repo is an Agent Plugin that Cursor loads as a plugin, which gives you the skills and the server, using the workspace folder Cursor reports. To add only the server, paste this link into your browser (it may not be clickable here):
cursor://anysphere.cursor-deeplink/mcp/install?name=cook&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjb29rbWQvbWNwIl0sImVudiI6eyJDT09LX1JFQ0lQRVNfRElSIjoiJHt3b3Jrc3BhY2VGb2xkZXJ9In19
Or put this in .cursor/mcp.json in your project, or in the global MCP settings:
{
"mcpServers": {
"cook": {
"command": "npx",
"args": ["-y", "@cookmd/mcp"],
"env": { "COOK_RECIPES_DIR": "${workspaceFolder}" }
}
}
}
VS Code
Run Chat: Install Plugin From Source from the Command Palette and enter
https://github.com/cooklang/cooklang-skills. That installs the skills and the server, with the workspace folder as the recipe folder.
To add only the server, use
the one-click install link,
or add this to .vscode/mcp.json in your recipe folder:
{
"servers": {
"cook": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cookmd/mcp"],
"env": { "COOK_RECIPES_DIR": "${workspaceFolder}" }
}
}
}
Any MCP client
Add this to your client's MCP configuration. Desktop apps have no project folder, so set COOK_RECIPES_DIR to your recipes folder.
{
"mcpServers": {
"cook": {
"command": "npx",
"args": ["-y", "@cookmd/mcp"],
"env": { "COOK_RECIPES_DIR": "/path/to/recipes" }
}
}
}
- Claude Code without the plugin: run
claude mcp add cook -- npx -y @cookmd/mcpfrom your recipes folder, or add the block above to.mcp.jsonin it. - Claude Desktop: add the block to
claude_desktop_config.json(Settings, Developer, Edit Config), then restart the app. - Other clients: anything that can launch a stdio MCP server works; use the same command, arguments and environment.
To install only the skills into any agent that reads Agent Skills, run npx skills add cooklang/cooklang-skills. The skills call the server's tools, so add the server too.
On first run the npm wrapper downloads the prebuilt binary for your platform from the releases page and verifies its SHA-256 checksum before installing. Supported platforms: macOS (Apple Silicon and Intel) and Linux (x86_64 and arm64, glibc 2.35 or newer). Windows builds aren't published yet.
Skills
Skills are step-by-step guides the agent follows for a kind of job, and they call the tools below. The Cooklang plugin bundles all 14, and the
server also serves each one to every MCP client as a cooklang://skills/<name> resource, so they are available even without the plugin.
| Skill | Use it for |
|---|---|
cooklang-editing | Write a new recipe or edit and fix a .cook file. |
cooklang-validation | Check recipes, a folder or the whole collection for errors and broken references. |
metadata | Add or fix YAML frontmatter (title, tags, servings, times), including bulk changes. |
recipe-import | Import a recipe from a URL, photos or pasted text. |
recipe-search | Find recipes by ingredient, tag, cuisine, course or a remembered phrase. |
scale-recipe | Show a recipe for more or fewer servings. |
export-recipe | Turn a recipe into Markdown, JSON, plain text or HTML. |
organize-collection | Folder layout, metadata audit, aisle and pantry config, whole-library checks. |
meal-planning | Build or edit a .menu meal plan. |
shopping-list | Shopping lists from recipes or plans, grouped by aisle, minus the pantry. |
pantry | Track stock, expiry and low items; what can I cook with what I have. |
report-authoring | Custom Jinja reports and printouts with render_report. |
nutrition-reports | Nutrition evaluation and screening (Cook Basic or Cook Pro). |
nutrition-goals | Change a recipe or plan to hit nutrition targets (Cook Basic or Cook Pro). |
Tools
Free, on your computer
No login and no account. Everything here runs locally.
| Tool | What it does |
|---|---|
list_recipes | List recipes, meal plans or report templates. |
read_recipe | Read a recipe or menu: the source plus parsed ingredients, cookware, steps and metadata, optionally scaled. |
search_recipes | Search names and contents, optionally filtered by tag. |
validate | Check a file, a folder, the whole collection or unsaved content for errors and broken references. |
write_recipe | Save a .cook recipe. It is validated first; invalid Cooklang is not saved. |
write_menu | Save a .menu meal plan, validated first. |
write_config | Save config/aisle.conf, config/pantry.conf or a .jinja report template. |
shopping_list | Build a shopping list from recipes and menus: merges duplicates, groups by aisle and subtracts the pantry. |
pantry_list, pantry_expiring, pantry_depleted | Show the pantry, items expiring soon, and items at or below their low-stock threshold. |
pantry_recipes | Which recipes you can cook with what is in the pantry. |
pantry_update | Add, update or remove pantry items. |
render_report | Render a jinja report template against a recipe or menu and return the text, the check results and any problems, so the agent can fix the template and re-render. Plain templates need no login. |
import_recipe | Convert a web page or pasted text to Cooklang. It returns the text and does not save it; the agent validates it and calls write_recipe. |
Cook Basic & Pro
These need a cook.md login on a Cook Basic or Cook Pro plan.
| Tool | What it does |
|---|---|
get_nutrition | Nutrition facts for one ingredient amount. |
aggregate_nutrition | Sum nutrition across many ingredient lines (a whole recipe or meal). |
lookup_ingredient | Fuzzy-search the ingredient catalog for the canonical name and available preparations. |
convert_units | Convert an amount between units. Volume to mass needs a density. |
check_category | Check whether an ingredient belongs to a category (dairy, tree nuts, and so on). |
branded_lookup | Look up a packaged product by barcode or text search. |
reference_intakes | Daily reference-intake tables (RDA / DV) for a standard. |
import_recipe (photos, social links) | Photos and YouTube, TikTok or Instagram links are converted with your monthly import allowance. |
render_report (nutrition functions) | Report templates that call the nutrition functions need Basic or Pro. |
login and auth_status manage the cook.md connection: the first starts a device
login, the second shows your login, plan and import allowance.
Log in (Basic and Pro)
You only need this for nutrition, nutrition reports, and photo or social imports. Ask your agent to
run the login tool: it starts a cook.md device login, shows you a short code and a
cook.md/device link, and finishes authenticating in the background once you approve it in
the browser. You can also run cook-mcp login from a terminal if you installed the binary.
You do this once per machine; auth_status reports your login and subscription state any time.
Using an organization API key instead? Set NUTRITION_API_TOKEN in the server's environment and
the login step is skipped.
Workflow prompts and resources
The server ships workflow prompts, which MCP clients surface as slash commands:
meal-planning,shopping-list,pantry: plan a week from your recipes, build the list, work from what is in the pantry.import-recipe,edit-recipe: bring a recipe in or change one, validating before saving.nutrition-report,nutrition-goals: write a nutrition report template and iterate withrender_report, or adjust a recipe or plan until it hits numeric targets (Basic and Pro).
It also exposes the Cooklang specification, a syntax reference and the .menu format as
resources (cooklang://spec, cooklang://syntax, cooklang://menu-format),
plus short working guides the agent can read for editing, validation, metadata and report authoring.
Things to ask
With the server connected, prompts like these just work:
- "Plan dinners for next week from my recipes and make the shopping list."
- "What can I cook with what's in my pantry?"
- "Check my whole collection for broken references."
- "Import https://example.com/some-recipe as a recipe."
- "How much protein is in this week's plan?" (needs Cook Basic or Pro)
The template functions available inside render_report are the same ones documented under
report template nutrition functions.
How the recipe folder is chosen
The server works on one folder of recipes. All paths the agent uses are relative to it, and writes outside it are refused. It picks the folder in this order:
COOK_RECIPES_DIR, if set in the server's config. Nothing else is consulted.- The workspace folder your client reports (MCP roots), which is the project you have open.
- The folder the client started the server in.
/, your home folder and agent plugin install folders are ignored, because a plugin's server may be started inside the plugin's own folder.
If nothing usable is left, recipe tools reply that no recipe folder is set and say why. Open your recipe folder in the client, or set
COOK_RECIPES_DIR to an absolute path in the server's config. auth_status shows where the folder came from
(recipe_root_source: env, roots, cwd or unset).
- Claude Code sends its project folder, so there is nothing to configure.
- Codex sends no workspace folder, so set
COOK_RECIPES_DIRas shown under Install. - Cursor and VS Code document support for workspace folders. If recipe tools say no folder is set, set
COOK_RECIPES_DIRin the server's config.
Environment variables
| Variable | Effect |
|---|---|
COOK_RECIPES_DIR | Recipe root. Every path is relative to it. Always wins when set. Default: the workspace folder your client reports, then the folder it starts the server in. |
COOKMD_BASE_URL | cook.md base URL used for login, plan checks and import. Default https://cook.md. |
NUTRITION_API_URL | Nutrition service base URL. Default https://nutrition.cook.md. |
NUTRITION_API_TOKEN | Optional organization API key or pre-made token. When set, login is skipped and this credential is used instead. |
COOK_MCP_AUTH_PATH | Where the login token is stored. Default ~/.config/cook-mcp/auth.json. The old NUTRITION_MCP_AUTH_PATH still works as an alias. |
Free and paid
The server is free and open source. Reading, searching, validating and writing recipes, shopping lists,
the pantry tools, plain report templates and recipe import from a web page or pasted text all work
without an account. Nutrition tools, nutrition reports, and photo and social-media import come with
Cook Basic or Cook Pro. On a free account login
succeeds but those tools return an authorization error. Ingredient matching currently works for English
ingredient names.
Upgrading from nutrition-mcp
@cookmd/nutrition-mcp keeps working: it is now a thin wrapper that runs
@cookmd/mcp. To switch, change the package name in your MCP config to @cookmd/mcp.
Your login carries over.
Two things changed:
- Recipe tools need
COOK_RECIPES_DIR(old configs did not set it), or start the client in your recipe folder. Without either, recipe tools tell the agent that no recipe folder is set. render_reportpaths are now relative to the recipe folder.
Your data
- Runs on your machine. The server is a local process started by your client. Your recipes are read and written in place, and reports render locally.
- Writes are contained. Writes stay inside the recipe folder, every write is validated first, and there is no delete tool.
- Only what a paid tool needs leaves. For nutrition, the ingredient names, amounts, units and preparations from the recipes you point a tool at are sent to
nutrition.cook.md. Photo and social imports send the photo or link to cook.md for conversion. Web page and text import, and everything in the free list, stay local apart from fetching the page itself. Your recipe collection is not uploaded. - Your agent is yours. What your AI client sends to its own model provider is governed by that client, not by this server.
Troubleshooting
- "npx: command not found". Install Node.js (18 or newer) and restart the client so it picks up the new PATH.
- The server won't start on Windows. Windows builds aren't published yet. Use WSL (Linux x86_64) in the meantime.
- "No recipe folder is set". Usually the client sent no workspace roots, or the server was started in
/, your home folder or a plugin folder. SetCOOK_RECIPES_DIRto an absolute path in the server'senv(for Codex,codex mcp add cook --env COOK_RECIPES_DIR=/path/to/recipes -- npx -y @cookmd/mcp), or open your recipe folder in the client. - Two Cook servers, or the plugin's server is skipped. If you installed the plugin and also added the server by hand, remove the manual one (
claude mcp remove cookin Claude Code). - Tools return "unauthorized". Run
auth_status. If you're logged out, runlogin; if you're logged in on a free account, nutrition and photo import need Cook Basic or Pro. - A write is refused. The file failed validation or the path is outside the recipe folder. The deprecated
>>metadata syntax is refused; use YAML frontmatter. density_unavailable. Cups and spoons need a recorded density. Ask for the amount in grams or ounces instead.ingredient_not_found. Trylookup_ingredientto find the canonical name, and check the ingredient is written in English.- Pantry subtraction misses an item. Subtraction only works when units match, so 1 kg in the pantry does not cancel 200 g in a recipe. Use the same unit in both.
- Still stuck? Contact us with your client name and the tool's error text.
Source, issues and releases are on GitHub.