search_foodsLABSCO 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_foodssearches the database, takingquery,page_sizeandpage_numberget_food_detailsreturns the full record for onefdc_id, optionally narrowed to specificnutrientsget_multiple_foodslooks up a list offdc_idsin one callget_food_nutrientspulls just the nutrients you name across several foodslist_foodsbrowses bydata_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
USE CASES
Comparing two ingredients on one nutrient
Search both, then ask for just the nutrient you care about across both records.
Costing out a recipe nutritionally
Resolve each ingredient to its id once, then pull them all in a single bulk call.
Checking a branded product's ingredients
Browse the Branded dataset and read the full record, manufacturer and category included.
Finding foods that meet a threshold
Search broadly, then filter the results on the nutrient values rather than on the product names.
5 tools
Listed in project docs. Your client may show a different list.
get_food_detailsget_multiple_foodslist_foodsget_food_nutrientsBEFORE YOU INSTALL
What to know first
Tools you get
5 tools named in the project's documentation.
Requires
USDA_API_KEY in your environment
INSTALLATION
Connect your client
Server setup
# Clone the repository
git clone https://github.com/rpassafaro/usda-api-mcp.git
cd usda-api-mcp
# Install dependencies
uv sync
# Set up environment
echo "USDA_API_KEY=<YOUR_USDA_API_KEY>" > .env
# Run the MCP server
uv run main.pyMCP Clients
Claude Desktop
curl -sSL https://raw.githubusercontent.com/<YOUR_USERNAME>/usda-api-mcp/main/install.sh | bash