TACO Brasil

io.github.ianhudsonai由 GitHub 帳號 ianhudsonai 發布v0.1.1更新於 Oct 30, 2026

Tabela Brasileira de Composição de Alimentos (TACO): 597 foods, nutrients and household measures

已驗證STDIO僅桌面位置與生活資料與分析

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理依 TACO 巴西食物成分表給出精確數值:搜尋 597 種食物、讀取營養素、加總餐食並換算家庭計量。

可以做什麼
  • 依葡萄牙文名稱搜尋食物,忽略重音並辨識部分地區同義詞,回傳 id 與每 100 公克熱量
  • 依 id 讀取單一食物的完整營養成分,可按每 100 公克或依公克數換算,微量與未公布值會標示而非記為零
  • 依公克數或家庭計量加總一組食物的營養素,缺資料時將總量標為下限
  • 依每 100 公克比較 2 至 10 種食物的指定營養素
  • 將巴西家庭計量(如湯匙、單位、片)換算為公克,遇到歧義回傳候選,未涵蓋時直接說明而不猜測
  • 健康檢查,回傳伺服器名稱、版本與資料來源引用
適用情境
適合需要助理以成分表數值而非記憶估算回答巴西食物營養問題的情境:單一食物查詢、依份量換算、整餐加總與食物比較。當湯匙、片等單位需要換算成公克時也有幫助。
執行需求
透過 npx 以 stdio 在本機執行,需要 Node.js 20 或更新版本,可設定於 Claude Desktop、Claude Code、Cursor 等用戶端。未宣告需要帳號、API 金鑰或環境變數。另提供選用 HTTP 模式,供無法連到本機程序的用戶端使用。
安裝前請注意
所有工具皆為唯讀,不索取任何憑證。表中未公布的值會以 null 或微量標記回傳,餐食總量可能是下限,因此不應視為完整資料。家庭計量重量是族群平均值而非特定餐盤實測,且脂肪酸、胺基酸與家庭計量僅涵蓋部分食物。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 TACO Brasil,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

taco-br-mcp

MCP server that lets an AI assistant answer with exact numbers from the TACO — Tabela Brasileira de Composição de Alimentos, 4ª ed. (NEPA/UNICAMP, 2011) — instead of guessing. 597 Brazilian foods, 26 nutrients, per 100 g of edible portion, plus household measures ("2 colheres de sopa", "1 unidade") from the IBGE POF.

Em português: servidor MCP com a Tabela Brasileira de Composição de Alimentos (TACO). Busca alimentos, devolve nutrientes, soma refeições e converte medidas caseiras em gramas. Toda resposta cita a fonte, e o que a tabela não traz vem como "sem dado", nunca como zero.

stdio by default, for Claude Desktop, Claude Code, Cursor and other local MCP clients. It also serves Streamable HTTP (--http), which is how ChatGPT connects: see Remote HTTP and ChatGPT.

Install

Requires Node.js 20 or newer.

Claude Code

bash
claude mcp add taco-br -- npx -y taco-br-mcp

Claude Desktop (claude_desktop_config.json) and Cursor (.cursor/mcp.json)

json
{  "mcpServers": {    "taco-br": { "command": "npx", "args": ["-y", "taco-br-mcp"] }  }}

Then ask, for example: "Quantas kcal tem uma refeição de 4 colheres de sopa de arroz, 100 g de feijão carioca e 100 g de peito de frango grelhado?"

Remote HTTP and ChatGPT

ChatGPT cannot reach a server running on your PC, so the same tools are available over Streamable HTTP:

bash
npx -y taco-br-mcp --http   # http://127.0.0.1:3000/mcp

A public instance runs at https://taco-br-mcp.taco-br-mcp.workers.dev/mcp (open, no login, rate limited; best effort, no uptime promise). The repository also ships a Cloudflare Workers deployment (free plan, open access, per-IP rate limit). Step-by-step deploy and the ChatGPT connector setup (Settings → Apps & Connectors, developer mode, authentication "No authentication") are in docs/remote.md.

Tools

ToolWhat it does
search_foodFind foods by Portuguese name (accent-insensitive, tolerates typos, knows regional names such as aipim/macaxeira/mandioquinha). Returns ids and kcal per 100 g.
get_nutrientsFull composition of one food by id, per 100 g or scaled to a number of grams. Trace (Tr) is {"trace":true} and a value the table does not publish is null, never 0.
get_fatty_acidsFatty acid profile of one food (saturated, mono/polyunsaturated, omega-3 and -6, EPA, DHA, trans, individual acids). Only 423 of 597 foods are in that TACO table; for the others it says available: false, not zero.
get_amino_acidsAmino acid profile of one food (lysine, leucine, tryptophan...). TACO has it for only 26 foods; for any other it says so and lists the 26.
calc_mealSum nutrients over [{food_id, grams}] or [{food_id, household_measure, quantity}]. A total is flagged is_lower_bound (and the foods without data are named) when some item has no data for that nutrient.
compare_foods2 to 10 foods side by side on chosen nutrients, per 100 g. Missing data stays null.
convert_household_measure"2 colheres de sopa" of a food to grams, from the IBGE POF table through a hand-curated mapping (204 foods so far). Ambiguous food names return candidates; uncovered foods or measures are reported, never guessed.
pingHealth check.

All tools are read-only. Every response cites TACO 4ª ed. (NEPA/UNICAMP, 2011).

How it treats missing data

  • Tr (trace, below the quantification limit) is {"trace": true}, never 0.
  • A value the table does not publish is null and shown as "sem dado na TACO", never 0. The source marks these cells in three ways (NA, * for "analyses under re-evaluation", or blank); the processed CSV merges them, so the server does not tell them apart. Whole milk, for example, has no published energy or protein.
  • Fatty and amino acids come from separate TACO tables that cover only part of the foods (423 and 26 of 597). A food outside the table gets available: false, never a row of zeros. In the amino acid table the TACO prints 0,00 for amounts under 0.005 g/100 g; that is a published value (shown as 0 or a small number), not missing data.
  • calc_meal totals are lower bounds when an item lacks data for a nutrient: the response says which foods are missing.
  • Household weights are POF/IBGE averages, not your plate. Only foods and measures whose POF description matches the food were mapped; anything else is reported as not covered.

Mini-evaluation

15 questions about the TACO, answered by claude -p with and without the server, 3 repetitions each (90 runs per model, 30 October 2026), on three models. A numeric answer is correct when it is within 5% of the table value; for the two "honesty" questions it is correct only if it says the TACO does not publish the value (whole milk energy) or that the total is a minimum (fiber of a meal that includes chicken, which has no fiber value).

CategoryHaiku 5.5 without / withSonnet 5.5 without / withOpus 5.5 without / with
Direct lookup12/18 / 18/1816/18 / 18/1818/18 / 18/18
Scaled grams9/9 / 9/99/9 / 9/99/9 / 9/9
Comparison3/3 / 3/33/3 / 3/33/3 / 3/3
Household units3/6 / 6/61/6 / 6/63/6 / 6/6
Whole meal3/3 / 3/30/3 / 3/33/3 / 3/3
Honesty1/6 / 6/63/6 / 6/63/6 / 6/6
Total31/45 / 45/4532/45 / 45/4539/45 / 45/45
Cost of 90 runsUS$ 0.22US$ 3.10US$ 5.78

Reading: with the server all three models got 45/45. Without it they score 31 to 39 out of 45, and the failures differ by model. Haiku gives remembered values that are wrong for single foods (vitamin C in banana prata, iron in cooked lentils), labels them as unverified, and does not flag the fiber total of the meal as a minimum. Sonnet mostly answers "no data" on household measures and meals. Opus remembers most single values and still guesses unit weights (2 boiled eggs). All three, in all 3 runs, answer 61 kcal for whole milk, a value the TACO does not publish. One side effect: Haiku with the server repeated the TACO citation in only 13 of 45 answers (the tool output always carries it); Sonnet and Opus did it in 45 of 45. Limits: 15 questions, 3 repetitions, rule-based scoring (the 5% tolerance accepted one no-MCP Sonnet answer with a wrong rice value that landed near the right sum). Questions, answer key and raw answers are in eval/ (one folder per model); to repeat: npm run build && node eval/run.mjs --model claude-haiku-5-5 && node eval/score.mjs --all --detail.

Development

bash
npm installnpm run buildnpm testnpm run inspect   # MCP Inspector against dist/server.jsnpm run build:data -- --fetch   # regenerate data/ from the pinned upstream CSVs

Never write to stdout (console.log): it is the protocol channel. Use console.error. See AGENTS.md for the project rules.

Data & license

Code: MIT. Nutritional data: TACO 4ª ed., NEPA/UNICAMP (2011). Household-measure weights: Fonte: IBGE, POF 2008-2009, Tabela de Medidas Referidas para os Alimentos Consumidos no Brasil — the grams are IBGE's, unchanged; the mapping between TACO and POF foods was curated by this project, which is responsible for it. See NOTICE.md for sources, processing and pinned versions. If you use this in research, see CITATION.cff. Not medical or nutritional advice.

來源:README.md,提交 46c7295

工具

6

ping

Ping

Health check for the taco-br server. Returns the server name, version and the data source citation.

輸入參數echo

search_food

Search foods in TACO

Find foods in the Brazilian TACO table (597 items, per 100 g) by name in Portuguese. Accent-insensitive; knows a few synonyms (aipim, macaxeira, pão de sal). Returns ids to use with get_nutrients. Restaurant dishes and brands are mostly absent.

輸入參數limitquery必填

get_nutrients

Get nutrients of a food

Full composition of one TACO food by id (from search_food), per 100 g or scaled to a quantity in grams. Missing data is reported as null (not analyzed) or {"trace":true}, never as 0.

輸入參數gramsfood_id必填nutrients

calc_meal

Calculate the nutrients of a meal

Sum nutrients over a list of TACO foods (ids from search_food). Each item has either grams or a household_measure with quantity (e.g. "colher de sopa" x 2, covered foods only; see convert_household_measure). Totals are lower bounds when an item has no data for a nutrient: the response says which. Defaults to energy, protein, fat, carbohydrate, fiber and sodium.

輸入參數items必填nutrients

compare_foods

Compare foods side by side

Compare 2 to 10 TACO foods (ids from search_food) on chosen nutrients, per 100 g of edible portion. Missing data stays null or {"trace":true}; do not rank a food with null as having less.

輸入參數food_ids必填nutrients

convert_household_measure

Convert a household measure to grams

Convert a Brazilian household measure (e.g. 2 colheres de sopa, 1 unidade, 1 fatia) of a TACO food to grams, using the IBGE POF table through a hand-curated mapping. Only some foods are covered; it never guesses: on ambiguity it returns candidates, and for uncovered foods or measures it says so. Pass food_id (from search_food) or food_query.

輸入參數food_idmeasure必填quantityfood_query

版本歷史

1
  1. v0.1.1最新Oct 30, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分