LabscoMCP early access ↗
rpassafaroMCP SERVER

USDA api

Nutrition facts from the USDA's FoodData Central database — searchable, and detailed down to individual nutrients.

by rpassafaro ↗Food, Dining & DeliveryCommunity

LABSCO SUMMARY

Bulk lookup is what makes it useful beyond one-off questions.

Single-food nutrition answers are easy to get anywhere. What this adds is get_multiple_foods and nutrient filtering, so a comparison across a dozen ingredients is one round trip with only the columns you asked for — which is the difference between an assistant that can plan a menu and one that can recite a label.

What it is

A Python server over the USDA FoodData Central API. It covers the Foundation, SR Legacy, Survey and Branded datasets, so answers come from the USDA's own records rather than from the model's recollection of a nutrition label.

What you get

  • search_foods searches the database, taking query, page_size and page_number
  • get_food_details returns the full record for one fdc_id, optionally narrowed to specific nutrients
  • get_multiple_foods looks up a list of fdc_ids in one call
  • get_food_nutrients pulls just the nutrients you name across several foods
  • list_foods browses by data_type — Foundation, SR Legacy, Survey or Branded

Requirements

A free USDA API key from api.nal.usda.gov, set as USDA_API_KEY. Python 3.11+ with uv sync, then uv run main.py; the project is usda-api-mcp, version 2.1.0. There is also a macOS GUI installer (macOS 10.15+) that writes the client config for you. The free tier allows 3600 requests/hour.

Setup effort

Build from source — git clone https://github.com/rpassafaro/usda-api-mcp.git