mcp-mealie

🍽️ mcp-mealie

An MCP server for Mealie, built for agents rather than for API coverage.

Release CI Python License: MIT Docs

Forty-three curated tools over recipes, meal plans, shopping lists, cooking history, cookbooks, and library cleanup, with responses trimmed hard enough that a recipe costs a few hundred tokens instead of a few thousand — and sent once, not in the two copies MCP would otherwise put on the wire.

Works with any MCP client that speaks stdio: Claude Code, Claude Desktop, Cursor, Windsurf, Zed.


🚀 Install

No clone or virtualenv needed — uvx builds it straight from the tag.

{
  "command": "uvx",
  "args": [
    "--from",
    "git+https://github.com/mgummich/mcp-mealie@v0.4.0",
    "mcp-mealie"
  ],
  "env": {
    "MEALIE_URL": "https://mealie.example.com",
    "MEALIE_API_TOKEN": "your-token"
  }
}

Create the token in Mealie under Profile → API Tokens.

[!NOTE] Not on PyPI yet, so installs come from git — uvx mcp-mealie on its own will not resolve. Keep the @v0.4.0 pin: without a tag you get whatever main holds the day uv resolves it.

New to this? The howto (docs/HOWTO.md) walks the whole path in order — token, read-only first session, first writes, and the behaviors that surprise people once. Full docs, including the changelog, live at mgummich.github.io/mcp-mealie.

Claude Code

claude mcp add mealie \
  --env MEALIE_URL=https://mealie.example.com \
  --env MEALIE_API_TOKEN=your-token \
  -- uvx --from git+https://github.com/mgummich/mcp-mealie@v0.4.0 mcp-mealie

Claude Desktop, Cursor, Windsurf, Zed

Add the JSON block above under mcpServers in the client’s config file.

From a local clone

Working on the server itself? Point the client at the checkout and every edit lands on the next restart, no push and no reinstall:

claude mcp add mealie -- uv run --directory /path/to/mcp-mealie mcp-mealie

--directory is what makes uv resolve the project from the checkout rather than from the client’s working directory. Credentials can come from the repo’s own .env here, so the --env flags are optional.

Updating

uvx caches the revision it first resolved, so a plain restart keeps running the old one. To move to a newer release, change the tag in the command and drop the cached build:

uv cache clean mcp-mealie    # then restart the MCP client

Restart the client after any config change; it only reads the file at startup. Released versions are listed in the changelog.

⚙️ Configuration

Variable Required Default Purpose
MEALIE_URL ✅ — Base URL of your Mealie instance
MEALIE_API_TOKEN ✅ — Long-lived API token
MEALIE_READ_ONLY — false Hide every write tool
MEALIE_VERIFY_SSL — true Set false for self-signed certs (homelab only)
MEALIE_LOG_LEVEL — INFO Log verbosity, to stderr
MEALIE_MAX_CONCURRENCY — 4 Mealie requests in flight at once, across all tools

Booleans accept 1/true/yes/on and their negations. An unrecognized value is a startup error rather than a silent false.

These can also live in a .env file in the working directory (or any parent) — copy .env.example to .env and fill it in. Real environment variables always take precedence over the file.

[!NOTE] Requires Mealie 2.0 or newer. The server checks at startup and refuses to run against 1.x, which has no /api/households endpoints. CI runs the integration suite against 2.8.0 and 3.25.1 — the oldest release supported and the newest stable one — on every push. Two things are 3.x only: import_recipe_from_images, and the snack, drink, and dessert meal plan entry types. On 2.x Mealie rejects those itself, with its own message.

🧰 Tools

Category Tools
🥘 Recipes search_recipes · get_recipe · suggest_recipes · create_recipe · update_recipe · duplicate_recipe · set_recipe_image · upload_recipe_image · bulk_tag_recipes · delete_recipe · import_recipe_from_url · import_recipe_from_images
📅 Meal plans get_meal_plan · get_todays_meals · add_meal_plan_entry · update_meal_plan_entry · delete_meal_plan_entry · random_meal_plan
🛒 Shopping lists list_shopping_lists · get_shopping_list · create_shopping_list · delete_shopping_list · add_shopping_item · update_shopping_item · delete_shopping_item · add_recipe_to_shopping_list
🍳 Cooking history mark_recipe_made · get_recipe_timeline · get_recipe_rating · rate_recipe · get_recipe_comments · add_recipe_comment · delete_recipe_comment
📚 Cookbooks list_cookbooks · get_cookbook_recipes · create_cookbook · update_cookbook · delete_cookbook
📊 Library reports library_stats · find_duplicate_recipes · check_recipe_links
🔧 Other parse_ingredients · manage_taxonomy

With MEALIE_READ_ONLY=true, seventeen read tools remain.

Once connected, ask in plain language — the agent picks the tools:

💬 What’s for dinner this week?

💬 Import https://example.com/that-curry-recipe and tag it “Weeknight”.

💬 Plan a random week of dinners, no repeats from last week.

💬 I have “scallion” and “spring onion” as separate foods — merge them.

✨ Things it does for you

🛡️ Safety

🎓 Agent skill

The workflows the tool list alone doesn’t teach — planning a week without repeats, filing an imported recipe, writing cookbook filters, cleaning up a library rollup-first — live in mealie-skill, which detects this server and drives it. It builds for Claude Code, Antigravity, Cursor, and AGENTS.md.

This repository no longer ships its own copy: two skills for one server meant two descriptions in every prompt and two places for the same guidance to drift.

🛠️ Development

uv sync --extra dev          # creates .venv from the committed uv.lock
uv run --extra dev pytest    # unit tests, fully offline

CONTRIBUTING.md is the whole developer path — setup, gates, integration tests, adding a tool, which docs to update. docs/ARCHITECTURE.md is the technical truth: module boundaries, the tool-to-Mealie flow, caches, write semantics, and what this deliberately does not expose.

Knuckles-Team/mealie-mcp takes the opposite approach — it generates 247 tools from Mealie’s OpenAPI spec, one per endpoint. Use it if you want complete API coverage. Use this one if you want a small tool list and short responses.

📄 License

MIT