I built an MCP server for Chinese fast-food nutrition data — and learned why nobody ships this
说明与用途
构建了一个 MCP 服务器 foodcalorie‑mcp,提供中国快餐的营养数据,解决了缺乏结构化数据源的问题,降低了代理生成虚假卡路里数值的风险。
问题
Agents cannot reliably retrieve nutrition data for Chinese fast‑food chains because the data is scattered across brand mini‑programs, PDFs, and marketing pages in Chinese, with no machine‑readable field for per‑100ml or per‑cup values.
结果
The MCP server provides a reliable, agent‑callable interface to Chinese fast‑food nutrition data, reducing hallucinations and enabling accurate calorie queries.
工作流
- 1. Install the foodcalorie‑mcp package via pip or use the web lookup page.
- 2. Configure the server with a JSON file of brand‑menu data via the FOODCALORIE_EXTRA_DATA environment variable.
- 3. The server merges the free 103 items with the Pro 116 items, yielding 219 records with no ID collisions.
- 4. Agents call the six tools (search_food_by_name, get_daily_nutrition_summary, compare_foods, get_health_advice, browse_by_category, search_food_by_barcode) to retrieve nutrition information.
- 5. The tools expose coverage information and source URLs for each record, allowing audit and verification.
证据
Ask any agent about Western chain food and it does fine: OpenFoodFacts, USDA, MyFitnessPal dumps are everywhere.
I built foodcalorie-mcp — an MCP server that exposes Chinese food and chain-restaurant nutrition as six tools any agent can call.
The free build ships 103 general Chinese food items compiled into the package. Brand-menu data is not in the package — it's a JSON file pointed to by an environment variable.
Every nutrition dataset has holes. The question is whether the vendor tells you where they are.
Pro records include the URL the number came from — brand nutrition pages, official menu PDFs, mini-program screens.
- 记录日期: 2026-11-03T14:28:46.635Z