Search foods, compare nutrients, and look up the full USDA FoodData Central database.
Maintain this server? Claim it
Call this server's tools from your browser. Nothing to install.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
Compare nutrients side-by-side for 2–5 foods. Returns a structured table — one row per nutrient, one column per food — formatted as markdown. Best for "spinach vs kale iron" or "which has more protein?" questions. Omit nutrients[] to use the 12 most common defaults (energy, protein, fat, saturated fat, carbs, fiber, sugars, sodium, potassium, calcium, iron, vitamin C); provide nutrients[] with specific FDC IDs to compare different nutrients. All values are scaled to the same gram basis (default 100g). If one or more FDC IDs are not found, the comparison proceeds with the valid foods — only throws too_few_foods when fewer than 2 IDs return data.
FDC IDs to compare — 2 to 5 foods. Use usda_search_foods to discover IDs.
Unit for quantity. Default "g". Does not support "serving" (use a fixed gram basis for consistent comparison).
Gram basis for comparison. All values scaled to this amount. Must be positive. Default 100.
Nutrient IDs to include in the comparison. Defaults to the 12 most common: energy (1008), protein (1003), total fat (1004), saturated fat (1258), carbohydrate (1005), fiber (1079), total sugars (2000), sodium (1093), potassium (1092), calcium (1087), iron (1089), vitamin C (1162). Use usda_list_nutrients to look up other IDs.
Compare nutrients side-by-side for 2–5 foods. Returns a structured table — one row per nutrient, one column per food — formatted as markdown. Best for "spinach vs kale iron" or "which has more protein?" questions. Omit nutrients[] to use the 12 most common defaults (energy, protein, fat, saturated fat, carbs, fiber, sugars, sodium, potassium, calcium, iron, vitamin C); provide nutrients[] with specific FDC IDs to compare different nutrients. All values are scaled to the same gram basis (default 100g). If one or more FDC IDs are not found, the comparison proceeds with the valid foods — only throws too_few_foods when fewer than 2 IDs return data.
| Argument | Type | Description |
|---|---|---|
| unit | string | Unit for quantity. Default "g". Does not support "serving" (use a fixed gram basis for consistent comparison). |
| fdcIds* | array | FDC IDs to compare — 2 to 5 foods. Use usda_search_foods to discover IDs. |
| quantity | number | Gram basis for comparison. All values scaled to this amount. Must be positive. Default 100. |
| nutrients | array | Nutrient IDs to include in the comparison. Defaults to the 12 most common: energy (1008), protein (1003), total fat (1004), saturated fat (1258), carbohydrate (1005), fiber (1079), total sugars (2000), sodium (1093), potassium (1092), calcium (1087), iron (1089), vitamin C (1162). Use usda_list_nutrients to look up other IDs. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"fdcIds"
],
"properties": {
"unit": {
"enum": [
"g",
"oz",
"lb",
"kg"
],
"type": "string",
"default": "g",
"description": "Unit for quantity. Default \"g\". Does not support \"serving\" (use a fixed gram basis for consistent comparison)."
},
"fdcIds": {
"type": "array",
"items": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1
},
"maxItems": 5,
"minItems": 2,
"description": "FDC IDs to compare — 2 to 5 foods. Use usda_search_foods to discover IDs."
},
"quantity": {
"type": "number",
"default": 100,
"description": "Gram basis for comparison. All values scaled to this amount. Must be positive. Default 100.",
"exclusiveMinimum": 0
},
"nutrients": {
"type": "array",
"items": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1
},
"description": "Nutrient IDs to include in the comparison. Defaults to the 12 most common: energy (1008), protein (1003), total fat (1004), saturated fat (1258), carbohydrate (1005), fiber (1079), total sugars (2000), sodium (1093), potassium (1092), calcium (1087), iron (1089), vitamin C (1162). Use usda_list_nutrients to look up other IDs."
}
},
"additionalProperties": false
}Get the full nutrient profile for one food by FDC ID. Returns all available nutrients (or a filtered subset via the nutrients[] param) with optional per-portion scaling. Use usda_search_foods to discover FDC IDs. Provide quantity + unit to scale all nutrient values from per-100g to the specified portion (e.g. quantity=200, unit="g" → per-200g values). Use unit="serving" to scale to the food's first defined portion weight. Narrow nutrients[] to specific IDs to reduce response size for focused queries.
| Argument | Type | Description |
|---|---|---|
| unit | string | Unit for quantity. "serving" uses the food's first defined portion weight. Required when quantity is provided. |
| fdcId* | integer | FDC ID of the food. Use usda_search_foods to discover IDs. |
| quantity | number | Amount of food to scale nutrient values to. Must be positive. When provided, unit is required. Omit for per-100g values (FDC database native basis). |
| nutrients | array | Filter to specific nutrient IDs (e.g. [1003, 1004, 1005, 1008] for protein, fat, carbs, energy). Use usda_list_nutrients to look up IDs. Omit to return all available nutrients. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"fdcId"
],
"properties": {
"unit": {
"enum": [
"g",
"oz",
"lb",
"kg",
"serving"
],
"type": "string",
"description": "Unit for quantity. \"serving\" uses the food's first defined portion weight. Required when quantity is provided."
},
"fdcId": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1,
"description": "FDC ID of the food. Use usda_search_foods to discover IDs."
},
"quantity": {
"type": "number",
"description": "Amount of food to scale nutrient values to. Must be positive. When provided, unit is required. Omit for per-100g values (FDC database native basis).",
"exclusiveMinimum": 0
},
"nutrients": {
"type": "array",
"items": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1
},
"description": "Filter to specific nutrient IDs (e.g. [1003, 1004, 1005, 1008] for protein, fat, carbs, energy). Use usda_list_nutrients to look up IDs. Omit to return all available nutrients."
}
},
"additionalProperties": false
}Fetch nutrient profiles for 2–20 foods in a single API call. More efficient than calling usda_get_food N times when you already have multiple FDC IDs. All values are per 100g (no portion scaling). Use the nutrients[] filter to limit response size — strongly recommended for batch calls. For side-by-side comparison with a formatted table, use usda_compare_foods instead. Failed IDs (not found or no data) are reported in the failed[] array rather than aborting the entire batch.
| Argument | Type | Description |
|---|---|---|
| fdcIds* | array | FDC IDs to fetch — 2 to 20 IDs. Use usda_search_foods to discover IDs. |
| nutrients | array | Filter to specific nutrient IDs (e.g. [1003, 1004, 1005, 1008]). Strongly recommended — full profiles can be large. Use usda_list_nutrients to look up IDs. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"fdcIds"
],
"properties": {
"fdcIds": {
"type": "array",
"items": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1
},
"maxItems": 20,
"minItems": 2,
"description": "FDC IDs to fetch — 2 to 20 IDs. Use usda_search_foods to discover IDs."
},
"nutrients": {
"type": "array",
"items": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1
},
"description": "Filter to specific nutrient IDs (e.g. [1003, 1004, 1005, 1008]). Strongly recommended — full profiles can be large. Use usda_list_nutrients to look up IDs."
}
},
"additionalProperties": false
}Look up the FDC nutrient reference table — all tracked nutrients with their numeric IDs, names, SR reference numbers, units, and categories. Use to resolve a nutrient name (e.g. "vitamin C") to its FDC ID (1162) before passing it to the nutrients[] filter on other tools. Filter by category (macronutrients, vitamins, minerals, lipids, amino_acids, or other) to narrow results. The data is static — call once and reuse the IDs.
| Argument | Type | Description |
|---|---|---|
| category | string | Filter to a nutrient category. Omit to return all ~150 tracked nutrients. Options: macronutrients, vitamins, minerals, lipids, amino_acids, other. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"category": {
"enum": [
"macronutrients",
"vitamins",
"minerals",
"lipids",
"amino_acids",
"other"
],
"type": "string",
"description": "Filter to a nutrient category. Omit to return all ~150 tracked nutrients. Options: macronutrients, vitamins, minerals, lipids, amino_acids, other."
}
},
"additionalProperties": false
}Search USDA FoodData Central foods by keyword. Returns matching foods with FDC IDs and a preview of key nutrients (energy, protein, fat, carbs — not guaranteed complete). Use the returned fdcId with usda_get_food for the full nutrient profile, or usda_compare_foods for side-by-side comparisons. When dataType is omitted, defaults to SR Legacy (common whole foods with complete profiles) — or to Branded when brandOwner is set, since only Branded records carry one. Set dataType to ["Branded"] for packaged products, or include a UPC/GTIN code as the query. Pass brandOwner (e.g. "General Mills") to narrow branded results.
| Argument | Type | Description |
|---|---|---|
| query* | string | Search terms — food name, ingredient, or UPC/GTIN code for branded products. Examples: "chicken breast raw", "banana", "012345678901". |
| dataType | array | FDC data sources to search. Omitting this defaults to ["SR Legacy"] (common whole foods, complete nutrient profiles), or to ["Branded"] when brandOwner is set. Include "Branded" for packaged products. Multiple values allowed. |
| pageSize | integer | Number of results per page. Default 10, maximum 50. |
| brandOwner | string | Filter branded results by brand owner name (e.g. "General Mills", "Kraft"). Only Branded records carry one, so setting this defaults dataType to ["Branded"] unless dataType is given explicitly. |
| pageNumber | integer | Page number (1-based). Use with totalPages to paginate. |
| foodCategory | string | Filter by USDA food category (e.g. "Poultry Products", "Vegetables and Vegetable Products"). Case-sensitive. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"query"
],
"properties": {
"query": {
"type": "string",
"minLength": 1,
"description": "Search terms — food name, ingredient, or UPC/GTIN code for branded products. Examples: \"chicken breast raw\", \"banana\", \"012345678901\"."
},
"dataType": {
"type": "array",
"items": {
"enum": [
"SR Legacy",
"Foundation",
"Survey (FNDDS)",
"Branded"
],
"type": "string"
},
"description": "FDC data sources to search. Omitting this defaults to [\"SR Legacy\"] (common whole foods, complete nutrient profiles), or to [\"Branded\"] when brandOwner is set. Include \"Branded\" for packaged products. Multiple values allowed."
},
"pageSize": {
"type": "integer",
"default": 10,
"maximum": 50,
"minimum": 1,
"description": "Number of results per page. Default 10, maximum 50."
},
"brandOwner": {
"type": "string",
"description": "Filter branded results by brand owner name (e.g. \"General Mills\", \"Kraft\"). Only Branded records carry one, so setting this defaults dataType to [\"Branded\"] unless dataType is given explicitly."
},
"pageNumber": {
"type": "integer",
"default": 1,
"maximum": 9007199254740991,
"minimum": 1,
"description": "Page number (1-based). Use with totalPages to paginate."
},
"foodCategory": {
"type": "string",
"description": "Filter by USDA food category (e.g. \"Poultry Products\", \"Vegetables and Vegetable Products\"). Case-sensitive."
}
},
"additionalProperties": false
}