mealie-mcp
mealie-mcp
自己ホスト型のレシピ管理・食事計画ツールである Mealie 向けの Model Context Protocol サーバーです。
このサーバーはモデルに Mealie インスタンスの厳選されたビューを提供します。材料と手順を含むレシピの検索・閲覧、ウェブサイトからの新規レシピのインポート、タグとカテゴリの整理、食事の計画、その計画に基づく買い物リストの作成、実際に調理したものの記録ができます。
📖 完全なドキュメント: mealie-mcp.ni-c.de

Mealie の REST API には 175 パスに 259 の操作があります。このサーバーは、一般的なタスクが1回の呼び出しで完了し、危険な領域には一切到達できないように選ばれた 52個のツール を公開しています。Mealie v3.22.0 で検証済みです。すべてのリクエスト形式の正典は、公開されているドキュメント(数か所が古くなっています)ではなく、稼働中のインスタンスの GET /openapi.json です。
要件
Node.js 22 以上
Mealie インスタンスと Settings → API Tokens から取得した API トークン
Related MCP server: Blender Open MCP
設定
変数 | 必須 | 説明 |
| はい | ベース URL(例: |
| はい | Settings → API Tokens で作成したトークン。作成したユーザーとして動作します。 |
| いいえ | 正確に |
| いいえ | 例: |
| いいえ | 正確に |
この2つのブール値はリテラル文字列 true と比較されるため、タイプミスがあると オフ のままになります。stderr の起動行に実際に有効なモードが報告されるので確認してください。
トークンは読み取られた時点でプロセス環境から削除されるため、子プロセスが /proc/<pid>/environ から取得することはできません。
インストール
Claude Desktop、または JSON 設定を受け取る MCP クライアント:
{
"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 = "…"またはコンテナとして:
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 は識別子空間をこの2つに分割しており、ツールは渡されたほうを解決します。
あえて公開していないもの
/api/admin 配下のすべて(バックアップ、リストア、メンテナンス、ユーザー・グループ・世帯管理、メール、AIプロバイダー設定)、/api/users/api-tokens(API 資格情報を生成するツールは権限昇格の攻撃面になるため)、認証ルート、ユーザー CRUD とパスワード、ウェブフック、イベント通知、レシピアクション(この3つはすべてインスタンスから外部への HTTP をトリガーします)、食事プランのルール、マイグレーション、シーダー、招待、一括エクスポートと ZIP ダウンロード、アセットと画像のアップロード。
PUT /api/recipes/{slug} も公開されません。これは33フィールドのレシピオブジェクト全体を置き換えるため、これを通した部分更新は材料・手順・タグを黙って失わせます。update_recipe は PATCH を使用します。
安全性
インスタンスのコンテンツは信頼できない入力です。 レシピは日常的に任意のウェブサイトからスクレイピングされ、コメントは他のユーザーからもたらされるため、インスタンスのコンテンツを含みうるすべてのツール結果には、それをデータとして扱うようモデルに指示する明示的なマーカーが前置されます。これはインポート後も重要です。テキストはデータベースに残り、
get_recipeで再び返ってくるからです。インポートツールがフェッチを実行するのは、このサーバーではなく Mealie です。 URL はパブリックな
http/httpsアドレスに制限され、ループバック、プライベートレンジ、リンクローカル、.lan/.internal/.localのホストは拒否されます。確認プロンプトは上流のテキストを引用しません — ID、件数、フラグのみです。
レスポンスには上限があります: 過大な結果は JSON を文字列の途中で切るのではなく項目全体を破棄し、レスポンスボディが 8 MB を超えて読み取られることはありません。
リダイレクトは拒否されるため、トークンが別のホストに再送信されることはありません。
信頼モデルと脆弱性の報告方法については SECURITY.md を参照してください。
開発
npm install && npm test && npm run buildscripts/verify-live.mjs は、使い捨ての Mealie インスタンスに対して52個すべてのツールを実行します。セットアップ方法は CONTRIBUTING.md に記載されています。
アーキテクチャ図とソーシャルカードは docs/assets/architecture.source.svg と docs/assets/og.json から npm run assets で生成されます。レンダリング済みのコピーが手で編集されていると CI が失敗します。
リリース
すべてはタグによって駆動され、手動の公開手順はありません。
CHANGELOG.md の
[Unreleased]セクションを新しいバージョンに移動し、日付を入れます。リリースワークフローはそのセクションをawkで抽出するため、## [x.y.z]の見出し形式が重要です。package.jsonのversionを更新します。npm run lint && npm run build && npm run test:coverage.コミットし、署名付きアノテーションタグ を作成します:
git tag -s v0.1.1 -m "v0.1.1"
git push origin main v0.1.1release.yml はタグが package.json と一致することを検証し、Trusted Publishing(OIDC — 漏洩する npm トークンは存在しません)により provenance 付きで npm に公開し、server.json の両方のパッケージエントリにバージョンを同期し、MCP レジストリに公開し、チェンジログのセクションから GitHub リリースを作成します。ci.yml は並行してマルチアーキテクチャのコンテナイメージを GHCR にプッシュします。
ライセンス
MIT
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