Skip to main content
Glama
FDA Nutrition Facts MCP Server

FDA Nutrition Facts MCP Server

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.

Related MCP server: nutrition-mcp-server

Available Tools

Tool

Description

lookup_fda_daily_value

Look 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_value

Apply 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.

Available Tools

2 tools
lookup_fda_daily_valueLook Up FDA 21 CFR 101.9 Daily Value & Rounding RuleA

Look up the official US FDA Daily Value (DRV/RDI), unit, CFR citation, and rounding increment rule for a mandatory Nutrition Facts nutrient (or pass "all" for the complete 15-nutrient reference table).

Inputs: nutrient.

round_fda_nutrition_valueRound Raw Nutrient Numbers per FDA 21 CFR 101.9A

Apply official US FDA 21 CFR 101.9 legal rounding increments and compute % Daily Value (%DV) for raw per-serving nutrient numbers. Pure numeric reference calculation (no label graphics or recipe parsing).

Inputs: nutrients (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools have clearly distinct purposes: one retrieves FDA reference data (Daily Values, units, CFR citations, rounding rules), while the other performs numeric rounding and %DV calculation. An agent can easily determine which tool to use for lookup versus computation.

    Naming Consistency5/5

    Both names follow a consistent snake_case verb_noun pattern with a clear FDA domain prefix: lookup_fda_daily_value and round_fda_nutrition_value. The naming is predictable and readable.

    Tool Count3/5

    Two tools is thin for a server, even a narrowly scoped reference one. While each tool earns its place, the surface feels borderline minimal and may leave users wanting adjacent operations like unit conversion or validation.

    Completeness4/5

    The tools cover the core stated domain: looking up mandatory nutrient Daily Values and applying official rounding/%DV calculations. Minor gaps exist, such as no explicit unit conversion or label validation, but these are outside the narrowly stated scope.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers