Skip to main content
Glama
cooklang-mcp-server

cooklang-mcp-server

by alessmar

cooklang-mcp-server

MCP Version Python License: MIT

A small FastMCP server that exposes the CookCLI recipe server (cook server, as shipped in ghcr.io/cooklang/cookcli) to a coding agent as MCP tools. With it, an agent can browse, read, write, delete and search Cooklang recipes over the CookCLI HTTP API.

Do you need this?

Use this server when the recipes are reached over HTTP: a cook server running on another machine or on a NAS, or an MCP client such as Claude Desktop that has no shell access.

If your recipes are local files and the agent can run commands (Claude Code, Codex), the official cooklang-skills plugin is the better fit. It drives the cook CLI directly and covers more ground: meal planning, pantry tracking, aisle-grouped shopping lists, exports.

Related MCP server: mealie-mcp

How it works

Each MCP tool maps 1:1 to a CookCLI HTTP endpoint (read_recipe -> GET /api/recipes/{path}, and so on). This server is a stateless adapter: it holds no data, does no parsing, and requires a separate cook server process to be running (see Requirements). All recipes live in CookCLI's recipe directory.

Tools

Tool

Maps to

Purpose

list_recipes()

GET /api/recipes

Full recipe tree (folders + .cook / .menu files)

read_recipe(path, scale=1.0)

GET /api/recipes/{path}

One recipe parsed into ingredients, cookware, timers, steps

read_recipe_source(path)

GET /api/recipes/raw/{path}

Raw Cooklang source, frontmatter included

write_recipe(path, source)

PUT /api/recipes/{path}

Create or overwrite a recipe from raw Cooklang text

delete_recipe(path)

DELETE /api/recipes/{path}

Permanently delete a recipe file (no undo, no trash)

search_recipes(query)

GET /api/search?q=

Full-text search over recipe names and content

collection_stats()

GET /api/stats

Collection counts (recipe_count, menu_count, pantry counts)

path is relative to the CookCLI server's recipe directory, e.g. Dolci/bunet-piemontese (the .cook extension is optional). write_recipe requires the parent folder to already exist and writes atomically (temp file + rename). Title images are not writable over HTTP: drop them next to the .cook file in the recipe directory (or Docker volume).

Requirements

  • Python >= 3.10 and uv

  • A running CookCLI server, e.g.:

    docker run -d --name cooklang-cookcli-1 -p 9080:9080 \
      -v cooklang_recipes:/recipes \
      ghcr.io/cooklang/cookcli server --host 0.0.0.0 /recipes

    or, with CookCLI installed locally, cook server ./my-recipes.

Register with Claude Code

No clone needed. uvx fetches, builds and caches the server straight from this repo:

claude mcp add cooklang \
  --env COOKLANG_SERVER_URL=http://localhost:9080 \
  -- uvx --from git+https://github.com/alessmar/cooklang-mcp-server cooklang-mcp-server

Or in .mcp.json / ~/.claude.json:

{
  "mcpServers": {
    "cooklang": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/alessmar/cooklang-mcp-server",
               "cooklang-mcp-server"],
      "env": { "COOKLANG_SERVER_URL": "http://localhost:9080" }
    }
  }
}

COOKLANG_SERVER_URL defaults to http://localhost:9080. Pin a version by appending @<tag> to the git URL, e.g. ...cooklang-mcp-server@v0.1.0.

Local development

git clone https://github.com/alessmar/cooklang-mcp-server
cd cooklang-mcp-server
uv sync
COOKLANG_SERVER_URL=http://localhost:9080 uv run cooklang-mcp-server

Notes

  • The CookCLI server has no auth and open CORS: keep it on localhost or a trusted LAN.

  • /api/reload is a no-op on current CookCLI: the server reads from disk on every request, so file changes made outside the API are picked up immediately.

License

MIT. See LICENSE.

Available Tools

7 tools
collection_statsA

Return collection counts (recipe_count, menu_count, pantry_* counts).

Inputs: no named parameters. Returns: object

delete_recipeA

Permanently delete a recipe file. There is no undo and no trash.

Inputs: path (required). Returns: object

list_recipesA

Return the full recipe tree: folders and .cook / .menu files.

Every node has children, name, path, recipe. recipe is null for a directory and non-null for a file.

Inputs: no named parameters. Returns: object

read_recipeA

Read one recipe parsed into ingredients, cookware, timers and steps.

path: recipe path relative to the recipe directory, e.g. "Dolci/bunet-piemontese" (the .cook extension is optional). scale: multiply quantities by this factor during parsing.

Inputs: path (required), scale. Returns: object

read_recipe_sourceB

Return the raw Cooklang source text of a recipe, frontmatter included.

Inputs: path (required). Returns: result

search_recipesA

Full-text search over recipe names and content. Returns name + path.

Inputs: query (required). Returns: result

write_recipeA

Create or overwrite a recipe. source is raw Cooklang text.

The parent folder must already exist. A missing .cook extension is added automatically. Writes are atomic (temp file + rename).

Inputs: path (required), source (required). Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool targets a clearly distinct operation: listing the tree, reading parsed recipes, reading raw source, writing, deleting, searching, and getting stats. The only potentially similar pair, read_recipe and read_recipe_source, is disambiguated by the parsed-versus-raw distinction.

    Naming Consistency4/5

    Most tools follow a consistent verb_noun snake_case pattern: list_recipes, read_recipe, read_recipe_source, write_recipe, delete_recipe, search_recipes. collection_stats is the one outlier since it lacks a verb, but it remains readable and stylistically compatible.

    Tool Count5/5

    Seven tools is well-scoped for a recipe management server. Each tool covers a meaningful part of the workflow without redundancy or unnecessary bloat.

    Completeness4/5

    The core recipe lifecycle is covered: discover, read, write, delete, and search. Minor gaps exist such as no folder creation tool and no dedicated menu management, but these do not block the primary recipe workflow.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    • Recipe search, ingredient matching, nutrition filters and a private cookbook for any AI agent.

      https://mcp.ask.recipes/mcp
    • Scraps Kitchen gives any AI agent a persistent, household-aware kitchen memory. Unlike generic chatbot recall, Scraps maintains structured cooking data: what's in your fridge (with freshness tracking), who you cook for (with allergens, dietary restrictions, and preferences), your recipe collection (with cook notes and per-diner ratings), your shopping list, and your kitchen equipment. 27 tools across 6 domains let agents read kitchen context, suggest meals that respect dietary safety, update the pantry after cooking, and build a history of what works for your household. Every interaction makes the data richer. Cooking history, preference signals, kitchen awareness = better suggestions next time. All tools work via oAuth and a free scraps.kitchen account.

      https://api.scraps.kitchen/mcp
    • Your Recipes, Beautifully Kept. weReci MCP server lets Claude and other MCP clients work with your personal weReci cookbook, the recipes you've imported from the web, social video and scanned family books. Interactive UI in the chat. weReci supports MCP Apps, so in clients that support it, tools return live views instead of plain text: recipe cards, shopping lists and your recipe graph. Clients without MCP Apps support get the same results as text. Find and read recipes: search your collection in plain language, open any recipe in full, or get an overview of what's in your cookbook. Cook with them: scale a recipe to any serving count, with cooking adjustments as well as amounts. Get substitution suggestions with ratios and caveats. Explore connections: browse your recipe graph (shared ingredients, techniques and cuisines), trace the connection between two recipes, and look up where a dish sits on the cuisine map. Themed collections: list the themed groups weReci curates from your cookbook, or ask it to reshuffle them. Shop: build a shopping list from one or more recipes, add or update items, and read the list back. Share: email a recipe to someone. Longer jobs like conceit reshuffles run in the background, with tools to check their progress. Everything is scoped to your own cookbook, or to a shared one you've joined.

      https://wereci.xyz/api/mcp
    • Search, read, download and report on tested step-by-step recipes (playbooks) for AI agents.

      https://botgathering.com/mcp

    Related MCP Servers