Skip to main content
Glama
mealie-mcp

mealie-mcp

by ni-c

mealie-mcp

CI npm downloads container node license docs

Сервер Model Context Protocol для Mealie, саморазмещаемого менеджера рецептов и планировщика питания.

Он предоставляет модели курируемый обзор экземпляра Mealie: поиск и чтение рецептов с их ингредиентами и шагами, импорт новых с веб-сайта, поддержание порядка в тегах и категориях, планирование приёмов пищи, составление списков покупок на основе этих планов и запись того, что было приготовлено на самом деле.

📖 Полная документация на mealie-mcp.ni-c.de

Демо

REST API Mealie имеет 259 операций на 175 путях. Этот сервер предоставляет 52 инструмента, выбранных так, чтобы типовые задачи решались одним вызовом, а опасная поверхность была недоступна. Проверено на Mealie v3.22.0; источником истины для каждой формы запроса является GET /openapi.json работающего экземпляра, а не опубликованная документация, которая в нескольких местах устарела.

Требования

  • Node.js 22 или новее

  • Экземпляр Mealie и токен API из Настройки → Токены API

Related MCP server: Blender Open MCP

Конфигурация

Переменная

Обязательная

Описание

MEALIE_URL

да

Базовый URL, например https://mealie.example.com

MEALIE_API_TOKEN

да

Токен из Настройки → Токены API. Он действует от имени создавшего его пользователя.

MEALIE_READ_ONLY

нет

Значение true регистрирует только 17 инструментов для чтения

MEALIE_ACCEPT_LANGUAGE

нет

Например de-DE; локализует названия единиц и меток

MEALIE_INSECURE_TLS

нет

Значение true принимает самоподписанный сертификат, ограниченный этим соединением

Два булевых значения сравниваются с литеральной строкой true, поэтому опечатка оставляет их выключенными — проверьте строку запуска в stderr, которая сообщает о действующем режиме.

Токен удаляется из окружения процесса после чтения, поэтому дочерние процессы не могут получить его из /proc/<pid>/environ.

Установка

Claude Desktop или любой MCP-клиент, принимающий 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-mcp

Codex (~/.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 = "…"

Или как контейнер:

docker run --rm -i \
  -e MEALIE_URL=https://mealie.example.com \
  -e MEALIE_API_TOKEN=… \
  ghcr.io/ni-c/mealie-mcp

Чтобы интерактивно опробовать инструменты:

npx @modelcontextprotocol/inspector npx -y @ni-c/mealie-mcp

Инструменты

Рецепты — search_recipes, get_recipe, suggest_recipes, create_recipe, update_recipe, duplicate_recipe, set_recipe_last_made, delete_recipe 🔒

Импорт — preview_recipe_url (пробный запуск, ничего не сохраняет), import_recipe_from_url, import_recipe_from_html_or_json, import_recipe_from_image

Организация — list_organizers, create_organizer, update_organizer, delete_organizer 🔒 — каждый принимает kind: tag | category | tool

Ингредиенты — list_foods, create_food, merge_foods 🔒, list_units, create_unit, merge_units 🔒, parse_ingredients

Планы питания — list_mealplans, get_todays_meals, create_mealplan_entry, create_random_meal, update_mealplan_entry, delete_mealplan_entry 🔒

Покупки — 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

Кулинарные книги — list_cookbooks, get_cookbook, create_cookbook, delete_cookbook 🔒

Заметки и обмен — 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

Экземпляр — get_about

🔒 требует токен подтверждения: вызовите один раз, чтобы получить его, затем снова с ним.

Рецепты можно везде указывать по slug или UUID — Mealie разделяет своё пространство идентификаторов между ними, и инструменты разрешают то, что им передано.

Не предоставлено намеренно

Всё в /api/admin (резервные копии, восстановление, обслуживание, управление пользователями, группами и домохозяйствами, электронная почта, настройки AI-провайдера), /api/users/api-tokens (инструмент, создающий учётные данные API, является поверхностью для повышения привилегий), маршруты аутентификации, CRUD пользователей и пароли, вебхуки, уведомления о событиях и действия с рецептами (все три инициируют исходящий HTTP из экземпляра), правила планов питания, миграции, сидеры, приглашения, массовый экспорт и ZIP-загрузка, а также загрузка ресурсов и изображений.

PUT /api/recipes/{slug} также не предоставлен: он заменяет весь объект рецепта из 33 полей, поэтому частичное обновление через него молча удаляет ингредиенты, шаги и теги. update_recipe использует PATCH.

Безопасность

  • Содержимое экземпляра — это недоверенный ввод. Рецепты регулярно извлекаются с произвольных веб-сайтов, а комментарии поступают от других пользователей, поэтому каждый результат инструмента, который может содержать содержимое экземпляра, предваряется явным маркером, сообщающим модели обрабатывать его как данные. Это важно и после импорта: текст остаётся в базе данных и возвращается через get_recipe.

  • Инструменты импорта заставляют Mealie выполнять запросы, а не этот сервер. URL-адреса ограничены публичными адресами http/https; адреса loopback, частного диапазона, link-local и .lan/.internal/.local отклоняются.

  • Запросы подтверждения не цитируют данные из вышестоящего источника — только идентификаторы, количества и флаги.

  • Ответы ограничены: слишком большие результаты отбрасывают целые элементы, а не обрезают JSON посередине строки, и тело ответа никогда не читается более 8 МБ.

  • Перенаправления отклоняются, чтобы токен не мог быть отправлен другому хосту.

См. SECURITY.md для описания модели доверия и способов сообщения об уязвимости.

Разработка

npm install && npm test && npm run build

scripts/verify-live.mjs проверяет все 52 инструмента на одноразовом экземпляре Mealie; рецепт его настройки приведён в CONTRIBUTING.md.

Диаграмма архитектуры и социальная карточка генерируются из docs/assets/architecture.source.svg и docs/assets/og.json с помощью npm run assets; CI завершается ошибкой, если отрендеренная копия была отредактирована вручную.

Релиз

Всё управляется тегом; ручного шага публикации нет.

  1. Перенесите раздел [Unreleased] из CHANGELOG.md в новую версию и укажите дату. Рабочий процесс релиза извлекает этот раздел с помощью awk, поэтому форма заголовка ## [x.y.z] важна.

  2. Обновите version в package.json.

  3. npm run lint && npm run build && npm run test:coverage.

  4. Зафиксируйте изменения, затем подписанный аннотированный тег:

    git tag -s v0.1.1 -m "v0.1.1"
    git push origin main v0.1.1

Затем release.yml проверяет, что тег соответствует package.json, публикует в npm через Trusted Publishing (OIDC — нет токена npm, который мог бы быть скомпрометирован) с подтверждением происхождения, синхронизирует версию в обе записи пакета server.json, публикует в реестр MCP и создаёт релиз GitHub из раздела журнала изменений. ci.yml параллельно отправляет многоплатформенный образ контейнера в GHCR.

Лицензия

MIT

Available Tools

54 tools
add_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_share_tokenCreate a public share linkA

Creates a link that lets anyone read one recipe without logging in. Requires confirmation: call once to receive a token, then again with that token.

Inputs: recipe (required), expires_at, confirm_token. 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 cookbookA
DestructiveIdempotent

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 entryA
DestructiveIdempotent

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 toolA
DestructiveIdempotent

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 recipeA
DestructiveIdempotent

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 commentA
DestructiveIdempotent

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_share_tokenRevoke a public share linkA
DestructiveIdempotent

Revokes a share link, so the recipe is no longer readable through it. Asks a person first; where the client cannot show a dialog, call once to receive a token and again with it.

Inputs: token_id (required), confirm_token. Returns: truncated, revoked_token_id

delete_shopping_listDelete shopping listA
DestructiveIdempotent

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 itemsA
DestructiveIdempotent

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 instanceA
Read-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 cookbookA
Read-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 recipeA
Read-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 listA
Read-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 mealsA
Read-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 cookbooksA
Read-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 foodsA
Read-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 entriesA
Read-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 toolsA
Read-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 commentsA
Read-onlyIdempotent

Lists the comments other users of the instance left on a recipe.

Inputs: recipe (required). Returns: source, truncated, untrusted

list_recipe_timelineList recipe timelineA
Read-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_share_tokensList recipe share linksA
Read-onlyIdempotent

Lists the public share links that currently exist, with the recipe each one exposes and when it expires. Anyone holding such a link can read the recipe without an account.

Inputs: recipe. Returns: source, truncated, untrusted

list_shopping_listsList shopping listsA
Read-onlyIdempotent

Lists the shopping lists of the household, without their items.

Inputs: page, per_page. Returns: source, truncated, untrusted

list_unitsList unitsA
Read-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 foodsA
DestructiveIdempotent

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 unitsA
DestructiveIdempotent

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 linesA
Read-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 ingredientsA
DestructiveIdempotent

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 URLA
Read-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 recipesA
Read-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 recipesA
Read-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 entryA
DestructiveIdempotent

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 toolA
DestructiveIdempotent

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 recipeA
DestructiveIdempotent

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 itemsA
DestructiveIdempotent

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

    A3.8/5.0

    Scored across 54 tools

    Disambiguation4/5

    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.

    Naming Consistency5/5

    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.

    Tool Count2/5

    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.

    Completeness4/5

    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

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers