Skip to main content
Glama
ollieInstantOffr

FoodGen

FoodGen

一个 MCP 服务器,将晚餐请求转换为购物清单 + 食谱,呈现在移动端友好的页面上——可直接保存到 Apple Notater。

“3 人份晚餐(2 个大人和 1 个孩子),足球训练前要快,不要鱼。”

Claude 找到菜品,调用 create_dinner_plan,然后返回一个类似 https://foodgen.instantoffr.com/n/Hxe7gVY_YYqRi2CCeZnV5g 的链接。在手机上:

  • 购物清单按商店部门分组,可在商店中勾选(状态保存在设备上)

  • 食谱,下面包含食材和步骤

  • “添加到 Notater” → 共享表单 → Notater 将所有内容保存为一条带项目符号列表的笔记

  • …/n/<id>.txt 返回纯文本,…/n/<id>.json 返回原始数据

架构

  • Node 24 + Express,通过 Streamable HTTP/mcp 上提供 MCP(无状态——没有会话,一切存储在 SQLite 中)

  • SQLitenode:sqlite,无原生依赖)位于 Docker 卷中

  • 模型编写食谱;服务器进行验证(zod)、保存并发布

  • 方案 URL 是 128 位随机数——不可猜测、不被索引;这就是全部访问控制

MCP 接口

create_dinner_plan

保存完整方案,返回链接

search / fetch

ChatGPT 连接器契约(搜索 + 查找)

get_dinner_plan

读回一个方案(id 或 URL)

list_recent_dinner_plans

最近的方案,最新的在前

delete_dinner_plan

永久删除一个方案

prompt /middag

“晚餐给……”快捷方式

Related MCP server: Recipe Research MCP Server

运行

cp .env.example .env      # sjekk PUBLIC_URL
docker compose up -d --build

TLS 和代理由 Nginx Proxy Manager 处理,它已在运行并配置到端口 2400。在代理主机上有一件事值得检查:MCP 响应以 SSE 流式传输,因此缓冲和 60 秒读取超时可能会切断流。请开启 Websockets Support,并可将其添加到 Advanced 选项卡中:

location /mcp {
    proxy_pass http://$server:$port;
    proxy_http_version 1.1;
    proxy_set_header Host $host;
    proxy_set_header Connection "";
    proxy_buffering off;
    proxy_cache off;
    proxy_read_timeout 3600s;
}

不使用 Docker 的本地开发:

PUBLIC_URL=http://localhost:2400 npm run dev

连接到 Claude 和 ChatGPT

  • Claude 应用 / claude.ai / Cowork:Settings → Connectors → Add custom connector → https://foodgen.instantoffr.com/mcp(无身份验证)

  • Claude Codeclaude mcp add --transport http foodgen https://foodgen.instantoffr.com/mcp

  • ChatGPT:Settings → Connectors → 在相同地址下添加自定义 MCP 连接器,无需身份验证。服务器按照 OpenAI 契约暴露 search/fetch,因此它像普通连接器一样工作(在已保存的晚餐中搜索/查找,以及 deep research);开启 Developer mode 后,ChatGPT 也可以使用 create_dinner_plan 创建新的晚餐。

https://foodgen.instantoffr.com 的首页显示相同的说明。

测试

docker compose up -d --build   # eller npm start
node test/e2e.mjs              # full MCP + HTTP-runde, 26 sjekker

环境变量

变量

默认值

PUBLIC_URL

https://foodgen.instantoffr.com

公共源;链接由它构建

PORT

2400

容器内的 HTTP 端口

BIND_ADDR

0.0.0.0

compose 在哪里发布端口

DB_PATH

/app/data/foodgen.db

SQLite 文件(卷)

RETENTION_DAYS

0

删除超过 N 天的方案(0 = 永不)

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables recipe search, storage, and meal planning using TheMealDB API. Provides comprehensive recipe discovery, automatic recipe collection management, and custom meal plan creation with detailed cooking instructions and ingredients.
    1
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact with Mealie for recipe management, meal planning, and shopping list operations. Supports searching and managing recipes, creating meal plans, and generating shopping lists from recipes or meal plans.
    7
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI assistants to interact with local Apple Calendar, Notes, and Contacts on macOS. Provides tools for creating, reading, updating, and deleting events, notes, and contacts through natural language.
    MIT