Usda MCP Server logo

Usda MCP Server

Search USDA foods, retrieve nutrient profiles, scale portions, batch-fetch records, and compare foods through MCP.

Install Usda MCP Server

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "usda-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@cyanheads/usda-mcp-server"
      ],
      "env": {
        "USDA_FDC_API_KEY": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Automated check passed— started and listed 5 tools correctly (Today).

Overview

usda-mcp-server connects MCP clients to the USDA FoodData Central REST API for food discovery and nutrient lookup. It searches across USDA food datasets, retrieves complete profiles by FDC ID, scales values to supported portions, and compares multiple foods. Use it for nutrition analysis, food selection, ingredient research, or applications that need structured USDA composition data. It supports both STDIO and Streamable HTTP transports and exposes food and nutrient resources alongside its tools.

Use cases

  • Search USDA foods by ingredient, keyword, or barcode
  • Retrieve nutrient profiles for selected FDC records
  • Scale nutrition values to a serving or mass unit
  • Compare nutrient values across multiple foods
  • Resolve nutrient names to FoodData Central IDs

Key features

  • USDA FoodData Central search across four food data sources
  • Single-food nutrient profiles with portion scaling
  • Batch retrieval for 2–20 food records
  • Side-by-side comparison for 2–5 foods
  • Static reference for approximately 150 nutrients
  • STDIO and Streamable HTTP transports

Tools5

What Usda MCP Server lets your agent do. Expand a tool for its parameters.

Verified live~2.1k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

7/7 checks healthy over the last 48d

What it can do

From the 5 tools this server returned when we ran it; 5 declare their own safety hints.

Makes network requests · 3Read-only tools · 5
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceNot published
Package age158 days
Maintainers1

Observed 2026-10-30 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 7d ago via OSV.dev · @cyanheads/usda-mcp-server (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
npm downloads1.1kPackage downloads in the last 30 days.
Last commit4d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed5Callable tools this server registers over MCP.

How Usda MCP Server works

What usda-mcp-server does

usda-mcp-server brings USDA FoodData Central into MCP-compatible clients. The service covers roughly 400,000 food records from SR Legacy, Foundation, Survey (FNDDS), and Branded sources. Agents can search by food terms, ingredient names, or UPC/GTIN values; inspect a food's nutrient profile; retrieve several records together; and generate a side-by-side comparison.

The server also includes a bundled reference catalog of about 150 nutrients. Each entry includes its FDC identifier, name, unit, SR reference number, and category. This catalog helps an agent translate a nutrient name into the IDs accepted by the other tools.

How it works

The server uses the USDA FoodData Central REST API at api.nal.usda.gov/fdc/v1. Search results include FDC IDs and a preview of common nutrients, while full records are available through the single-food tool or the usda://food/{fdcId} resource. The nutrient catalog is bundled with the server, so listing nutrients does not require an API request.

FoodData Central stores values on a per-100-gram basis. usda_get_food can convert those values to grams, ounces, pounds, kilograms, or a serving quantity. Serving resolution uses a valid food portion first, with a supported Branded gram-based label serving as a fallback. Comparisons normalize foods to one shared quantity and unit, and batch operations report failed IDs separately when some records cannot be returned.

Three resources are available: usda://food/{fdcId} for an unscaled JSON food profile, usda://nutrients for the complete nutrient dictionary, and skill://usda-guide/SKILL.md for guidance on selecting food records, choosing serving weights, and handling incomplete nutrient coverage.

Setup and configuration

The package can run over STDIO or Streamable HTTP. A USDA FoodData Central API key is required through the USDA_FDC_API_KEY environment variable. The project publishes an npm package, a Docker image, a desktop bundle, and a hosted MCP endpoint at https://usda.caseyjhand.com/mcp.

MCP client installation links are provided for Claude Desktop, Cursor, and VS Code. For local package execution, the documented client configurations use npx with the @cyanheads/usda-mcp-server package. Transport, authentication, and storage options are supplied by the underlying MCP core framework, including none, JWT, or OAuth authentication and in-memory, filesystem, Supabase, or Cloudflare-backed storage where applicable.

Tools and capabilities

  • usda_search_foods searches by keyword, ingredient, or UPC/GTIN. It supports source, brand-owner, category, page-size, and page-number filters, with up to 50 results per page.
  • usda_get_food returns one complete profile, optionally restricted to nutrient IDs and scaled to a mass unit or serving.
  • usda_get_foods fetches 2–20 FDC IDs in one request. Results remain per 100 grams and can include a failed list for IDs without data.
  • usda_compare_foods compares 2–5 foods in a Markdown table. It defaults to 12 common nutrients and continues with valid records when some IDs fail.
  • usda_list_nutrients returns the static nutrient reference and can filter by macronutrients, vitamins, minerals, lipids, amino acids, or other nutrients.

Search defaults to SR Legacy unless a source is selected, or to Branded when brandOwner is supplied. Full profiles and comparisons preserve source information so callers can distinguish curated records from label-derived branded data.

Limitations and notes

Portion scaling requires a supported mass unit or a valid portion definition. The server does not infer density, and volume, IU, milligram labels, missing units, and invalid serving sizes cannot be converted automatically. Batch retrieval does not perform portion scaling. Food resources accept only bare positive integer FDC IDs, and comparison requires at least two foods to resolve successfully.

Search exposes only selected preview nutrients; use the full-food tool for other nutrients or the complete profile. The nutrient reference is static and contains approximately 150 tracked nutrients rather than every possible field in FoodData Central.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Usda MCP Server

usda-mcp-server is an MCP server that connects AI clients to the USDA FoodData Central database. Its main tools search foods, retrieve full nutrient profiles, batch-fetch FDC records, compare 2–5 foods, and list nutrient definitions. It supports keyword, ingredient, and UPC/GTIN searches across SR Legacy, Foundation, Survey, and Branded data.

Install it through an MCP client using the published npm package, Docker image, desktop bundle, or hosted endpoint. Local configurations use `npx` with `@cyanheads/usda-mcp-server`, and the server requires the `USDA_FDC_API_KEY` environment variable.

It needs a USDA FoodData Central API key in `USDA_FDC_API_KEY`. The server uses that credential to call the FoodData Central REST API for food searches and nutrient records; its bundled nutrient reference does not require an API call.

Yes, Cursor is supported through a provided MCP installation link. The server also provides installation links for Claude Desktop and VS Code, and can run through STDIO or Streamable HTTP.

Yes, `usda_get_food` scales per-100-gram values to grams, ounces, pounds, kilograms, or a serving quantity. It requires a valid portion or supported Branded gram-based label serving and does not infer density for volume measurements.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewUsda MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/usda-mcp-server?style=directory)](https://allmcps.com/mcp/usda-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/usda-mcp-server"><img src="https://allmcps.com/api/badge/usda-mcp-server?style=directory" alt="Usda MCP Server on AllMCPs" /></a>