MCP server for NutriRef — pay-per-call USDA nutrition for AI agents (x402 + USDC on Base).
Project description
nutriref-mcp
MCP server for NutriRef — pay-per-call USDA FoodData Central nutrition for AI agents, gated by x402 micropayments in USDC on Base. No signup, no API keys.
It exposes four tools:
| Tool | What it does | Price |
|---|---|---|
nutrition_search |
Find foods by name, get fdc_id + macros |
$0.001 |
nutrition_detail |
Full per-100g profile (13 nutrients) for one food | $0.002 |
nutrition_compare |
Compare 2–5 foods with per-nutrient winners | $0.003 |
nutrition_recipe |
Scale and sum nutrition across weighted ingredients | $0.005 |
Install
pip install nutriref-mcp
Or run without installing:
uvx nutriref-mcp
Configure your MCP client
Add this to your 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"
}
}
}
}
PAYER_PRIVATE_KEY is the private key of a Base mainnet wallet holding USDC — the wallet pays for each tool call. Use a dedicated wallet funded only with what you're willing to spend. NUTRIREF_BASE_URL is optional and defaults to https://nutriref.xyz.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nutriref_mcp-0.2.2.tar.gz.
File metadata
- Download URL: nutriref_mcp-0.2.2.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0367fd73b5f63808064a07545761dba40d35616b61550f7932e248ad49cb4044
|
|
| MD5 |
8b47a9bf9e51de22c76215f7200c85bc
|
|
| BLAKE2b-256 |
707b5822367fe08f29a937a77c21d4fdf4f5e71d492ecd09de7d3085e1b28992
|
File details
Details for the file nutriref_mcp-0.2.2-py3-none-any.whl.
File metadata
- Download URL: nutriref_mcp-0.2.2-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc556a13838c1be70a3c39974c293a2a1b2f1d12e55ae94669b1879ad77d8ed5
|
|
| MD5 |
265750f3a9002e9b1dc9a8b8ba5132b9
|
|
| BLAKE2b-256 |
121d30111680d541d3f787c7d825887551da7316b4793c014a136623d4d6f412
|