Skip to main content
Glama
alessmar

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: Nextcloud Cookbook MCP Server

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).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the disclosure burden. It communicates read-only aggregation by saying 'Return' and discloses the count categories, but it does not mention data freshness, permission requirements, or whether counts are scoped globally or per user. For a zero-parameter stats tool this is adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, front-loaded with the verb and resource, and includes the essential output categories without filler. Every element earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a no-input aggregation tool with an output schema available, the description is complete: it identifies the operation, the collections involved, and the shape of the result. No additional invocation details are needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool accepts no parameters, so there is no parameter burden for the description to carry. The baseline of 4 applies because there is nothing for the agent to configure.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific operation ('Return collection counts') and enumerates the exact count families returned (recipe_count, menu_count, pantry_* counts). This clearly distinguishes it from sibling recipe CRUD/search tools, which operate on recipe records rather than aggregate counts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or alternative-routing guidance, but the description implies the tool is for aggregate counts rather than listing/searching recipes. An agent can infer that if it needs count summaries, this is the tool; if it needs individual records, list_recipes or search_recipes would be used.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete_recipeA

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

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full behavioral burden. It clearly discloses that deletion is permanent, with no undo and no trash, which is essential for an agent deciding whether to invoke a destructive operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences deliver the action and the critical warning with no wasted words. The permanence warning is front-loaded right after the verb phrase.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter destructive tool with an output schema, the description covers the key safety-relevant behavior: permanent deletion with no recovery. It could add expected error cases or prerequisites, but given the simplicity, it is largely complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides only the property name 'path' with type string and 0% description coverage. The description clarifies that the path refers to a recipe file, adding some meaning, but it does not explain path format, relative vs absolute paths, or accepted file extensions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('delete'), a specific resource ('recipe file'), and the permanence of the operation. It is clearly distinguished from siblings like write_recipe and read_recipe by naming the destructive action directly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The intended use is implied: call this tool when you want to permanently remove a recipe file. However, it does not explicitly state when not to use it or mention alternatives, leaving some room for inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the disclosure burden. It adds meaningful behavioral detail by explaining that every node has children/name/path/recipe and that recipe is null for directories and non-null for files. It also conveys recursive comprehensiveness with 'full recipe tree.' Read-only behavior is implied by 'Return,' though not explicitly stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences with no filler. The first sentence front-loads the purpose, and the second adds essential node-structure semantics. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter listing tool with an output schema, the description is complete: it states the scope, the file types, and the meaning of the recipe field per node. An agent has enough to call the tool and interpret its result correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so there is no parameter semantics for the description to explain. The empty input schema is fully covered, and the baseline of 4 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Return the full recipe tree' including folders and .cook/.menu files. This distinguishes it from siblings like read_recipe (single recipe), search_recipes (filtered lookup), and collection_stats (aggregate statistics), so an agent can select it for complete listing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly implies this is for retrieving the entire recipe hierarchy, but it does not explicitly state when to prefer it over alternatives or when not to use it. There is no mention of sibling tools, so the usage context is implied rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
scaleNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the behavioral disclosure burden. It discloses that the recipe is parsed into four component types and that scale multiplies quantities during parsing. This explains meaningful behavior beyond the schema, though it does not cover error cases or file-resolution behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded: one high-value purpose sentence followed by two terse parameter definitions. Every sentence contributes practical information, and the example path adds clarity without bloat.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a simple two-parameter read operation with an output schema available, so the description does not need to restate return values. It covers what path means, how scaling works, and what parsing produces, giving an agent enough context to call the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must fully document parameters. It explains path as relative to the recipe directory with a concrete example and notes the optional .cook extension, and it defines scale as a multiplication factor for quantities. Both parameters are meaningfully documented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Read one recipe parsed into ingredients, cookware, timers and steps.' This clearly identifies what the tool does and differentiates it from list_recipes and read_recipe_source, since it promises parsed, structured output for a single recipe.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is implied through wording such as 'one recipe' and 'parsed,' but the description does not explicitly state when to prefer this tool over read_recipe_source or other siblings. It gives no exclusions or alternative routing guidance, leaving some inference to the agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_recipe_sourceB

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

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries the full burden. It clarifies the output includes frontmatter, which is useful, but it does not address error behavior, path resolution, or the read-only nature. For a simple read operation this is adequate, but gaps remain.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no redundant words. Every element—'raw', 'source text', 'frontmatter included'—carries meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The output schema covers return values, so that is not a gap. However, the description lacks path semantics and usage differentiation from read_recipe. For a one-parameter tool it is mostly complete, but an agent would benefit from knowing where 'path' comes from and when to choose the raw variant.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the description never mentions the 'path' parameter. The agent must infer that 'path' identifies a recipe from context, but no format, relative/absolute nature, or relationship to list_recipes is documented, so the description does not compensate for the schema gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action ('Return the raw Cooklang source text') and resource ('of a recipe'), with the scope detail 'frontmatter included.' This clearly distinguishes it from sibling read_recipe, which is implicitly about a parsed or processed view, by emphasizing raw source.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit guidance about when to use this tool instead of read_recipe or other siblings. The word 'raw' implies a use case, but no alternatives, exclusions, or context are mentioned, leaving the agent to infer selection criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_recipesA

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

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses the core behavior: full-text search over names and content, and the shape of the response (name + path). It does not disclose nuances like case sensitivity, sorting, pagination, or whether the operation is read-only, but the word 'search' strongly implies non-destructive behavior. Adequate but minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two short sentences with no filler. The primary action and scope are front-loaded, and the return info is stated in a second concise sentence. Every word earns its place, making it highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so the description does not need to explain return value structure in depth, and it does provide the key return fields. However, for a search tool, an agent might benefit from knowing about result limits, ordering, or whether the query searches plain text or supports operators. The description is sufficient for a simple tool but leaves these contextual details unspecified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It indicates the 'query' parameter is a full-text search term applied to recipe names and content, which gives general meaning to the parameter. However, it does not specify query format, matching rules, or whether partial matches are supported, leaving the parameter semantics only partially defined.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('search') and resource ('recipe names and content'), and clarifies it returns 'name + path'. This clearly differentiates it from siblings like list_recipes (which lists) and read_recipe (which reads a single recipe). The scope is precise and agent-actionable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use this tool: when a full-text search over recipe names and content is needed. However, it does not explicitly state when to prefer it over list_recipes or read_recipe, nor does it mention any exclusions or alternative conditions. Usage context is present but only by inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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).

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
sourceYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It surfaces the destructive overwrite behavior, the automatic extension handling, the parent-folder prerequisite, and the atomic write guarantee (temp file + rename). This is meaningful transparency beyond a simple 'write' statement, though it does not mention permissions or failure modes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three concise sentences. The purpose is front-loaded, followed only by high-value behavioral details. Every sentence earns its place, and there is no redundant or generic filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter write tool with an output schema, the description covers the essential call-time needs: purpose, parameter semantics, prerequisites, edge-case handling, and atomicity. It is not missing any critical information needed to invoke the tool correctly. It could only be improved by explicit alternative routing or error conditions, but those are secondary.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explicitly documents that `source` is raw Cooklang text, and it gives behavioral details about `path`: the parent folder must already exist and a missing .cook extension is added automatically. This meaningfully exceeds the bare schema, even if path resolution details are not fully spelled out.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action and resource: 'Create or overwrite a recipe.' This clearly distinguishes the tool from sibling read/list/search/delete tools, even without naming them. The verb-plus-object construction leaves no ambiguity about what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear usage context by defining the tool as the create/overwrite operation, which is implicitly contrasted with the read/delete/search siblings. It also provides practical invocation guidance: the parent folder must exist, and a missing .cook extension is added automatically. It does not explicitly state exclusions or alternative tools, but the context is strong.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 7 tool updatesv0.1.0
    • First observedcollection_stats
    • First observeddelete_recipe
    • First observedlist_recipes
    • First observedread_recipe
    • First observedread_recipe_source
    • First observedsearch_recipes
    • First observedwrite_recipe

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

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers