Mealie MCP Server
Mealie MCP 服务器
面向社区的 Mealie 模型上下文协议 (MCP) 服务器。
它通过可流式传输的 HTTP 或 stdio 将 Mealie 的食谱、膳食计划、购物清单、食品、单位、标签、类别和食谱工具暴露给 MCP 客户端。
功能
食谱搜索、创建、修补 (patch)、更新、复制、URL/HTML/ZIP/图像导入、资产、图像、时间线事件、评论、导出、建议和最近制作更新
家庭膳食计划条目、今日膳食、随机膳食条目和膳食计划规则
Mealie v3 家庭购物清单、购物项目 CRUD、批量项目更改、食谱到清单操作和标签设置
食品和单位主数据,包括别名、复数名称、重复食品合并和重复单位合并
标签、类别、食谱工具/用具、食谱书、评论、共享链接、解析器、媒体、用户、组、家庭、探索端点和管理端点
Docker 优先部署,带有健康检查端点和非 root 容器用户
Related MCP server: Mealie MCP Server
要求
Mealie v3.x
Mealie API 令牌
Docker、Docker Compose 或 Python 3.12+
支持可流式传输 HTTP 或 stdio 的 MCP 客户端
Docker 快速入门
docker run -d \
--name mealie-mcp \
--restart unless-stopped \
-p 8080:8080 \
--add-host=host.docker.internal:host-gateway \
-e MEALIE_BASE_URL=http://your-mealie-instance:9000 \
-e MEALIE_API_TOKEN=your-mealie-api-token \
ghcr.io/nikopol666/mealie-mcp:latest健康检查:
curl http://localhost:8080/healthMCP 端点:
http://localhost:8080/mcpDocker Compose
复制示例环境文件,填入您的 Mealie URL 和 API 令牌,然后启动服务:
cp .env.example .env
docker compose up -d有关默认的单服务示例,请参阅 docker-compose.yml。
有关连接到现有 Mealie Docker 网络,请参阅 docker-compose.integration.yml。
services:
mealie-mcp:
image: ghcr.io/nikopol666/mealie-mcp:latest
restart: unless-stopped
ports:
- "${MCP_HTTP_PORT:-8080}:8080"
environment:
MEALIE_BASE_URL: ${MEALIE_BASE_URL:?Set MEALIE_BASE_URL in .env}
MEALIE_API_TOKEN: ${MEALIE_API_TOKEN:?Set MEALIE_API_TOKEN in .env}配置
将 .env.example 复制到 .env 并填入您的 Mealie URL 和 API 令牌。
变量 | 必需 | 默认值 | 描述 |
| 是 | 无 | Mealie API 的基础 URL。对于主机上的 Mealie 服务,请使用 |
| 是 | 无 | 用户个人资料设置中的 Mealie API 令牌。 |
| 否 |
| 示例 Docker Compose 文件使用的主机端口。 |
| 否 |
| 向 MCP 客户端通告的显示名称。 |
| 否 |
| 可流式传输 HTTP 的主机/接口。 |
| 否 |
| 内部服务器端口。 |
| 否 |
| Python 日志级别。 |
| 否 |
| Mealie API 请求超时时间(秒)。 |
| 否 |
| 瞬态 GET 失败和启动检查的重试次数。 |
MCP 客户端设置
可流式传输 HTTP
当您的客户端支持可流式传输 HTTP 时,请使用此端点:
http://localhost:8080/mcp在同一个 Docker 网络内:
http://mealie-mcp:8080/mcpStdio
对于将 MCP 服务器作为本地进程启动的客户端:
git clone https://github.com/nikopol666/mealie-mcp.git
cd mealie-mcp
python -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
export MEALIE_BASE_URL=http://localhost:9000
export MEALIE_API_TOKEN=your-mealie-api-token
python src/main.py --transport stdio工具覆盖范围
请参阅 docs/TOOL_REFERENCE.md 获取完整的工具列表和有效负载说明。
高级分组:
健康检查
食谱
膳食计划
购物清单
食品和单位
标签、类别和食谱工具
食谱书、评论、共享链接、解析器、媒体、用户、组、家庭、探索和管理工具
开发
git clone https://github.com/nikopol666/mealie-mcp.git
cd mealie-mcp
python -m venv .venv
. .venv/bin/activate
pip install -r requirements-dev.txt
PYTHONPATH=src MEALIE_API_TOKEN=test-token pytest -q针对真实 Mealie 实例的可选只读冒烟测试:
export MEALIE_LIVE_SMOKE=1
export MEALIE_BASE_URL=http://localhost:9000
export MEALIE_API_TOKEN=your-mealie-api-token
PYTHONPATH=src pytest tests/test_live_smoke.py -q使用可流式传输 HTTP 运行:
export MEALIE_BASE_URL=http://localhost:9000
export MEALIE_API_TOKEN=your-mealie-api-token
python src/main.py --transport streamable-http构建 Docker 镜像:
docker build -t mealie-mcp:local .文档
安全说明
将
MEALIE_API_TOKEN视为机密信息。仅在受信任的网络上或在身份验证后运行容器。
MCP 服务器可以使用配置的 Mealie 令牌权限创建、更新和删除 Mealie 数据。
尽可能为此服务使用专用的 Mealie API 令牌。 请参阅 SECURITY.md 获取披露和部署指南。
兼容性
本项目针对当前的 Mealie v3 API。Mealie 随着时间的推移在组和家庭范围之间移动了一些资源;如果工具在 Mealie 升级后失败,请将失败的端点与您实例的 /openapi.json 进行比较。
许可证
MIT
This server cannot be installed
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
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to interact with Mealie recipe databases through MCP clients like Claude Desktop.123MIT
- AlicenseNot gradedqualityCmaintenanceConnects MCP clients like Claude to your Mealie recipe manager, enabling natural language search, creation, import, and updates of recipes.91MIT
- AlicenseDqualityAmaintenanceExposes every endpoint of the Mealie REST API as MCP tools, enabling LLMs to manage recipes, meal plans, shopping lists, and more.1001,6212MIT
- AlicenseNot gradedqualityAmaintenanceA read-only MCP server for Mealie that enables searching recipes, managing shopping lists, meal plans, and retrieving household/instance info via tools. Supports secure per-user authentication and multiple Mealie instances.MIT
Related MCP Connectors
Recipes MCP — wraps TheMealDB API (free tier, no auth)
Translate MCP — wraps LibreTranslate API (https://libretranslate.com/)
API Ninjas MCP — wraps the multi-endpoint API Ninjas data API (api-ninjas.com)
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/nikopol666/mealie-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server