FDA Nutrition Facts MCP Server

Lightweight open-source MCP server for official US FDA 21 CFR 101.9 Daily Values (DRV/RDI) and legal nutrition label rounding rules. Maintained by NutriLabelHub (https://nutritionlabelhub.com).

Documentation

FDA Nutrition Facts MCP Server

A lightweight, open-source Model Context Protocol (MCP) server and structured JSON reference table for US FDA 21 CFR 101.9 Daily Values (DRV/RDI) and legal Nutrition Facts rounding rules — built for Claude Desktop, Cursor, Windsurf, Claude Code, LobeChat, and any MCP-compatible AI client.

Maintained by NutriLabelHub — an online FDA Nutrition Facts label generator and USDA recipe nutrition calculator for food makers, cottage food bakeries, and CPG brands.

Why Use This MCP Server?

LLMs frequently hallucinate outdated pre-2020 FDA Daily Values (such as 300g carbs or 2400mg sodium) or apply standard math rounding instead of FDA's piecewise legal rounding increments (<5 kcal → 0, 5–50 kcal → nearest 5, >50 kcal → nearest 10, micronutrient 2%/5%/10% %DV steps).

This server gives your AI assistant 100% local, zero-API-key, deterministic access to the public federal regulation tables under 21 CFR 101.9:

  • Zero API Keys & 100% Local: Runs locally over stdio in Node.js with zero external network calls.
  • Public 21 CFR 101.9 Reference Dataset (data/fda-21cfr101-daily-values.json): All 15 mandatory FDA Nutrition Facts nutrients with current 2020/2026 DRVs/RDIs, units, CFR citations, and rounding increments.
  • 2 Focused MCP Tools + 1 JSON Resource: Fast, minimal surface area designed for reliable agent tool calls.

Available Tools

ToolDescription
lookup_fda_daily_valueLook up the official FDA Daily Value (DRV/RDI), declaration unit, CFR citation, and rounding rule for any mandatory nutrient (e.g., "sodium", "added_sugars", "vitamin_d", or "all").
round_fda_nutrition_valueApply official US FDA 21 CFR 101.9 piecewise rounding rules and compute % Daily Value (%DV) for raw per-serving numeric nutrient values.

Available Resource

  • fda://21cfr101/daily-values — Structured JSON reference dataset of all 15 mandatory FDA Nutrition Facts nutrients (application/json).

Quick Start

1. Clone, install, and test

git clone https://github.com/mazycc/fda-nutrition-facts-mcp.git
cd fda-nutrition-facts-mcp
npm install
npm test

2. Configure in Claude Desktop / Cursor / Claude Code

Add to your MCP config (claude_desktop_config.json or .cursor/mcp.json):

{
  "mcpServers": {
    "fda-nutrition-facts": {
      "command": "node",
      "args": ["/absolute/path/to/fda-nutrition-facts-mcp/src/index.js"]
    }
  }
}

3. Run with Docker

docker build -t fda-nutrition-facts-mcp .
docker run -i --rm fda-nutrition-facts-mcp

Example Prompts

  • "Look up the official FDA Daily Values for added sugars, sodium, and saturated fat."
  • "Round these per-serving lab values per FDA 21 CFR 101.9: 217.2 calories, 11.93g total fat, 132mg sodium, and 17.01g added sugars."
  • "Give me the complete 15-nutrient FDA Daily Value table as JSON."

Need Complete Recipe-to-Packaging Labels?

This MCP server intentionally covers only public FDA reference tables and numeric rounding rules. When you need end-to-end food packaging workflows, try the web tools on NutriLabelHub:

License

MIT — free to use, fork, and integrate with attribution to NutriLabelHub.