usda-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_foodsA | List foods from the database, with derived calories, optionally filtered. Args:
category: Restrict to one category. Must be exactly one of "proteins",
"carbs", "fats", "vegetables". Omit to search every category.
tags: Keep a food if it carries AT LEAST ONE of these tags (an OR match, not
AND). Tags are descriptive, e.g. "lean", "whole_food", "high_protein".
Call list_available_tags for the complete real vocabulary.
exclude_tags: Drop a food if ANY of these appear in its "exclude_for" field.
These are dietary and allergen labels, e.g. "vegan", "gluten", "dairy",
"shellfish" -- NOT the same vocabulary as Returns:
{"count": int, "foods": [...]} where each food carries name, category, unit,
pro, carb, fat, tags, exclude_for and a derived calories_per_unit. Macro
values are per ONE of the food's own |
| get_foodA | Look up a single food by name and return its full entry with derived calories. Matching is case-insensitive and tolerant: "chicken breast" resolves "Chicken Breast (Cooked)". A loose match is only accepted when it identifies exactly one food -- "cottage cheese" matches three different products, so it is reported as not-found WITH those three as suggestions rather than guessing. Args: name: The food name, e.g. "Salmon", "greek yogurt (0% fat)", "Whole Egg". Returns:
The full entry: name, category, unit, pro, carb, fat, tags, exclude_for,
calories_per_unit. All macro figures are per ONE |
| calculate_macrosA | Calculate exact macros and calories for a specific portion of one food. All arithmetic happens in Python. Do not compute these numbers yourself. Args:
name: The food name. Resolved the same way as get_food.
amount: How much of the food, as a number, e.g. 150 or 2.5.
unit: The unit Returns: {"food", "amount", "unit", "protein_g", "carb_g", "fat_g", "calories", ...} with calories derived as protein4 + carb4 + fat*9. |
| filter_by_dietA | List every food compatible with one dietary restriction or allergy. A convenience wrapper over list_foods that excludes any food whose "exclude_for"
field contains Args: diet_type: A single dietary or allergen label, e.g. "vegan", "vegetarian", "gluten", "dairy", "shellfish", "nuts", "soy". This must be a value that actually occurs in the data -- call list_available_tags to see the full list. A plausible-sounding but absent label such as "keto" excludes nothing and would silently return the entire database, so unknown labels are rejected instead. Returns: {"diet_type", "count", "foods": [...]} across all four categories, each food carrying calories_per_unit. |
| build_mealA | Build meals of one protein, one carb and one fat that hit macro targets exactly. A deterministic solver, not a guess: it treats the three foods as a 3x3 linear system and solves for the portion of each, scanning every combination in the database. Results whose portions are exact but unrealistic are discarded, and the remainder ranked by how normal the serving sizes look. Args: target_protein: Target grams of protein for the meal. target_carb: Target grams of carbohydrate. target_fat: Target grams of fat. exclude_tags: Dietary and allergen labels to avoid, matched against each food's "exclude_for", e.g. ["vegan"] or ["gluten", "dairy"]. Call list_available_tags for valid values. tolerance: Only consulted when NO exact fit exists, to decide whether the closest attempt counts as near enough. 0.15 means +/-15% per macro. include_vegetable: Add a low-calorie vegetable side. Its macros are subtracted from the targets before solving, so the totals still land on the targets exactly. max_results: How many ranked meals to return (default 3). Returns: {"exact_match", "within_tolerance", "tolerance", "meals": [...], "targets", "candidates_evaluated", "message"}. |
| list_available_tagsA | Return the real filter vocabulary present in the database. Computed from the data at call time, never hardcoded. Call this before using
Returns: {"tags": [...], "exclude_for": [...], "categories": [...], "units": [...]}. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Asquarer02/usda-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server