Mealie MCP
Mealie MCP
An MCP server that exposes a self-hosted Mealie instance to MCP clients like Claude — recipes, meal plans, shopping lists, and organizers (categories/tags).
What it does
Recipes — list/search, get details, create, import from a URL, update, delete
Meal Plans — get today's meals, list a date range, create/delete entries, add a random recipe
Shopping Lists — list, get, create, delete, add a recipe's ingredients, add a single item, check off items
Organizers — list categories and tags
Utilities — get a recipe's nutrition info
Project layout
src/mealiemcp/
├── app.py # FastMCP instance + auth setup
├── config.py # environment variable loading
├── client.py # Mealie HTTP client factory
├── security.py # input validation (slug/id allowlists, SSRF guard)
├── audit.py # logs which tool was called, by whom, and when
├── recipes.py ┐
├── meal_plans.py ├─ tool modules, one per Mealie domain
├── shopping_lists.py │
├── organizers.py ┘
└── server.py # registers tool modules, entry point (main())
tests/ # unit tests (pytest)Setup
Requires uv.
uv sync
cp .env.example .env # fill in your Mealie URL and API token
uv run mealiemcpRun the tests with:
uv run pytestEnvironment variables (see src/mealiemcp/config.py for details):
Variable | Purpose |
| URL of your Mealie instance |
| Mealie API token this server uses to call Mealie |
|
|
| Bind address/port when using |
| Bearer token remote clients must present — required when |
|
|
A Dockerfile is included for running in streamable-http mode behind a reverse proxy.
Auth model
This is designed for a single user running their own instance, not a multi-tenant service. Remote access is a single shared bearer token (MCP_AUTH_TOKEN) rather than full OAuth — proportionate for one person's personal Mealie server. To limit the blast radius of a leaked token:
It has a hard expiry (
MCP_AUTH_TOKEN_EXPIRES_AT) and must be rotated periodicallyEvery tool call is logged (tool name, authenticated client, success/failure, duration) via
audit.py, so a misused token leaves a trace
License and disclaimer
This project is free to use, for any purpose, with no warranty of any kind. The author assumes no liability for any use of this software or any consequences arising from it — you use it entirely at your own risk. See the LICENSE file for the full terms.
This entire codebase was generated by AI. It has only been tested through the author's personal use against their own Mealie instance and has not been independently audited or reviewed. Review the code yourself before relying on it, especially before exposing it to a network.
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/scottmilliquet/mealiemcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server