NutriRef
Pay-per-call USDA nutrition data for AI agents. Structured FoodData Central via the x402 micropayment protocol — agents pay $0.001–$0.005 in USDC per request, no signup, no API keys, no human auth flows.
Live at https://nutriref.xyz. Spec at /openapi.json · Swagger at /docs · Bazaar discovery at /.well-known/x402.
Endpoints
| Method | Path | Price | Cache |
|---|---|---|---|
GET |
/v1/nutrition/search?q=&limit= |
$0.001 | 24h |
GET |
/v1/nutrition/detail/{fdc_id} |
$0.002 | 7d |
POST |
/v1/nutrition/compare |
$0.003 | derived |
POST |
/v1/nutrition/recipe |
$0.005 | derived |
All values per 100g. Missing nutrients are null, not 0. compare returns per-nutrient winners (highest protein, lowest sodium, etc.). recipe scales by grams and sums.
Use it from Claude (or any MCP agent)
NutriRef ships an MCP server that exposes the four endpoints as native tools. Install it from PyPI:
pip install nutriref-mcpThen add this to your MCP client config (Claude Desktop's claude_desktop_config.json, Claude Code's MCP settings, etc.):
{
"mcpServers": {
"nutriref": {
"command": "nutriref-mcp",
"env": {
"PAYER_PRIVATE_KEY": "0x...your-funded-wallet-key...",
"NUTRIREF_BASE_URL": "https://nutriref.xyz"
}
}
}
}





