Nutrition MCP connector

The Nutrition connector answers food and meal questions from a local copy of USDA FoodData Central, about 600,000 foods with macro and micronutrient data. It is read-only and has no account or sign-in.

Connecting

Server URL: https://docuslide-mcp-production.up.railway.app/mcp (streamable HTTP).

Tools and parameters

Every tool reads data only, except the three profile tools, which change a profile held in memory for the current conversation. Weights are in grams and nutrients are scaled to the requested serving.

ToolWhat it returnsParameters
search_foodsFoods matching a name, with fdc_id, dataset, macros per 100 g, and the branded ingredient statement. query, limit (1-50, default 10), data_type, offset
get_food_nutritionFull nutrients for one food at a serving weight, an assessment against daily targets, and common portion sizes. fdc_id, grams (default 100)
compare_foodsUp to 10 foods side by side, with the leader for each nutrient. fdc_ids (1-10), grams
analyze_mealTotals for up to 25 foods, with shortfalls and exceeded limits. items: list of fdc_id and grams
find_foods_by_nutrientLab-measured foods ranked by one nutrient per 100 g. Branded products are included only when data_type is Branded, and amounts that cannot physically fit in 100 g are left out. nutrient, limit (1-100, default 20), data_type, min_amount, category, offset
resolve_ingredientsIngredient names matched to foods and portions such as 1 cup converted to grams. items: list of food or fdc_id, with portion or grams (up to 400)
analyze_recipeOne dish totaled from its ingredients and reported per serving. name, ingredients, servings (default 1)
analyze_planA meal plan of up to 14 days assessed as a daily average, with a shopping list. days, include_shopping_list (default true), detail (default false)
set_profileStores age and sex for the conversation so assessments use U.S. dietary reference intakes. age, sex, life_stage, weight_kg, height_cm, activity
get_profileThe profile in effect and its daily targets.none
clear_profileDeletes the conversation's profile.none
database_statusWhether the food database is built and how many foods it holds.none
list_retailersConfigured retailers and what each supports. All are product-link only.none
prepare_retailer_handoffExact product links for the user to open on a retailer's site. No cart is changed and nothing is bought. retailer_id, original_request, items (1-50), store_id

Pagination. search_foods and find_foods_by_nutrient return a pagination object with offset, limit, returned, and next_offset. Passing next_offset back as offset returns the next page; it is null on the last page.

Assessments. Without a profile, totals are compared with the FDA food-label daily values (basis: fda_label_dv). With one, they are compared with the U.S. dietary reference intake for that age and sex (basis: personal_dri). not_reported nutrients are unknown, not zero.

Examples

Troubleshooting

Privacy

Food lookups are answered from the local database and are not sent to USDA. A profile stays in process memory for one conversation and is never written to disk. There are no accounts. The full privacy policy covers what the host logs.

Support

Email vangilder.andrew@gmail.com or open an issue on GitHub. The support page has details.

Results are comparisons with published reference values, not a diagnosis, a prescription, or medical advice. This is an independent project, not produced or endorsed by the U.S. Department of Agriculture.