Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nutriref_mcp-0.2.3.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nutriref_mcp-0.2.3-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file nutriref_mcp-0.2.3.tar.gz.

File metadata

  • Download URL: nutriref_mcp-0.2.3.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.1

File hashes

Hashes for nutriref_mcp-0.2.3.tar.gz
Algorithm Hash digest
SHA256 1290cbd43f3d861326b16360e0da104c0bb9903cb6b4b180b58f26adc4bb36b9
MD5 b5491aa6ce96aadcefb1b9aad3f41efe
BLAKE2b-256 2036fe5490421919e29fa4f601d419c6cd1d5cd0b476ddbf20555152833fe11c

See more details on using hashes here.

File details

Details for the file nutriref_mcp-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: nutriref_mcp-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.1

File hashes

Hashes for nutriref_mcp-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f9335357192b87a9d8b58af440ee9cbfddcf11ea0c595443eaf0c214e93bf704
MD5 49ff3cef160e61e18597333a173d097a
BLAKE2b-256 9dc1bd3b67728e39664c7a4ad5802389bbaf364346ea055d8c2bbaeeaefde25d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page