mealie-mcp
Provides tools to search recipes, retrieve recipe details, manage meal plans, and edit shopping lists on a self-hosted Mealie instance.
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-mcpwhat's on my meal plan for next week?"
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
A Model Context Protocol server that exposes Mealie — a self-hosted recipe manager — as a set of LLM-callable tools. It lets Claude Desktop / Claude Code (or any MCP client) search recipes, create and edit them, manage the meal plan, work with shopping lists, and organize cookbooks on your own Mealie instance.
Tools
Recipes
Tool | Purpose |
| Search recipes; returns slug, name, description, tags, categories |
| Full recipe JSON for a slug |
| Create a recipe fully populated in one call. Lines starting with |
| Patch an existing recipe; only provided fields change |
| Scrape and import a recipe from an external URL |
| Destructive. Permanently delete a recipe |
| Upload a recipe image by downloading it from a URL |
| Upload a base64-encoded image (e.g. AI-generated). Accepts |
Tags, categories, tools
Tool | Purpose |
| List all tags |
| Replace a recipe's tags (auto-creates missing tags; pass |
| List all recipe categories |
| Replace a recipe's categories (auto-creates; pass |
| List all recipe tools/equipment |
| Replace a recipe's tools/equipment (auto-creates; pass |
| List foods/ingredients known to Mealie |
Meal plan
Tool | Purpose |
| Meal plan entries between two ISO dates (inclusive) |
| Today's meal plan entries |
| Add a meal plan entry. |
| Destructive. Delete a meal plan entry |
Shopping lists
Tool | Purpose |
| IDs and names of all shopping lists |
| Create a new shopping list |
| All items in a shopping list |
| Add free-text items to a list |
| Mark a shopping list item checked or unchecked |
| Destructive. Delete a shopping list item |
Cookbooks
Tool | Purpose |
| List all cookbooks in the household |
| Create a new cookbook |
Requirements
Python 3.11+
A running Mealie instance (self-hosted; tested against Mealie v2)
A long-lived Mealie API token (User Profile → API Tokens in the Mealie UI)
(Optional) An OIDC provider such as Authentik if you want to put OAuth in front of the HTTP transports
Configuration
Copy .env.example to .env and fill in the values:
cp .env.example .envCore variables
Variable | Required | Default | Description |
| yes | — | Base URL of your Mealie instance (e.g. |
| yes | — | Long-lived bearer token from Mealie |
| no |
|
|
| no |
| Bind address for HTTP/SSE modes |
| no |
| Bind port for HTTP/SSE modes |
Transport security (HTTP/SSE only)
Variable | Required | Default | Description |
| no | — | Comma-separated extra hostnames allowed for DNS-rebinding protection |
| no | — | Comma-separated extra origins allowed by CORS |
OAuth2 / OIDC (optional, HTTP/SSE only)
The MCP server acts purely as an OAuth-protected resource: it advertises its
authorization server at /.well-known/oauth-protected-resource and validates
incoming Bearer JWTs against that issuer's JWKS. The MCP client (e.g. ChatGPT)
runs the authorization-code + PKCE flow directly with your provider — the MCP
server does not host an /oauth/authorize, /oauth/callback, or /oauth/token
endpoint.
Variable | Required | Default | Description |
| no | — | Application-specific issuer URL, e.g. |
| no | — | OAuth client ID from your provider. |
| no | — | Optional. Leave blank for Public/PKCE clients (recommended for ChatGPT). |
| no | — | Public URL of this MCP server including |
OAuth is enabled when OAUTH_ISSUER_URL, OAUTH_CLIENT_ID, and
OAUTH_SERVER_URL are all set. With OAuth enabled, requests to /mcp,
/sse, and /messages without a valid Bearer JWT receive 401 plus a
WWW-Authenticate: Bearer resource_metadata="…" challenge that triggers the
MCP client's discovery flow.
Authentik recipe
Create an OAuth2/OpenID Provider in Authentik.
Set the Client type to Public. This is what causes Authentik's discovery doc to advertise
noneintoken_endpoint_auth_methods_supported, which ChatGPT requires for PKCE.Add the redirect URI shown by your MCP client (ChatGPT's custom-connector setup screen will display one) to Redirect URIs / Origins.
Bind the provider to an Application; the Application slug becomes the last path segment of
OAUTH_ISSUER_URL, e.g.https://auth.example.com/application/o/<app-slug>/.Copy the Client ID into
OAUTH_CLIENT_ID(and into ChatGPT's connector form). LeaveOAUTH_CLIENT_SECRETblank.
To verify before pointing ChatGPT at it:
curl https://<your-mcp>/.well-known/oauth-protected-resource
# expect: {"resource":"<OAUTH_SERVER_URL>","authorization_servers":["<OAUTH_ISSUER_URL>"]}
curl <OAUTH_ISSUER_URL>/.well-known/openid-configuration | jq '.issuer, .token_endpoint_auth_methods_supported'
# expect: issuer matches OAUTH_ISSUER_URL exactly, and "none" is in the methods list.If issuer doesn't match OAUTH_ISSUER_URL, you've used the wrong URL (most
likely the bare host instead of the app-specific path). If none is missing,
your Authentik provider is still set to Confidential — change it to Public.
Install & run locally
pip install -e .
# stdio mode (for Claude Desktop):
MCP_TRANSPORT=stdio mealie-mcp
# sse mode (for docker-compose / remote clients):
MCP_TRANSPORT=sse MCP_PORT=8000 mealie-mcp
# streamable-http mode:
MCP_TRANSPORT=streamable-http MCP_PORT=8000 mealie-mcpThe SSE endpoint is served at http://<host>:<port>/sse. A simple health
check is available at http://<host>:<port>/health and reports whether OAuth
is enabled.
Claude Desktop configuration
Edit Claude Desktop's config file (macOS:
~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"mealie": {
"command": "mealie-mcp",
"env": {
"MEALIE_URL": "http://localhost:9011",
"MEALIE_API_TOKEN": "paste-your-token-here",
"MCP_TRANSPORT": "stdio"
}
}
}
}If mealie-mcp is not on your PATH, point command at the full binary path
(e.g. /Users/you/.venvs/mealie-mcp/bin/mealie-mcp) or invoke via Python:
{
"mcpServers": {
"mealie": {
"command": "python",
"args": ["-m", "mealie_mcp"],
"env": {
"MEALIE_URL": "http://localhost:9011",
"MEALIE_API_TOKEN": "paste-your-token-here",
"MCP_TRANSPORT": "stdio"
}
}
}
}Restart Claude Desktop after editing the config.
Docker / docker-compose
A Dockerfile is included. To run standalone:
docker build -t mealie-mcp .
docker run --rm -p 8765:8000 \
-e MEALIE_URL=http://host.docker.internal:9011 \
-e MEALIE_API_TOKEN=your-token \
mealie-mcpTo add the server to an existing Mealie stack, see
docker-compose.snippet.yml:
services:
mealie-mcp:
build:
context: ./mealie-mcp
depends_on:
- mealie
environment:
MEALIE_URL: "http://mealie:9000"
MEALIE_API_TOKEN: "${MEALIE_API_TOKEN}"
MCP_TRANSPORT: "sse"
MCP_HOST: "0.0.0.0"
MCP_PORT: "8000"
ports:
- "8765:8000"Point your MCP client at http://<docker-host>:8765/sse.
Testing the server manually
With the server running in HTTP/SSE mode, confirm it is reachable:
curl -s http://localhost:8000/health
# {"status":"ok","oauth_enabled":false}
curl -N http://localhost:8000/sseThe first command returns a small JSON status; the second opens an SSE event stream. For stdio mode, Claude Desktop handles the handshake — there is no HTTP endpoint.
Project layout
mealie-mcp/
├── pyproject.toml
├── Dockerfile
├── docker-compose.snippet.yml
├── .env.example
├── README.md
└── src/mealie_mcp/
├── __init__.py
├── __main__.py # CLI entry point (loads .env, dispatches transport)
├── server.py # FastMCP server + tool definitions + Bearer auth middleware
├── auth.py # OAuth2/OIDC token validation against issuer JWKS
└── client.py # Async httpx wrapper for the Mealie REST APILicense
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/eds3028/mealie-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server