usda-mcp-server
io.github.cyanheads/usda-mcp-server
Serveur MCP OK 5 outils
Search foods, compare nutrients, and look up the full USDA FoodData Central database.
Fiche technique
- Auteur
- cyanheads (espace de noms du registre)
- Dépôt
- github.com/cyanheads/usda-mcp-server
- Site
- —
- Version
- 0.2.3
- Transport
- Streamable HTTP stdio
- Authentification
- Aucune (constatée par notre test)
- Adresse du serveur
- https://usda.caseyjhand.com/mcp Streamable HTTP
- Paquets
- @cyanheads/usda-mcp-server 0.2.3 npm stdio
@cyanheads/usda-mcp-server 0.2.3 npm Streamable HTTP - Outils
- 5
- Catégories
- Bases de données
- Dernière mise à jour
- 19 nov. 2026
- Publication
- 19 nov. 2026
Badge pour votre README
Gratuit, pour toute fiche. Il renvoie vers cette fiche et affiche « testé OK » tant que notre dernier test est réussi.
[](https://latlas.dev/mcp/io.github.cyanheads/usda-mcp-server)<a href="https://latlas.dev/mcp/io.github.cyanheads/usda-mcp-server"><img src="https://latlas.dev/badge/fiche/io.github.cyanheads/usda-mcp-server.svg" alt="Référencé sur L’Atlas" height="20"></a>Nos tests
Chaque semaine : initialize puis tools/list, sans identifiant, sans jamais appeler d’outil. Méthode
- Adresse
- https://usda.caseyjhand.com/mcp
- Dernier résultat
- OK 28 nov. 2026, 09:18
- Temps de réponse
- 1 410 ms (initialize + tools/list)
- Version du protocole
- 2025-11-25
- Nom annoncé
- usda-mcp-server 0.2.3
- Outils
- 5
Historique
| Date | Résultat | Réponse | Outils |
|---|---|---|---|
| 28 nov. 2026, 09:18 | OK | 1 410 ms | 5 |
Outils exposés (5, réponse à tools/list, 28 nov. 2026)
usda_list_nutrients
List USDA Nutrients
Look up the FDC nutrient reference table — 269 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. Pass query to match a name, ID, or SR number, and category (macronutrients, vitamins, minerals, lipids, amino_acids, or other) to narrow to one group. The data is static — call once and reuse the IDs.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| category | enum: "macronutrients" | "vitamins" | "minerals" | "lipids" | "amino_acids" | "other" | non | Filter to a nutrient category. Options: macronutrients, vitamins, minerals, lipids, amino_acids, other. Omit both category and query to list all 269 tracked nutrients. |
| query | string | non | Part of a nutrient name, matched case-insensitively (e.g. "lutein", "18:1"), or a whole FDC nutrient ID ("1062") or SR number ("268"). Combines with category. A blank query is ignored. |
usda_search_foods
Search USDA Foods
Search USDA FoodData Central foods by keyword. Returns matching foods with FDC IDs and available preview nutrients: protein (1003), fat (1004), carbohydrate (1005), fiber (1079, and 2033 for AOAC 2011.25 total dietary fiber, a separate measure some Foundation foods report beside or instead of 1079), and energy (1008, 1062, 2047, 2048), preserving distinct fiber and energy measures. Missing nutrients are omitted. Use the returned fdcId with usda_get_food for other nutrients or the full profile, or usda_compare_foods for side-by-side comparisons. When dataType is omitted, defaults to SR Legacy (common whole foods with complete profiles), to Branded when brandOwner is set (only Branded records carry one), or to Branded and Survey (FNDDS) when the query is 8–14 digits alone (a UPC/GTIN barcode or an FNDDS food code). A 12–14-digit barcode with a valid check digit also matches the other digit forms FDC stores it in. Set dataType to ["Branded"] for packaged products. Pass brandOwner (e.g. "General Mills") to narrow branded results.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| query | string | oui | Search terms — food name, ingredient, or UPC/GTIN code. Examples: "chicken breast raw", "banana", "02114029705". A food matching any one unqualified word counts, so a multi-word query also returns foods holding only some of its words; set requireAllWords, or prefix each word with +, to require them… |
| requireAllWords | boolean | non | Match only foods containing every query word (FDC requireAllWords). Default false: a food matching any one word counts. Explicit OR and "quoted phrases" keep their meaning. |
| dataType | array<enum: "SR Legacy" | "Foundation" | "Survey (FNDDS)" | "Branded"> | non | FDC data sources to search. Omitting this defaults to ["SR Legacy"] (common whole foods, complete nutrient profiles), to ["Branded"] when brandOwner is set, or to ["Branded", "Survey (FNDDS)"] when the query is 8–14 digits alone (a UPC/GTIN barcode or an FNDDS food code). Include "Branded" for pack… |
| brandOwner | string | non | Filter branded results by brand owner name (e.g. "General Mills", "Kraft"). Matched as one phrase, ignoring case and punctuation: "Kellogg Company" matches owners holding those words in that order. A value containing * or ? is sent as wildcard terms instead, each word matched on its own (e.g. "Kell… |
| foodCategory | string | non | Filter by USDA food category (e.g. "Poultry Products", "Vegetables and Vegetable Products"). Matched as one phrase, ignoring case and punctuation. A value containing * or ? is sent as wildcard terms instead, each word matched on its own (e.g. "Poult*"); a whole word followed by * can match nothing… |
| pageSize | integer | non | Number of results per page. Default 10; a larger value returns at most 200 and says so (a server configured with strict limits rejects more than 200). |
| pageNumber | integer | non | Page number (1-based), counted at the pageSize served. Use with totalPages to paginate. FDC serves only the first 100,000 results of a search, so a page whose pageSize × pageNumber exceeds 100,000 fails with result_window_exceeded, naming the last reachable page, unless it is also past the last pag… |
usda_get_food
Get USDA Food
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. Values are per 100 g (basisUnit "g"), except Branded foods FDC reports per 100 ml (basisUnit "ml") or per 100 of a label unit that fixes neither (basisUnit absent, basis unverified). Provide unit, optionally with quantity, to scale all nutrient values from that basis to that amount (e.g. quantity=200, unit="g" → per-200g values); a mass unit is applied to an ml or label-unit basis without conversion, and a notice says so. quantity defaults to 100 for g, oz, lb, and kg and to 1 for serving. Serving uses the valid portion FDC displays first (lowest sequenceNumber), or a positive finite Branded label size in g/GRM/GM (case-insensitive) when no portion exists; quantity multiplies that weight. A label in any other unit sets the basis rather than a serving weight, so it requires an explicit mass-unit request. quantity without unit is rejected. Narrow nutrients[] to specific IDs to reduce response size for focused queries. Set provenance=true to add to each nutrient how FDC obtained its value (derivation code, description, and source), its sample count (dataPoints), and the sample min, max, and median scaled with amount, each only where FDC sends it.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| fdcId | integer | oui | FDC ID of the food. Use usda_search_foods to discover IDs. |
| nutrients | array<integer> | non | 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. Requested IDs the food does not report are listed in missingNutrients. |
| quantity | number | non | Amount of food, in unit, to scale nutrient values to. Must be positive. Requires unit. Defaults to 100 when unit is g, oz, lb, or kg, and to 1 when unit is "serving". Omit both quantity and unit for the per-100 values FDC reports (per 100 g, or per 100 ml when basisUnit is "ml"). |
| unit | enum: "g" | "oz" | "lb" | "kg" | "serving" | non | Unit for quantity. "serving" uses the weight of the valid portion FDC displays first (lowest sequenceNumber), or a Branded label size in g/GRM/GM (case-insensitive) when no portion exists, multiplied by quantity. Required when quantity is provided. Given alone, scales to 100 g, oz, lb, or kg, or to… |
| provenance | boolean | non | Add to each nutrient what FDC records about its value: derivation (code, description, source), dataPoints (sample count), and min, max, median (sample spread, scaled with amount). Each is present only where FDC sends it: Survey (FNDDS) foods send none, Branded foods only a derivation. Off by defaul… |
usda_get_foods
Get USDA Foods (Batch)
Fetch nutrient profiles for several foods at once. More efficient than calling usda_get_food N times when you already have multiple FDC IDs. Accepts up to 500 IDs: repeats are dropped, the first 20 distinct IDs are fetched, and the rest are returned in deferredIds for a follow-up call. IDs FDC does not return before the call's deadline (slow Foundation records, most often) or keeps failing on also come back in deferredIds, ahead of those, named in a notice. Values are per 100 of each food's basisUnit, with no portion scaling: per 100 g (basisUnit "g"), except Branded foods FDC reports per 100 ml (basisUnit "ml") or per 100 of a label unit that fixes neither (basisUnit absent, basis unverified). Use the nutrients[] filter to limit response size — strongly recommended for batch calls; requested IDs a food does not report are listed in its missingNutrients. Set provenance=true to add to each nutrient how FDC obtained its value (derivation code, description, and source), its sample count (dataPoints), and the sample min, max, and median, each only where FDC sends it. 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.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| fdcIds | array<integer> | oui | FDC IDs to fetch — 2 to 500 entries (a server configured with strict limits rejects more than 20). Repeats are dropped; the first 20 distinct IDs are fetched and the rest are returned in deferredIds. Use usda_search_foods to discover IDs. |
| nutrients | array<integer> | non | 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. Requested IDs a food does not report are listed in its missingNutrients. |
| provenance | boolean | non | Add to each nutrient what FDC records about its value: derivation (code, description, source), dataPoints (sample count), and min, max, median (sample spread, per 100 of basisUnit like amount). Each is present only where FDC sends it: Survey (FNDDS) foods send none, Branded foods only a derivation.… |
usda_compare_foods
Compare USDA Foods
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. Accepts up to 500 FDC IDs: repeats are dropped, the first 5 distinct IDs are compared, and the rest are returned in deferredIds without being requested from FDC, with a notice naming the follow-up call. Omit nutrients[] to use the 12 most common defaults (energy, protein, fat, saturated fat, carbs, fiber, sugars, sodium, potassium, calcium, iron, vitamin C); a food that lacks the default energy (1008) or total sugars (2000) value has that cell filled from its equivalent nutrient — energy from 2048, then 2047; sugars from 1063 — and each fill is listed in substitutions. Provide nutrients[] with specific FDC IDs to compare different nutrients; an explicit list is compared as given, repeats dropped, without fills. All values are scaled to the same basis, quantity in unit: default 100 g, so unit="oz" alone compares per 100 oz and quantity alone is grams. A Branded food FDC reports per 100 ml (basisUnit "ml") or per 100 of a label unit that fixes neither (basisUnit absent) is compared on that basis without conversion, and a notice names it. If one or more FDC IDs are not found, the comparison proceeds with the valid foods — only throws too_few_foods when fdcIds holds fewer than 2 distinct IDs or fewer than 2 of the compared IDs return data. IDs FDC does not return befor…
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| fdcIds | array<integer> | oui | FDC IDs to compare — 2 to 500 entries (a server configured with strict limits rejects more than 5). Repeats are dropped; the first 5 distinct IDs are compared and the rest are returned in deferredIds. Use usda_search_foods to discover IDs. |
| nutrients | array<integer> | non | 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). Under the default… |
| quantity | number | non | Amount of food, in unit, that every value is scaled to. Must be positive. Default 100. |
| unit | enum: "g" | "oz" | "lb" | "kg" | non | Unit for quantity. Default "g". Does not support "serving" (each food's portion weight differs, so a serving basis would not compare equal amounts). |
Compatibilité clients
Selon les transports que chaque client déclare accepter dans sa documentation officielle ; ce n’est pas un essai réel dans le client.
| Client | Transports documentés | Ce serveur | Source |
|---|---|---|---|
| Claude Code | stdio Streamable HTTP SSE | transport accepté | doc |
| Claude (claude.ai, Claude Desktop, Cowork) | stdio Streamable HTTP SSE | transport accepté | doc |
| ChatGPT (serveurs MCP personnalisés / plugins) | Streamable HTTP SSE | transport accepté | doc |
| Cursor | stdio Streamable HTTP SSE | transport accepté | doc |
| VS Code (GitHub Copilot) | stdio Streamable HTTP SSE | transport accepté | doc |
| Windsurf (documentation redirigée vers Devin Local / Devin CLI) | stdio Streamable HTTP SSE | transport accepté | doc |
| Gemini CLI | stdio Streamable HTTP SSE | transport accepté | doc |
| OpenAI Codex (CLI, extension IDE, app) | stdio Streamable HTTP | transport accepté | doc |
Configs prêtes à copier
Adresse distante utilisée : https://usda.caseyjhand.com/mcp. Formats repris de la documentation de chaque client.
claude mcp add --transport http usda-mcp-server https://usda.caseyjhand.com/mcpCustomize > Connectors > + Add > Add custom connector ; Name : usda-mcp-server ; URL : https://usda.caseyjhand.com/mcpchatgpt.com/plugins > + > Add custom MCP server ; Name : usda-mcp-server ; Server URL : https://usda.caseyjhand.com/mcp ; Create as a plugin{
"mcpServers": {
"usda-mcp-server": {
"url": "https://usda.caseyjhand.com/mcp"
}
}
}{
"mcpServers": {
"usda-mcp-server": {
"type": "http",
"url": "https://usda.caseyjhand.com/mcp",
"tools": ["*"]
}
}
}{
"mcpServers": {
"usda-mcp-server": {
"url": "https://usda.caseyjhand.com/mcp"
}
}
}{
"mcpServers": {
"usda-mcp-server": {
"httpUrl": "https://usda.caseyjhand.com/mcp"
}
}
}[mcp_servers.usda-mcp-server]
url = "https://usda.caseyjhand.com/mcp"Citer cette source
Vous rédigez un article ou un comparatif ? Cette fiche distingue les informations du registre et nos mesures. Citez le lien permanent et la date du test ; un résultat OK ne constitue pas un audit de sécurité ni une garantie de disponibilité.
usda-mcp-server · L’Atlas · Test du
[usda-mcp-server — L’Atlas](https://latlas.dev/mcp/io.github.cyanheads/usda-mcp-server)Source : Registre officiel MCP · relevé le 1 déc. 2026. L’Atlas n’ajoute aucune donnée qui ne vienne de cette source ou de ses propres tests.