Nutrition
FreeNot checkedUSDA FoodData Central MCP server — nutrition lookup, meal logging, and macro tracking
About
USDA FoodData Central MCP server — nutrition lookup, meal logging, and macro tracking
README
USDA FoodData Central MCP server for nutrition lookup, meal logging, and daily macro tracking.
Setup
- Get a free API key at https://fdc.nal.usda.gov/api-key-signup
- Set
USDA_API_KEYenvironment variable (or it falls back toDEMO_KEY)
cp .env.example .env
# Edit .env with your key
Usage
node src/server.js # stdio MCP server
Tools
nutrition
| Action | Description | Key Params |
|---|---|---|
search |
Search foods by name | query, dataType, pageSize |
get |
Full nutrition details | fdcId |
compare |
Side-by-side macro comparison | fdcIds (array) |
meal_log
| Action | Description | Key Params |
|---|---|---|
log |
Log a food eaten | fdcId, servings, mealType, date |
list |
List entries for a date | date, mealType |
delete |
Remove an entry | entryId |
daily_summary |
Macro totals for a day | date |
weekly_summary |
Weekly averages | weekOf |
targets
| Action | Description | Key Params |
|---|---|---|
set |
Set daily macro targets | calories, protein, carbs, fat, fiber |
get |
View current targets | — |
progress |
Progress vs targets | date |
Architecture
src/
server.js — MCP stdio server
usda-client.js — USDA API client with 24h cache
meal-log.js — Local meal log storage (~/.nutrition-mcp/logs/)
targets.js — Macro targets storage (~/.nutrition-mcp/targets.json)
tools/
nutrition.js — nutrition tool handler
meal-log.js — meal_log tool handler
targets.js — targets tool handler
test/
server.test.js — Unit tests
Testing
npm test
License
MIT © Aaron Sachs
Installing Nutrition
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/asachs01/nutrition-mcpFAQ
Is Nutrition MCP free?
Yes, Nutrition MCP is free — one-click install via Unyly at no cost.
Does Nutrition need an API key?
No, Nutrition runs without API keys or environment variables.
Is Nutrition hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Nutrition in Claude Desktop, Claude Code or Cursor?
Open Nutrition on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectCompare Nutrition with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
