MCP.so
Sign In

Overview

What is Food Data Central MCP Server?

A Model Context Protocol server that provides access to the USDA's FoodData Central API, allowing users to search for foods, retrieve nutrient information, and access multiple food data types (Foundation, SR Legacy, Survey, Branded). Designed for use with MCP-compatible clients like Claude Desktop.

How to use Food Data Central MCP Server?

Install dependencies with npm install, build with npm run build, then set the USDA_API_KEY environment variable and start with npm start (or npm run dev for hot reloading). It uses stdio transport, so it runs as a subprocess of an MCP client. For Claude Desktop, add a configuration entry to claude_desktop_config.json specifying the command npx tsx pointing to the server's index.ts and the USDA API key in the environment.

Key features of Food Data Central MCP Server

  • Search foods using keyword queries with optional filters
  • Access nutrient information for specific foods
  • Paginated results with configurable page size and number
  • Support for multiple data types: Foundation, SR Legacy, Survey, Branded
  • Retrieve detailed food data by FDC ID (single or batch)
  • Filter by brand owner, trade channel, and publication date

Use cases of Food Data Central MCP Server

  • Search for a specific food by name within USDA’s database
  • Get detailed nutrition facts (e.g., calories, protein) for a food by its FDC ID
  • Retrieve a paged list of foods filtered by data type or sort order
  • Search branded foods by brand owner, trade channel, or publication date range

FAQ from Food Data Central MCP Server

What API key is required?

A USDA FoodData Central API key must be set in the USDA_API_KEY environment variable.

How does the server communicate?

It uses stdio transport, meaning it runs as a subprocess that communicates via standard input/output with an MCP client (e.g., Claude Desktop).

What dependencies are needed?

Node.js and npm are required. Dependencies are installed with npm install.

What data does it access?

It accesses the USDA FoodData Central API, which contains food composition data for Foundation, SR Legacy, Survey, and Branded food items.

How do I configure it for Claude Desktop?

Add a JSON entry under mcpServers in claude_desktop_config.json with the command npx tsx and the absolute path to src/index.ts, plus the USDA API key in the env object.

Tags

More from Data & Analytics