mealie-mcp
mealie-mcp
Un servidor del Model Context Protocol para Mealie, el gestor de recetas y planificador de comidas autoalojado.
Proporciona a un modelo una vista depurada de una instancia de Mealie: buscar y leer recetas con sus ingredientes y pasos, importar nuevas desde un sitio web, mantener organizadas las etiquetas y categorías, planificar comidas, crear listas de la compra a partir de esos planes y registrar lo que realmente se cocinó.
📖 Documentación completa en mealie-mcp.ni-c.de

La API REST de Mealie tiene 259 operaciones distribuidas en 175 rutas. Este servidor expone 52 herramientas, elegidas de modo que las tareas comunes se realicen con una sola llamada y la superficie peligrosa sea inalcanzable. Verificado con Mealie v3.22.0; la fuente de verdad para cada forma de petición es el GET /openapi.json de una instancia en ejecución, no la documentación publicada, que está desactualizada en varios puntos.
Requisitos
Node.js 22 o superior
Una instancia de Mealie y un token de API desde Ajustes → Tokens de API
Related MCP server: Blender Open MCP
Configuración
Variable | Obligatoria | Descripción |
| sí | URL base, p. ej. |
| sí | Token desde Ajustes → Tokens de API. Actúa como el usuario que lo creó. |
| no | Exactamente |
| no | p. ej. |
| no | Exactamente |
Las dos booleanas se comparan con la cadena literal true, por lo que un error tipográfico las deja desactivadas — verifique la línea de inicio en stderr, que informa el modo en vigor.
El token se elimina del entorno del proceso una vez leído, por lo que los procesos hijo no pueden capturarlo de /proc/<pid>/environ.
Instalación
Claude Desktop, o cualquier cliente MCP que acepte una configuración JSON:
{
"mcpServers": {
"mealie": {
"command": "npx",
"args": ["-y", "@ni-c/mealie-mcp"],
"env": {
"MEALIE_URL": "https://mealie.example.com",
"MEALIE_API_TOKEN": "…"
}
}
}
}claude mcp add mealie \
-e MEALIE_URL=https://mealie.example.com \
-e MEALIE_API_TOKEN=… \
-- npx -y @ni-c/mealie-mcpCodex (~/.codex/config.toml):
[mcp_servers.mealie]
command = "npx"
args = ["-y", "@ni-c/mealie-mcp"]
[mcp_servers.mealie.env]
MEALIE_URL = "https://mealie.example.com"
MEALIE_API_TOKEN = "…"O como contenedor:
docker run --rm -i \
-e MEALIE_URL=https://mealie.example.com \
-e MEALIE_API_TOKEN=… \
ghcr.io/ni-c/mealie-mcpPara probar las herramientas de forma interactiva:
npx @modelcontextprotocol/inspector npx -y @ni-c/mealie-mcpHerramientas
Recetas — search_recipes, get_recipe, suggest_recipes, create_recipe,
update_recipe, duplicate_recipe, set_recipe_last_made, delete_recipe 🔒
Importación — preview_recipe_url (prueba en seco, no guarda nada), import_recipe_from_url,
import_recipe_from_html_or_json, import_recipe_from_image
Organización — list_organizers, create_organizer, update_organizer,
delete_organizer 🔒 — cada uno acepta kind: tag | category | tool
Ingredientes — list_foods, create_food, merge_foods 🔒, list_units,
create_unit, merge_units 🔒, parse_ingredients
Planificación de comidas — list_mealplans, get_todays_meals, create_mealplan_entry,
create_random_meal, update_mealplan_entry, delete_mealplan_entry 🔒
Compras — list_shopping_lists, get_shopping_list, create_shopping_list,
delete_shopping_list 🔒, add_shopping_list_items, update_shopping_list_items,
delete_shopping_list_items 🔒, add_recipe_to_shopping_list,
remove_recipe_from_shopping_list
Libros de recetas — list_cookbooks, get_cookbook, create_cookbook,
delete_cookbook 🔒
Notas y uso compartido — set_recipe_rating, add_recipe_comment,
delete_recipe_comment 🔒, list_recipe_comments, list_recipe_timeline,
create_timeline_event, list_share_tokens, create_share_token 🔒,
delete_share_token
Instancia — get_about
🔒 necesita un token de confirmación: llame una vez para recibirlo, luego otra vez con él.
Las recetas se pueden direccionar por slug o por UUID en cualquier lugar — Mealie divide su espacio de identificadores entre ambos, y las herramientas resuelven el que reciben.
No expuestas, a propósito
Todo lo que está en /api/admin (copias de seguridad, restauración, mantenimiento, gestión de usuarios, grupos y hogares, correo electrónico, ajustes de proveedor de IA), /api/users/api-tokens (una herramienta que genera credenciales de API es superficie de escalada de privilegios), las rutas de autenticación, CRUD de usuarios y contraseñas, webhooks, notificaciones de eventos y acciones de recetas (todas disparan HTTP saliente desde la instancia), reglas de planificación de comidas, migraciones, sembradores, invitaciones, exportación masiva y descarga ZIP, y carga de activos e imágenes.
Tampoco se expone PUT /api/recipes/{slug}: reemplaza el objeto de receta completo de 33 campos, por lo que una actualización parcial a través de él elimina silenciosamente ingredientes, pasos y etiquetas. update_recipe usa PATCH.
Seguridad
El contenido de la instancia es entrada no confiable. Las recetas suelen extraerse de sitios web arbitrarios y los comentarios provienen de otros usuarios, por lo que cada resultado de herramienta que pueda contener contenido de la instancia va prefijado con un marcador explícito que indica al modelo que lo trate como datos. Esto importa también después de la importación: el texto permanece en la base de datos y regresa a través de
get_recipe.Las herramientas de importación hacen que Mealie obtenga la URL, no este servidor. Las URLs están restringidas a direcciones
http/httpspúblicas; se rechazan hosts de bucle local, rango privado, enlace local y.lan/.internal/.local.Los mensajes de confirmación no citan texto de origen — solo identificadores, conteos y banderas.
Las respuestas están acotadas: los resultados sobredimensionados descartan elementos completos en lugar de cortar el JSON a medias, y el cuerpo de una respuesta nunca se lee más allá de 8 MB.
Se rechazan las redirecciones para que el token no pueda reenviarse a otro host.
Consulte SECURITY.md para conocer el modelo de confianza y cómo informar una vulnerabilidad.
Desarrollo
npm install && npm test && npm run buildscripts/verify-live.mjs prueba las 52 herramientas contra una instancia desechable de Mealie; la receta para configurar una está en CONTRIBUTING.md.
El diagrama de arquitectura y la tarjeta social se renderizan desde
docs/assets/architecture.source.svg y docs/assets/og.json mediante
npm run assets; CI falla si se editó manualmente una copia renderizada.
Publicación de versiones
Todo se maneja mediante una etiqueta; no hay paso de publicación manual.
Mueva la sección
[Unreleased]de CHANGELOG.md a la nueva versión y póngale fecha. El flujo de trabajo de publicación extrae esa sección conawk, por lo que la forma del encabezado## [x.y.z]es importante.Actualice
versionenpackage.json.npm run lint && npm run build && npm run test:coverage.Confirme, luego una etiqueta firmada y anotada:
git tag -s v0.1.1 -m "v0.1.1" git push origin main v0.1.1
release.yml verifica entonces que la etiqueta coincida con package.json, publica en npm mediante Trusted Publishing (OIDC — no existe un token npm que pueda filtrarse) con procedencia, sincroniza la versión en ambas entradas del paquete server.json, publica en el registro MCP y crea la versión de GitHub a partir de la sección del changelog. ci.yml envía la imagen de contenedor multiarquitectura a GHCR en paralelo.
Available Tools
54 toolsadd_recipe_commentComment on a recipeA
Adds a comment to a recipe. Comments are visible to everyone in the group and are attributed to the user the API token belongs to.
Inputs: text (required), recipe (required). Returns: source, truncated, untrusted
add_recipe_to_shopping_listAdd a recipe to a shopping listA
Adds a recipe's ingredients to a shopping list, merging them with what is already there. Mealie remembers the recipe on the list, so remove_recipe_from_shopping_list can take exactly these ingredients back off again.
Inputs: recipe (required), list_id (required), servings_multiplier. Returns: source, truncated, untrusted
add_shopping_list_itemsAdd items to a shopping listA
Adds items to a shopping list as free text ("2 tbsp olive oil"). Mealie does not split these into food and unit automatically — run parse_ingredients first if that matters.
Inputs: items (required), list_id (required). Returns: source, truncated, untrusted
create_cookbookCreate cookbookA
Creates a cookbook — a named, saved view of the recipe collection. Without a filter it matches every recipe; the filter itself is written in Mealie's own query language and is easiest to build in the web UI. A private cookbook is created straight away; is_public requires confirmation, because it is a publishing step.
Inputs: name (required), is_public, description, query_filter, +1 more. Returns: source, truncated, untrusted
create_foodCreate foodB
Adds a food to the group vocabulary so ingredient lines can be matched against it.
Inputs: name (required), label_id, description, plural_name. Returns: source, truncated, untrusted
create_mealplan_entryAdd to the meal planA
Puts a recipe or a free-text note on the meal plan for one day. Give either a recipe or a title, not both — Mealie stores a plan entry as one or the other.
Inputs: date (required), entry_type (required), text, title, +1 more. Returns: source, truncated, untrusted
create_organizerCreate a tag, category or toolA
Creates a tag, category or recipe tool. Assigning one to a recipe with update_recipe already creates it on the fly — this tool is for defining one up front.
Inputs: kind (required), name (required). Returns: source, truncated, untrusted
create_random_mealAdd a random mealA
Lets Mealie pick a recipe for a day and slot, honouring the meal plan rules configured in the household.
Inputs: date (required), entry_type (required). Returns: source, truncated, untrusted
create_recipeCreate recipeB
Creates a recipe from the given fields. To add one from a website use import_recipe_from_url instead — it fills in far more.
Inputs: name (required), tags, notes, servings, +9 more. Returns: source, truncated, untrusted
create_shopping_listCreate shopping listA
Creates an empty shopping list in the household.
Inputs: name (required). Returns: source, truncated, untrusted
create_timeline_eventAdd a timeline entryA
Adds an entry to a recipe's timeline — typically a note about having cooked it and how it turned out. Pair it with set_recipe_last_made, which is what the recipe view sorts on.
Inputs: recipe (required), subject (required), message, timestamp. Returns: source, truncated, untrusted
create_unitCreate unitB
Adds a measurement unit to the group vocabulary.
Inputs: name (required), fraction, description, plural_name, +2 more. Returns: source, truncated, untrusted
delete_cookbookDelete cookbookADestructiveIdempotent
Deletes a cookbook. The recipes it matched are not touched — a cookbook is only a saved filter. Requires confirmation: call once to receive a token, then again with that token.
Inputs: cookbook_id (required), confirm_token. Returns: truncated, deleted_cookbook_id
delete_mealplan_entryRemove a meal plan entryADestructiveIdempotent
Removes one entry from the meal plan. The recipe itself is not touched. Requires confirmation: call once to receive a token, then again with that token.
Inputs: entry_id (required), confirm_token. Returns: truncated, removed_entry_id
delete_organizerDelete a tag, category or toolADestructiveIdempotent
Deletes a tag, category or tool. The recipes themselves are kept, but they lose the assignment. Requires confirmation: call once to receive a token, then again with that token.
Inputs: id (required), kind (required), confirm_token. Returns: deleted, truncated, deleted_id
delete_recipeDelete recipeADestructiveIdempotent
Deletes a recipe permanently, together with its comments, timeline and images. Requires confirmation: call once to receive a token, then again with that token.
Inputs: recipe (required), confirm_token. Returns: truncated, deleted_recipe_id
delete_recipe_commentDelete a recipe commentADestructiveIdempotent
Deletes a comment. Requires confirmation: call once to receive a token, then again with that token.
Inputs: comment_id (required), confirm_token. Returns: truncated, deleted_comment_id
delete_shopping_listDelete shopping listADestructiveIdempotent
Deletes a shopping list and everything on it. Requires confirmation: call once to receive a token, then again with that token.
Inputs: list_id (required), confirm_token. Returns: truncated, deleted_list_id
delete_shopping_list_itemsRemove shopping list itemsADestructiveIdempotent
Removes items from a shopping list for good. To merely tick something off, use update_shopping_list_items with checked=true. Requires confirmation: call once to receive a token, then again with that token.
Inputs: item_ids (required), confirm_token. Returns: truncated, removed_count, removed_item_ids
duplicate_recipeDuplicate recipeA
Creates a copy of a recipe under a new name, leaving the original untouched. Useful as a starting point for a variation.
Inputs: recipe (required), name. Returns: source, truncated, untrusted
get_aboutAbout this Mealie instanceARead-onlyIdempotent
Reports the Mealie version and the identity the API token acts as: user, group, household and the permission flags that decide which write tools will actually succeed. Start here when a call fails with a 403.
Inputs: no named parameters. Returns: truncated
get_cookbookGet cookbookARead-onlyIdempotent
Fetches a cookbook and the recipes it currently matches. Accepts the slug or the UUID.
Inputs: cookbook (required), per_page. Returns: source, truncated, untrusted
get_recipeGet recipeARead-onlyIdempotent
Fetches one recipe with everything needed to cook it: ingredients, steps, times, yield, notes and nutrition. Accepts the slug or the UUID.
Inputs: recipe (required), detail. Returns: source, truncated, untrusted
get_shopping_listGet shopping listARead-onlyIdempotent
Fetches one shopping list with all of its items, checked and unchecked.
Inputs: list_id (required), include_checked. Returns: source, truncated, untrusted
get_todays_mealsGet today's mealsARead-onlyIdempotent
Returns the recipes planned for today, as Mealie computes "today" for the household. Answers with a bare list, not a paginated envelope.
Inputs: no named parameters. Returns: source, truncated, untrusted
import_recipe_from_html_or_jsonImport recipe from HTML or JSONA
Creates a recipe from HTML or schema.org recipe JSON supplied directly, so Mealie does not fetch the page. Useful for a page that needs a login, or one that import_recipe_from_url could not parse.
It does not fetch the page, but it is not fetch-free: Mealie reads the image address out of the document and retrieves that. Every such address this server can find is checked before the document is handed over, and an internal one is refused — but a document can hide an address in ways a scan does not see, so do not paste one from a source you would not let Mealie make a request for.
Inputs: data (required). Returns: source, truncated, untrusted
import_recipe_from_imageImport recipe from imageA
Creates a recipe from a photo of one — a cookbook page, a handwritten card — by having Mealie run it through its configured AI provider. Requires an AI provider set up in Mealie; without one the call fails, and the setting itself is only visible to a group manager or admin.
Inputs: format (required), image_base64 (required), translate_language. Returns: source, truncated, untrusted
import_recipe_from_urlImport recipe from URLA
Has Mealie fetch a recipe page and save it as a new recipe. The fetch happens on the Mealie server, not here. Everything the page contains — name, description, ingredients, steps — ends up in the collection as written by whoever controls that site.
Inputs: url (required), include_tags, include_categories. Returns: source, truncated, untrusted
list_cookbooksList cookbooksARead-onlyIdempotent
Lists the cookbooks of the household. A cookbook is a saved filter over the recipe collection, not a fixed set of recipes.
Inputs: page, per_page. Returns: source, truncated, untrusted
list_foodsList foodsARead-onlyIdempotent
Lists the structured foods of the group — the ingredient vocabulary Mealie matches ingredient lines against. Many instances leave this empty and keep ingredients as plain text; an empty result means exactly that, not a failure.
Inputs: page, search, per_page, order_direction. Returns: source, truncated, untrusted
list_mealplansList meal plan entriesARead-onlyIdempotent
Lists the meal plan of the household in a date range. Each entry is either a recipe reference or a free-text note.
Inputs: page, end_date, per_page, start_date. Returns: source, truncated, untrusted
list_organizersList tags, categories or toolsARead-onlyIdempotent
Lists the tags, categories or tools defined in the group, with their ids and slugs. These are the values search_recipes filters on.
Inputs: kind (required), page, search, per_page, +1 more. Returns: source, truncated, untrusted
list_recipe_commentsList recipe commentsARead-onlyIdempotent
Lists the comments other users of the instance left on a recipe.
Inputs: recipe (required). Returns: source, truncated, untrusted
list_recipe_timelineList recipe timelineARead-onlyIdempotent
Lists the timeline of a recipe: when it was created, updated and each time it was cooked, with the notes attached to those events.
Inputs: recipe (required), page, per_page. Returns: source, truncated, untrusted
list_shopping_listsList shopping listsARead-onlyIdempotent
Lists the shopping lists of the household, without their items.
Inputs: page, per_page. Returns: source, truncated, untrusted
list_unitsList unitsARead-onlyIdempotent
Lists the measurement units of the group, with their abbreviations. Like foods, this is empty on an instance that never seeded them.
Inputs: page, search, per_page, order_direction. Returns: source, truncated, untrusted
merge_foodsMerge foodsADestructiveIdempotent
Points every ingredient that uses one food at another one and deletes the source food. Requires confirmation: call once to receive a token, then again with that token.
Inputs: to_id (required), from_id (required), confirm_token. Returns: source, truncated, untrusted
merge_unitsMerge unitsADestructiveIdempotent
Points every ingredient that uses one unit at another one and deletes the source unit. Requires confirmation: call once to receive a token, then again with that token.
Inputs: to_id (required), from_id (required), confirm_token. Returns: source, truncated, untrusted
parse_ingredientsParse ingredient linesARead-onlyIdempotent
Splits free-text ingredient lines into quantity, unit, food and note, and reports how confident Mealie is about each part. Nothing is saved. Use it to check how a line will be understood before writing it to a recipe or a shopping list.
Inputs: ingredients (required), parser. Returns: source, truncated, untrusted
parse_recipe_ingredientsParse recipe ingredientsADestructiveIdempotent
Structures a recipe's unparsed ingredient lines in place: Mealie's parser splits each line into quantity, unit, food and note, and the lines whose food and unit exist in Mealie and whose confidence is high enough are written back. Lines that already have a food are left alone. Everything else comes back under needs_decision with the reason — ask the user there, then create the food with create_food and run this again, or pass the existing food they chose in overrides. Runs as a dry run unless dry_run is false; writing requires confirmation: call once to receive a token, then again with that token. Find recipes to work through with search_recipes unparsed_only.
Inputs: recipe (required), parser, dry_run, overrides, +2 more. Returns: source, truncated, untrusted
preview_recipe_urlPreview a recipe URLARead-onlyIdempotent
Fetches a URL and reports what Mealie would extract from it, WITHOUT saving anything. Use this to check a page before importing it, or to find out why an import came out empty.
Inputs: url (required). Returns: source, truncated, untrusted
remove_recipe_from_shopping_listRemove a recipe from a shopping listA
Takes a recipe's ingredients back off a shopping list. Items that were also needed by another recipe on the list stay, with their quantity reduced.
Inputs: recipe (required), list_id (required), servings_multiplier. Returns: source, truncated, untrusted
search_recipesSearch recipesARead-onlyIdempotent
Searches the recipe collection. Returns summaries — name, slug, id, times, rating, tags and categories — without ingredients or steps; use get_recipe for those. search, the organizer filters and the date range combine with AND; within one filter the entries are OR unless the matching require_all_* flag is set. cookbook is the exception: Mealie applies a cookbook instead of the tag, category, tool and food filters, so combining them is rejected here rather than silently ignored.
Inputs: page, tags, foods, tools, +11 more. Returns: source, truncated, untrusted
set_recipe_imageSet recipe imageA
Replaces a recipe's cover image.
Inputs: format (required), recipe (required), image_base64 (required). Returns: recipe, truncated, image_version
set_recipe_last_madeSet last madeA
Records when a recipe was last cooked. Mealie shows this on the recipe and sorts by it.
Inputs: recipe (required), timestamp (required). Returns: recipe, last_made, truncated
set_recipe_ratingRate a recipeA
Sets the personal rating of a recipe and/or marks it as a favourite. Ratings in Mealie are per user, not per recipe.
Inputs: recipe (required), rating, is_favorite. Returns: source, truncated, untrusted
suggest_recipesSuggest recipesARead-onlyIdempotent
Suggests recipes that can be cooked from the foods and tools marked as "on hand" in Mealie, ranked by how little is missing. This only produces anything on an instance that actually maintains structured foods, units and an on-hand pantry — on a collection of plain text ingredients it returns nothing. Use search_recipes there.
Inputs: foods, limit, tools, max_missing_foods, +1 more. Returns: source, truncated, untrusted
update_mealplan_entryChange a meal plan entryADestructiveIdempotent
Moves an entry to another day or slot, or replaces the recipe behind it. Replacing the written title or note of an entry requires confirmation: call once to receive a token, then again with that token. Moving the entry or swapping the recipe does not.
Inputs: entry_id (required), date, text, title, +3 more. Returns: source, truncated, untrusted
update_organizerRename a tag, category or toolADestructiveIdempotent
Renames a tag, category or tool. Mealie regenerates the slug from the new name, so anything referring to the old slug stops matching. Requires confirmation: call once to receive a token, then again with that token.
Inputs: id (required), kind (required), name (required), confirm_token. Returns: source, truncated, untrusted
update_recipeUpdate recipeADestructiveIdempotent
Changes individual fields of a recipe. Only the fields given are touched; everything else keeps its value. Passing an empty array for ingredients, instructions, tags or categories clears that list. Replacing written content — name, description, ingredients, instructions, tags, categories or notes — requires confirmation: call once to receive a token, then again with that token. Changing only times, servings, yield or the source link does not.
Inputs: recipe (required), name, tags, notes, +11 more. Returns: source, truncated, untrusted
update_shopping_list_itemsTick off or change shopping list itemsADestructiveIdempotent
Changes items on a shopping list — most often ticking them off. Only the given fields are changed; the rest of each item is preserved. Ticking off and changing quantities is immediate; replacing the text of the items with note requires confirmation, because that text is overwritten on every item named and Mealie keeps no copy.
Inputs: list_id (required), item_ids (required), note, checked, +2 more. Returns: source, truncated, untrusted
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 54 tools
Most tools target a distinct resource+action and the descriptions carefully delimit overlaps, e.g. search_recipes vs get_recipe, and the three import_recipe_from_* variants. The main ambiguity is parse_recipe_ingredients (writes back to a recipe) vs parse_ingredients (dry-run only), plus mild overlap between set_recipe_last_made and create_timeline_event, but the descriptions disambiguate these adequately.
Nearly every tool follows a clean verb_noun snake_case pattern (get_recipe, create_mealplan_entry, delete_shopping_list_items, merge_foods). The few oddities like get_about or get_todays_meals still fit the same convention. No mixing of camelCase or vague verbs.
54 tools is well above the 25+ threshold for 'too many'. While the domain (recipes, organizers, foods, units, meal plans, shopping lists, cookbooks, share tokens, comments, timeline, imports) is genuinely broad, the surface is heavy enough to strain selection and could be consolidated.
Coverage is strong: full lifecycle for recipes, meal plan entries, shopping lists, cookbooks, share tokens, comments and organizers, plus imports, images, ratings and parsing. Minor gaps exist around foods/units, which have create and merge but no update or delete, though merge largely covers consolidation.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA versatile Model Context Protocol server that enables AI assistants to manage calendars, track tasks, handle emails, search the web, and control smart home devices.23MIT
- AlicenseNot gradedqualityCmaintenanceA server that integrates Blender with local AI models via the Model Context Protocol, allowing users to control Blender using natural language prompts for 3D modeling tasks.125MIT
- AlicenseNot gradedqualityDmaintenanceA server that implements the Model Context Protocol, providing a standardized way to connect AI models to different data sources and tools.12MIT
- AlicenseNot gradedqualityAmaintenanceA Model Context Protocol (MCP) server implementation that enables AI assistants to interact with Anytype's API through natural language, allowing users to manage their knowledge base through conversation.2,040 npm551MIT