USDA FoodData Central API Guide for MCP and Claude

How the USDA FoodData Central API works, and how the fmcg.network MCP wraps find_food, get_composition, and get_label_panel for Claude and other AI clients.

The FoodData Central API is the public HTTP interface to USDA FoodData Central, the US federal food composition register. It lives at api.nal.usda.gov/fdc/v1 behind the api.data.gov gateway. Search returns candidate foods with register fdcId values; detail endpoints return nutrient profiles and, for Branded records, manufacturer label panels.

fmcg.network is a client of that public API. It is not an FDA partner, not a USDA partner, and not a substitute for reading the official USDA FoodData Central API guide. The MCP wrap exposes three tools so Claude and other AI assistants can call the register without you wiring HTTP, keys, and response shaping by hand.

Install the connector at Install fmcg.network, then open US Nutrient Composition Lookup for schemas and usage. For composition search intent (not API wiring), see the hub USDA FoodData Central nutrient lookup guide.

Answer-first: API vs MCP wrap

Need Public FoodData Central API fmcg.network MCP tools
Resolve food / UPC to an id POST /foods/search (or GET search) find_food
Nutrients per 100 g or 100 ml GET /food/{fdcId} (abridged or full) get_composition
Declared Nutrition Facts per serving Same detail endpoint; Branded labelNutrients get_label_panel

Direct API use needs an api.data.gov key, careful pageSize (search hits ship large nutrient arrays), and your own parsing. The MCP path is for assistant workflows: prompt in plain English, tools resolve and fetch.

The three MCP tools

  1. find_food: Search by food, ingredient, brand, or UPC/GTIN. Optional dataType filter: Foundation, SR Legacy, Branded, Survey (FNDDS). Returns candidates with fdcId and total_in_register. Use it to pick an id, not to read composition from the search hit.
  2. get_composition: Pass one fdc_id. Returns per 100 g or 100 ml nutrients with derivation codes. Works for every data type. Missing nutrients stay missing.
  3. get_label_panel: Pass a Branded fdc_id. Returns serving size, household measure, ingredient statement, and per-serving label nutrients as submitted. Foundation, SR Legacy, and Survey records have no manufacturer panel.

Honest hedges (read before you ship numbers)

  • Branded is not USDA lab data. Manufacturer submissions are voluntary. USDA ARS does not independently verify them. A Branded value is what was submitted on the publication date, not a guarantee of current shelf stock.
  • Missing is not zero. If a nutrient is absent, it was not analysed or not declared. Do not fill gaps with 0.
  • Not a Nutrition Facts compliance tool. No Daily Value math, no FDA rounding under 21 CFR 101, no RACC verdict. Register numbers only.
  • Client, not partner. fmcg.network calls the public FoodData Central API. Do not imply FDA or USDA endorsement.

Worked queries (MCP from Claude)

Call the FoodData Central API wrap: find Foundation records for almond flour and return fdcId values.

The assistant calls us_nutrient_lookup__find_food with query: "almond flour" and dataType: "Foundation". Expect candidates such as fdcId 2261420 (“Flour, almond”) plus total hit count.

Get per 100 g composition for fdcId 2261420 via the FoodData Central API wrap.

get_composition returns the analytical profile. Nutrients that were not analysed appear as missing, never as zero. Energy may appear more than once under different Atwater methods; report what the register returned.

Resolve UPC 041303062623 through the FoodData Central API and show the declared label panel.

find_food resolves the UPC to a Branded record; get_label_panel returns serving size, ingredients, and per-serving label nutrients as submitted, not as USDA-verified lab results.

When to use the public API yourself

Use your own api.data.gov key and the official endpoints when you need bulk downloads, custom pagination, full (non-abridged) records, or code outside an MCP host. Use the fmcg.network MCP when the workflow is conversational lookup inside Claude, ChatGPT, Copilot, or Cursor.

Connect at Install fmcg.network. Capability detail and schemas: US Nutrient Composition Lookup. Composition and labelling search hub (not this API page): USDA FoodData Central nutrient lookup guide.

Frequently Asked Questions

What is the FoodData Central API?
It is the public HTTP API for USDA FoodData Central (api.nal.usda.gov/fdc/v1 via api.data.gov). Developers use it to search foods and read nutrient records. fmcg.network is a client of that public API, not an FDA or USDA partner.
How does the fmcg.network MCP wrap the FoodData Central API?
Three tools: find_food resolves a food, brand, or UPC to register fdcId values; get_composition returns per 100 g or 100 ml nutrients for one fdcId; get_label_panel returns manufacturer-declared Nutrition Facts values per serving for Branded records.
Do I need my own USDA API key to use this from Claude?
Not when you connect via fmcg.network. Install the MCP connector at https://fmcg.network/install, then call the tools from Claude or another supported assistant. Direct calls to the public API still need your own api.data.gov key.
Are Branded Foods values USDA lab measurements?
No. Branded records are voluntary manufacturer submissions. USDA does not verify them. Treat them as label disclosures as of the publication date, not as analytical lab results.
Can I treat a missing nutrient as zero?
No. Absent means not analysed or not declared. Reporting missing as zero is a data error.
Does this produce a compliant Nutrition Facts panel?
No. It reports register numbers. Rounding, Daily Values, and RACC serving sizes under 21 CFR 101 are a separate regulatory step. This is not a Nutrition Facts compliance tool.
Is this the same page as the USDA FoodData Central nutrient lookup guide?
No. The nutrient lookup guide covers search intent for composition and label values. This page is for API and MCP integration intent: endpoints, tool mapping, and how to call the wrap from Claude.