usda-mcp-server
Server Details
Search foods, compare nutrients, and look up the full USDA FoodData Central database.
- Status
- Healthy
- Last Tested
- Transport
- Streamable HTTP
- URL
- Repository
- cyanheads/usda-mcp-server
- GitHub Stars
- 1
- Server Listing
- usda-mcp-server
Glama MCP Gateway
Connect through Glama MCP Gateway for full control over tool access and complete visibility into every call.
Full call logging
Every tool call is logged with complete inputs and outputs, so you can debug issues and audit what your agents are doing.
Tool access control
Enable or disable individual tools per connector, so you decide what your agents can and cannot do.
Managed credentials
Glama handles OAuth flows, token storage, and automatic rotation, so credentials never expire on your clients.
Usage analytics
See which tools your agents call, how often, and when, so you can understand usage patterns and catch anomalies.
Tool Definition Quality
Average 4.6/5 across 5 of 5 tools scored.
Each tool has a clearly distinct purpose: search for foods, retrieve single or batch nutrient profiles, compare foods side-by-side, and look up nutrient reference data. The descriptions explicitly cross-reference when to use which tool, eliminating ambiguity.
All tool names follow a consistent 'usda_<verb>_<noun>' pattern, with verbs like search, get, get, list, compare. Plural/singular usage correctly reflects whether the tool handles one or many items, and the naming is predictable and readable.
Five tools is well-scoped for a USDA food data server, covering search, retrieval (single and batch), comparison, and nutrient metadata lookup. Each tool earning its place with no redundancy or bloat.
The tool set fully covers the domain of querying USDA FoodData Central: discovery via search, detailed retrieval via get_food/get_foods, comparison via compare_foods, and reference data via list_nutrients. No obvious gaps exist for read-only access.
Available Tools
5 toolsusda_compare_foodsCompare USDA FoodsARead-onlyInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | Unit for quantity. Default "g". Does not support "serving" (use a fixed gram basis for consistent comparison). | g |
| fdcIds | Yes | FDC IDs to compare — 2 to 5 foods. Use usda_search_foods to discover IDs. | |
| quantity | No | Gram basis for comparison. All values scaled to this amount. Must be positive. Default 100. | |
| nutrients | No | 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. |
Output Schema
| Name | Required | Description |
|---|---|---|
| basis | Yes | The common scaling basis applied to all nutrient values. |
| foods | Yes | The compared foods, in the same order as the values arrays below. |
| nutrients | Yes | Nutrient rows — one entry per requested nutrient, with per-food values in the values[] array. |
| missingData | No | Foods or food+nutrient pairs where data was unavailable. Absent when all data was present. |
Tool Definition Quality
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Besides the readOnlyHint annotation, the description discloses that output is a structured markdown table, that all values scale to a gram basis, that missing FDC IDs are silently skipped, and that only too_few_foods is thrown when fewer than 2 are valid. This goes well beyond the annotations and adds useful behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four sentences, each with a distinct purpose: main function, output format, use cases, defaults and error handling. It is front-loaded with the primary verb and avoids any wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that an output schema exists, the description still covers return format, scaling, default nutrients, error behavior, and references to sibling tools. The description is self-sufficient for a complex comparison tool, with no significant gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already provides 100% coverage with detailed descriptions for every parameter, including the default nutrient list and the unit limitation. The description reinforces these (e.g., 'Omit nutrients[] to use defaults') but does not add substantial new information beyond what the schema already states.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with 'Compare nutrients side-by-side for 2–5 foods', a specific verb and resource scope. It further distinguishes from siblings by giving usage examples like 'spinach vs kale iron' and clarifies it is a comparison tool, not a retrieval (get) or search tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says 'Best for' use cases, which indicates when to use. It also directs users to 'usda_search_foods to discover IDs' and 'usda_list_nutrients to look up other IDs', naming alternatives and providing actionable guidance for related tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
usda_get_foodGet USDA FoodARead-onlyInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | Unit for quantity. "serving" uses the food's first defined portion weight. Required when quantity is provided. | |
| fdcId | Yes | FDC ID of the food. Use usda_search_foods to discover IDs. | |
| quantity | No | 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 | No | 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. |
Output Schema
| Name | Required | Description |
|---|---|---|
| fdcId | Yes | FDC ID of the food. |
| dataType | Yes | FDC data source: SR Legacy, Foundation, Survey (FNDDS), or Branded. |
| scaledTo | No | Scaling basis when quantity+unit were provided. Absent when returning per-100g values. |
| brandName | No | Brand name. Branded items only. |
| nutrients | Yes | Nutrient values for this food, per 100g or scaled to the requested quantity. |
| brandOwner | No | Brand owner. Branded items only. |
| allPortions | No | All named portions for this food. |
| description | Yes | Full USDA food name (e.g. "Chicken, broilers or fryers, breast, meat only, raw"). |
| ingredients | No | Ingredient list from label. Branded items only. |
| servingInfo | No | First available portion definition, if present. |
| foodCategory | No | USDA food category (e.g. "Poultry Products"). Absent for some branded items. |
| publicationDate | No | Date this food entry was published in FDC. |
Tool Definition Quality
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the readOnlyHint annotation, the description explains key behaviors: per-100g default, optional scaling to specified portions, serving-weight interpretation, and nutrient filtering. It also clarifies the output as scaled nutrient values without contradictions to the annotation, adding substantial transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise yet comprehensive, front-loading the main purpose and then layering usage details. Each sentence adds value: ID discovery, scaling examples, and optimization tip. No wasted words or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 4 parameters and complex scaling/filtering behavior, the description covers all essential aspects: what is returned, how to scale portions, how to filter nutrients, and how to find IDs. The presence of an output schema and read-only annotation further complete the picture, so the description is fully adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already provides detailed descriptions for all parameters (100% coverage). The description adds a concrete example (quantity=200, unit='g') and explains the 'serving' unit's meaning, enriching the parameter semantics beyond the schema. However, much of what it says repeats schema content, so it does not fully transcend the baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool gets the full nutrient profile for one food by FDC ID, using a specific verb and resource. It distinguishes from siblings by emphasizing 'one food' and referencing usda_search_foods for ID discovery, setting it apart from get_foods or compare_foods.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly instructs to use usda_search_foods for discovering FDC IDs, which is a clear prerequisite. It also provides guidance on using nutrients[] to reduce response size and scaling via quantity/unit, though it does not explicitly contrast with usda_get_foods for multiple foods or compare_foods for comparisons. Overall, good practical guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
usda_get_foodsGet USDA Foods (Batch)ARead-onlyInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| fdcIds | Yes | FDC IDs to fetch — 2 to 20 IDs. Use usda_search_foods to discover IDs. | |
| nutrients | No | 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. |
Output Schema
| Name | Required | Description |
|---|---|---|
| foods | Yes | Successfully fetched foods. |
| failed | Yes | IDs that returned no data. Check these with usda_search_foods to verify they exist. |
Tool Definition Quality
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, and the description adds meaningful behavioral details: per-100g units, no portion scaling, and failed IDs reported in failed[] rather than aborting the batch. This provides valuable context beyond the structured annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is four sentences, each with a distinct purpose: main function, efficiency rationale, unit caveat, and error handling. It is front-loaded and avoids redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With an output schema present and only two parameters, the description covers batch behavior, failure handling, and units, making it sufficient for an agent to invoke correctly. It also names related tools for alternative use cases.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Both parameters have descriptions in the schema (fdcIds and nutrients), so schema coverage is 100%. The description reinforces the recommendation to use nutrients[] but doesn't add new parameter-level semantics beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description states 'Fetch nutrient profiles for 2–20 foods in a single API call,' providing a specific verb, resource, and batch scope. It also distinguishes from siblings by mentioning usda_compare_foods and usda_get_food.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly notes this is more efficient than calling usda_get_food N times and names usda_compare_foods as the alternative for side-by-side tables. Also recommends using the nutrients[] filter, giving clear context for when to use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
usda_list_nutrientsList USDA NutrientsARead-onlyInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | Filter to a nutrient category. Omit to return all ~150 tracked nutrients. Options: macronutrients, vitamins, minerals, lipids, amino_acids, other. |
Output Schema
| Name | Required | Description |
|---|---|---|
| nutrients | Yes | Nutrient reference entries matching the requested category, or all if category is omitted. |
Tool Definition Quality
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate read-only and closed world. The description adds valuable behavioral context beyond annotations: the data is static, so it can be called once and cached. This goes beyond what annotations provide and helps the agent plan efficient usage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, each earning its place: first defines the tool's output, second gives a concrete use case, third provides a performance-relevant tip. No filler, front-loaded with the core purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with one optional parameter, output schema, and readOnly annotation, the description fully covers purpose, usage, and static nature. There is nothing missing for an agent to select and invoke this tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with a detailed enum and description. The description repeats the 'filter by category' behavior and adds 'narrow results,' but adds little new meaning beyond the well-documented parameter. Baseline of 3 is appropriate for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb+resource: 'Look up the FDC nutrient reference table' and enumerates exactly what it returns (IDs, names, SR reference numbers, units, categories). It clearly distinguishes itself from sibling food-search tools by focusing on the nutrient reference table.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use: 'resolve a nutrient name to its FDC ID before passing it to the nutrients[] filter on other tools.' Also explains the optional category filter and advises reuse due to static data, giving clear usage context without needing to name alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
usda_search_foodsSearch USDA FoodsARead-onlyInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search terms — food name, ingredient, or UPC/GTIN code for branded products. Examples: "chicken breast raw", "banana", "012345678901". | |
| dataType | No | 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 | No | Number of results per page. Default 10, maximum 50. | |
| brandOwner | No | 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 | No | Page number (1-based). Use with totalPages to paginate. | |
| foodCategory | No | Filter by USDA food category (e.g. "Poultry Products", "Vegetables and Vegetable Products"). Case-sensitive. |
Output Schema
| Name | Required | Description |
|---|---|---|
| foods | Yes | Foods matching the search query. |
| totalHits | Yes | Total number of foods matching the query across all pages. |
| totalCount | Yes | Total foods matching the query across all pages. |
| totalPages | Yes | Total number of pages available. |
| currentPage | Yes | Current page number (1-based). |
Tool Definition Quality
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations declare readOnlyHint and openWorldHint, and the description adds meaningful nuance: the nutrient preview is "not guaranteed complete," and dataType defaults are conditional on brandOwner. This goes beyond the annotations to reveal behavior that could affect interpretation of results.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is moderately long but every sentence serves a purpose: purpose, return value, sibling links, default behavior, and branded search examples. It is front-loaded and well-organized, though slightly dense for scanning.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With an output schema present, the description focuses on usage scenarios, defaults, and alternatives, which it covers thoroughly. It does not mention pagination behavior but the schema already documents pageSize and pageNumber, so that gap is acceptable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds value by explaining the interplay between dataType and brandOwner, and by mentioning that UPC/GTIN codes can be used as queries for branded products — context not fully present in the schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: "Search USDA FoodData Central foods by keyword." It clearly states what is returned (matching foods with FDC IDs and a nutrient preview) and differentiates from siblings by directing users to usda_get_food for full profiles and usda_compare_foods for comparisons.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit guidance is given for using the returned fdcId with usda_get_food and usda_compare_foods. It also explains when dataType defaults to SR Legacy vs Branded, when to set dataType to Branded, and how brandOwner narrows results — providing clear context for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Claim this connector by publishing a /.well-known/glama.json file on your server's domain with the following structure:
{
"$schema": "https://glama.ai/mcp/schemas/connector.json",
"maintainers": [{ "email": "your-email@example.com" }]
}The email address must match the email associated with your Glama account. Once published, Glama will automatically detect and verify the file within a few minutes.
Control your server's listing on Glama, including description and metadata
Access analytics and receive server usage reports
Get monitoring and health status updates for your server
Feature your server to boost visibility and reach more users
For users:
Full audit trail – every tool call is logged with inputs and outputs for compliance and debugging
Granular tool control – enable or disable individual tools per connector to limit what your AI agents can do
Centralized credential management – store and rotate API keys and OAuth tokens in one place
Change alerts – get notified when a connector changes its schema, adds or removes tools, or updates tool definitions, so nothing breaks silently
For server owners:
Proven adoption – public usage metrics on your listing show real-world traction and build trust with prospective users
Tool-level analytics – see which tools are being used most, helping you prioritize development and documentation
Direct user feedback – users can report issues and suggest improvements through the listing, giving you a channel you would not have otherwise
The connector status is unhealthy when Glama is unable to successfully connect to the server. This can happen for several reasons:
The server is experiencing an outage
The URL of the server is wrong
Credentials required to access the server are missing or invalid
If you are the owner of this MCP connector and would like to make modifications to the listing, including providing test credentials for accessing the server, please contact support@glama.ai.
Discussions
No comments yet. Be the first to start the discussion!
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables natural language access to USDA's FoodData Central database with 1M+ foods, supporting search, nutrition facts, food comparison, and daily value calculations.8MIT
- AlicenseAqualityCmaintenanceEnables searching and retrieving nutrition data from the USDA FoodData Central API, with tools for food search, nutrient lookups, and bulk operations.166MIT
- Flicense-qualityDmaintenanceProvides intelligent access to the USDA nutrition database through AI assistants, enabling users to search foods, compare nutritional content, find foods high in specific nutrients, and query authoritative nutrition data across 7,146+ food items through natural language.1
- Flicense-qualityFmaintenanceA Model Context Protocol server that enables Claude to search and access detailed nutritional information from the USDA's FoodData Central database.11
Your Connectors
Sign in to create a connector for this server.