nutrition-mcp
MCP server for USDA nutrition data lookup, meal logging, and daily macro tracking.
README
nutrition-mcp
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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.