Mealie MCP Server
Provides tools for managing recipes, meal plans, shopping lists, and more through the Mealie self-hosted recipe management API, with security-conscious mutation controls and support for recipe import, OCR, and Chefkoch lookup.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Mealie MCP Serverfind me recipes using chicken and rice"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Mealie MCP Server
A security-conscious Model Context Protocol server for self-hosted Mealie instances.
It exposes recipe search and import, shopping lists, meal plans, organizers, ingredient parsing, OCR helpers, recipe images/assets, Chefkoch lookup, and a guarded bridge to non-sensitive Mealie OpenAPI operations.
Community project. Not affiliated with or endorsed by Mealie.
Security defaults
Read-only by default: mutations require
MEALIE_MCP_ALLOW_MUTATIONS=true.Fail-closed scopes: no write is allowed unless its path matches an explicit scope.
Explicit confirmation: every helper that persists data and every generic write requires
confirmed_by_user=true.Sensitive API denylist: admin, authentication, user, group, invitation, webhook, and household self-service endpoints remain blocked even when mutations are enabled.
Outbound fetches off by default: URL imports and remote file sources require separate opt-in flags in addition to mutation scopes.
SSRF protection: enabled remote sources must resolve to public HTTP(S) addresses; loopback, private, link-local, and other non-public destinations are rejected.
Local-file confinement: multipart uploads may only read from the MCP data directory or explicitly configured local roots.
Credential redaction: configured tokens and passwords are removed from reported errors.
Bounded work: JSON/OpenAPI responses, local/remote sources, downloads, image pixels, pagination, and OCR runtime have limits.
Transport safety: remote Mealie origins require HTTPS, and authenticated Mealie requests reject redirects.
Review SECURITY.md before enabling writes.
Related MCP server: Mealie MCP Server
Requirements
Python 3.11+
A reachable Mealie instance (tested against Mealie OpenAPI v3.21.0)
A Mealie long-lived API token, recommended
Optional: Tesseract for OCR (
tesseract-ocrplus the desired language packs)
Quick start
git clone https://github.com/bitmonster/mealie-mcp-server.git
cd mealie-mcp-server
uv sync --frozen
chmod +x run_mealie_mcp.shCreate a long-lived token in Mealie under Profile → API tokens. Pass it through your MCP client environment; do not put it in source control.
Hermes Agent
mcp_servers:
mealie:
command: /absolute/path/to/mealie-mcp-server/run_mealie_mcp.sh
env:
MEALIE_BASE_URL: http://localhost:9000
MEALIE_PUBLIC_URL: https://mealie.example.com
MEALIE_API_TOKEN: "[REDACTED]"
MEALIE_MCP_ALLOW_MUTATIONS: "false"
MEALIE_MCP_MUTATION_SCOPE: none
MEALIE_MCP_ALLOW_URL_IMPORTS: "false"
MEALIE_MCP_ALLOW_REMOTE_SOURCES: "false"Restart Hermes after changing MCP configuration, then run:
hermes mcp test mealieGeneric stdio MCP client
Configure the command as:
/absolute/path/to/mealie-mcp-server/run_mealie_mcp.shSet the environment variables shown in .env.example. The server reserves stdout for MCP JSON-RPC and writes startup errors to stderr.
Authentication
Preferred:
MEALIE_API_TOKEN=[REDACTED]Optional fallback for local testing:
MEALIE_USERNAME=[REDACTED]
MEALIE_PASSWORD=[REDACTED]The fallback performs a normal /api/auth/token login and caches the short-lived token in memory. Do not embed credentials in the repository or starter script.
Mutation scopes
Mutations require both:
MEALIE_MCP_ALLOW_MUTATIONS=true
MEALIE_MCP_MUTATION_SCOPE=<comma-separated scopes>Scope | Allowed write areas |
| Recipe creation/PATCH, images, assets, duplicate, last-made, ZIP/image/URL imports |
| Shopping lists, items, bulk operations, recipe ingredients added to lists |
| Meal-plan entries, random suggestions, and meal-plan rules |
| Generic parser API mutations; the dedicated non-persisting ingredient parser does not require mutation mode |
| Categories, tags, foods, and units |
| Household cookbooks |
| Recipe comments |
| Recipe timeline events and images |
| Household recipe actions |
| Every non-sensitive mutation; use only for tightly trusted clients |
Example for recipe imports and organizer cleanup:
MEALIE_MCP_ALLOW_MUTATIONS=true
MEALIE_MCP_MUTATION_SCOPE=recipe_import,organizersScopes do not override the sensitive-endpoint denylist or confirmation requirements.
URL imports additionally require MEALIE_MCP_ALLOW_URL_IMPORTS=true. Remote image or asset sources additionally require MEALIE_MCP_ALLOW_REMOTE_SOURCES=true.
Main capabilities
The server currently registers 38 MCP tools, including:
recipe search, lookup, suggestions, URL/text imports, duplication, last-made updates;
image replacement, source asset upload, cover cropping, and cookbook-image OCR;
shopping-list and meal-plan CRUD helpers using Mealie v3 full-model updates;
organizer listing and ingredient parsing;
Chefkoch search and recipe extraction;
live OpenAPI catalog search;
generic JSON/multipart requests and controlled binary downloads for non-sensitive operations.
Use mealie_api_operations before a generic OpenAPI call. It validates operation IDs, path/query parameters, required body fields, content type, sensitivity, confirmation, and mutation scope.
File and download configuration
Variable | Default | Purpose |
|
| Runtime data root |
|
| Controlled download directory |
| empty | Additional local upload roots, separated by the OS path separator |
| 100 MiB | Maximum binary download size |
| 10 MiB | Maximum JSON response size |
| 20 MiB | Maximum OpenAPI response size |
| 40,000,000 | Maximum decoded image pixels |
| 60 seconds | Tesseract timeout per OCR call |
| 30 seconds | HTTP timeout |
|
| Allow Mealie to fetch validated public recipe URLs |
|
| Allow this MCP process to fetch validated public file URLs |
Default local upload roots are $DATA_DIR/imports and the download directory. Add the narrowest possible absolute path when another client-managed media cache is needed.
Development
uv sync --frozen --all-groups
uv run python -m compileall -q mealie_server.py tests
uv run ruff check mealie_server.py tests
uv run python -m unittest discover -s tests -p 'test_*.py' -v
uv run pip-audit --skip-editableThe regression suite mocks network and filesystem boundaries. It covers mutation gating, confirmation, sensitive-path blocking, OpenAPI validation, SSRF/local-file confinement, multipart limits, Mealie v3 request shapes, ingredient preservation, and credential-safe status output.
Known boundaries
This is a stdio MCP server, not a remotely exposed HTTP service.
Mealie streaming/SSE import operations are intentionally unsupported.
Generic operations follow the live Mealie OpenAPI, but dedicated helper tools may need adaptation after breaking Mealie API changes.
Raw API paths are fail-closed unless they match a live OpenAPI operation; sensitive path prefixes and OpenAPI tags remain denied.
Public-address validation reduces SSRF risk but cannot enforce the network behavior of Mealie itself. When enabling URL imports or remote sources, also restrict container/host egress and DNS at the deployment layer.
Chefkoch integration is optional functionality supplied through the
get-chefkochdependency.OCR quality depends on the local Tesseract installation and source image quality.
License
MIT — see LICENSE.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityBmaintenanceMCP server for Mealie that exposes its REST API to manage recipes, meal plans, shopping lists, cookbooks, and taxonomy through natural language.75MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server for managing recipes, meal plans, shopping lists, and more through a self-hosted Mealie instance.1MIT
- AlicenseNot gradedqualityAmaintenanceA MCP server for Mealie recipe management. Exposes 43 tools and 1 prompt for AI assistants to search, create, and manage recipes, meal plans, shopping lists, categories, and tags.916MIT
- AlicenseBqualityDmaintenanceMCP server for meal planning and grocery list generation, enabling recipe storage, meal plan creation, and automated grocery lists with ignored ingredients.82MIT
Related MCP Connectors
An MCP server for Arcjet - the runtime security platform that ships with your AI code.
Recipes MCP — wraps TheMealDB API (free tier, no auth)
A MCP server built for developers enabling Git based project management with project and personal…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/bitmonster/mealie-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server