
Usda Mcp Server
Wraps the USDA FoodData Central API with five tools for searching foods, fetching full nutrient profiles, batch lookups, side-by-side comparisons, and a static nutrient reference table. Search spans SR Legacy whole foods and branded products, including UPC lookup. The get_food tool returns full profiles with optional portion scaling in grams, ounces, pounds, or servings. Batch operations report partial failures instead of aborting when some IDs are missing. Compare_foods returns a markdown pivot table with values scaled to a common basis. Built on the author's mcp-ts-core framework with unified error handling and both stdio and streamable HTTP transports. Requires a free FoodData Central API key.
- GitHub stars
- 1
- tools
- 5
- auth
- Required
- transport
- STDIO, HTTP
- env vars
- 8
- last updated
- Nov 11, 2026
Install
From registry metadata$ npx add-mcp https://usda.caseyjhand.com/mcp --name usdaRun in your terminal. add-mcp asks which agents to add it to (Claude Code, Codex, Cursor and more). Add -g to install it for every project.
Review the command, arguments and environment values before installing. MCP servers run with your local permissions.
Other ways
Claude Code
$ claude mcp add --transport http usda https://usda.caseyjhand.com/mcpRun in your terminal. Add --scope user to make it available in every project.
Tools
Verified live · 5 toolsVerified live against the running server on Nov 6, 2026.
usda_list_nutrientsLook up the FDC nutrient reference table — all tracked nutrients with their numeric IDs, names, SR reference numbers, units, and categories. Use to resolve a nutrient name (e.g. "vitamin C") to its FDC ID (1162) before passing it to the nutrients[] filter on other tools. Filte...1 params
Look up the FDC nutrient reference table — all tracked nutrients with their numeric IDs, names, SR reference numbers, units, and categories. Use to resolve a nutrient name (e.g. "vitamin C") to its FDC ID (1162) before passing it to the nutrients[] filter on other tools. Filte...
categorystringmacronutrients · vitamins · minerals · lipids · amino_acids · otherusda_search_foodsSearch USDA FoodData Central foods by keyword. Returns matching foods with FDC IDs and available preview nutrients: protein (1003), fat (1004), carbohydrate (1005), fiber (1079), and energy (1008, 1062, 2047, 2048), preserving distinct energy estimates. Missing nutrients are o...6 params
Search USDA FoodData Central foods by keyword. Returns matching foods with FDC IDs and available preview nutrients: protein (1003), fat (1004), carbohydrate (1005), fiber (1079), and energy (1008, 1062, 2047, 2048), preserving distinct energy estimates. Missing nutrients are o...
brandOwnerstringdataTypearrayfoodCategorystringpageNumberintegerpageSizeintegerquery*stringusda_get_foodGet the full nutrient profile for one food by FDC ID. Returns all available nutrients (or a filtered subset via the nutrients[] param) with optional per-portion scaling. Use usda_search_foods to discover FDC IDs. Provide unit, optionally with quantity, to scale all nutrient va...4 params
Get the full nutrient profile for one food by FDC ID. Returns all available nutrients (or a filtered subset via the nutrients[] param) with optional per-portion scaling. Use usda_search_foods to discover FDC IDs. Provide unit, optionally with quantity, to scale all nutrient va...
fdcId*integernutrientsarrayquantitynumberunitstringg · oz · lb · kg · servingusda_get_foodsFetch nutrient profiles for 2–20 foods in a single API call. More efficient than calling usda_get_food N times when you already have multiple FDC IDs. All values are per 100g (no portion scaling). Use the nutrients[] filter to limit response size — strongly recommended for bat...2 params
Fetch nutrient profiles for 2–20 foods in a single API call. More efficient than calling usda_get_food N times when you already have multiple FDC IDs. All values are per 100g (no portion scaling). Use the nutrients[] filter to limit response size — strongly recommended for bat...
fdcIds*arraynutrientsarrayusda_compare_foodsCompare nutrients side-by-side for 2–5 foods. Returns a structured table — one row per nutrient, one column per food — formatted as markdown. Best for "spinach vs kale iron" or "which has more protein?" questions. Omit nutrients[] to use the 12 most common defaults (energy, pr...4 params
Compare nutrients side-by-side for 2–5 foods. Returns a structured table — one row per nutrient, one column per food — formatted as markdown. Best for "spinach vs kale iron" or "which has more protein?" questions. Omit nutrients[] to use the 12 most common defaults (energy, pr...
fdcIds*arraynutrientsarrayquantitynumberunitstringg · oz · lb · kgdefault: gSponsors
Configuration
USDA_FDC_API_KEY*USDA FoodData Central API key from data.gov. Required for all food data requests.
USDA_CLAMP_LIMITSdefault: trueWhen true, usda_get_foods fetches the first 20 distinct FDC IDs of a larger request and returns the rest as deferredIds; false rejects a request with more than 20 IDs.
MCP_LOG_LEVELdefault: infoSets the minimum log level for output (e.g., 'debug', 'info', 'warn').
MCP_TRANSPORT_TYPEdefault: httpSelects the HTTP transport.
MCP_HTTP_HOSTdefault: 127.0.0.1The hostname for the HTTP server.
MCP_HTTP_PORTdefault: 3010The port to run the HTTP server on.
MCP_HTTP_ENDPOINT_PATHdefault: /mcpThe endpoint path for the MCP server.
MCP_AUTH_MODEdefault: noneAuthentication mode to use: 'none', 'jwt', or 'oauth'.
Readme
@cyanheads/usda-mcp-server
Search foods, compare nutrients, and look up the full USDA FoodData Central database via MCP. STDIO or Streamable HTTP.
Details
- Repository
- github.com/cyanheads/usda-mcp-server
- Categories
- Databases, Search & Web Crawling
- Package
@cyanheads/usda-mcp-server- Transport
- STDIO, HTTP
- Auth
- Required
- Registry
- MCP registry, active
- Resources
- 2
- Tools verified
- Nov 6, 2026
More from cyanheads
- Epa Mcp Server2
- Osv Advisory Mcp Server2
- Gbif Biodiversity Mcp Server1
- Pentest Mcp Server1
- Workflows Mcp Server32
- Noaa Cdo Mcp Server5
- Ntfy Mcp Server25
- Macos Mcp Server4
- Clipboard Mcp Server3
- Guardian Mcp Server2
- Mailchimp Mcp Server2
- Sports Mcp Server2
- Whois Mcp Server2
- Federal Reserve Mcp Server1
- Shift Mcp Server1
- Anime Mcp Server2
- Survey Mcp Server4
- Mcp Ts Template145
- nist-nvd-mcp-server
- open-meteo-mcp-server
- openfda-mcp-server
- wikipedia-mcp-server
- census-mcp-server
- crossref-mcp-server