Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
NUTRIREF_BASE_URLNoBase URL of the NutriRef API server.https://nutriref.xyz
PAYER_PRIVATE_KEYYesPrivate key of the wallet funding payments via USDC on Base mainnet.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
nutrition_searchA

Find foods in the USDA FoodData Central database by free-text name. Use this FIRST when the user mentions a food by name and you need its fdc_id for any of the other nutrition_* tools. Returns ranked matches with fdc_id, description, brand_owner, and a quick macro summary (calories/protein/carbs/fat per 100g). Charges $0.001 USDC per call.

Args: q: Free-text food name (e.g. "banana", "greek yogurt", "chicken breast"). limit: Max results to return, 1-50. Default 10. Use a small limit unless you need to browse.

nutrition_detailA

Get the full per-100g nutrition profile for one specific food. Use this when you have an fdc_id (from nutrition_search) and the user needs micronutrients beyond just calories/protein/carbs/fat. Returns all 13 tracked nutrients: calories, protein, fat, carbs, fiber, sugar, sodium, cholesterol, saturated_fat, vitamin_c, calcium, iron, potassium. Missing nutrients are null, not 0. Charges $0.002 USDC per call.

Args: fdc_id: USDA FoodData Central ID, obtained from nutrition_search.

nutrition_compareA

Compare 2 to 5 foods side by side. Use this when the user asks "which is healthier," "which has more protein," or any cross-food comparison — it's cheaper and clearer than calling nutrition_detail multiple times. Returns each food's full nutrition plus per-nutrient winners (highest protein, lowest sodium, etc.). Charges $0.003 USDC per call.

Args: fdc_ids: 2 to 5 USDA FDC IDs to compare.

nutrition_recipeA

Sum nutrition across a recipe of weighted ingredients. Use this for meal planning, recipe analysis, or any "what are the totals if I combine X grams of A with Y grams of B" task. Each food's per-100g nutrition is scaled by grams/100 then summed. Charges $0.005 USDC per call.

Args: ingredients: List of {"fdc_id": int, "grams": float} pairs. At least one; weights in grams.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Younghef/nutriref-api'

If you have feedback or need assistance with the MCP directory API, please join our Discord server