# Nutritional Estimator MCP

> Nutritional Estimator calculates total and per-serving macro and calorie counts for any recipe. It takes ingredient weights and uses standardized nutrient data to give you precise breakdowns of protein, fat, carbs, and fiber, whether you're developing a new menu or balancing macros for a client.

## Overview
- **Category:** health
- **Price:** Free
- **Tags:** macros, calories, recipe, dietary, nutrition-calculator

## Description

Need to know the exact nutrition breakdown of a complex dish? This MCP lets your agent transform raw ingredients into usable nutritional reports. You provide weights—say, 200 grams of chicken breast and 150 grams of rice—and it handles all the math. Instead of cross-referencing multiple databases or wrestling with spreadsheets, the tool aggregates total calories, proteins, fats, carbs, and fiber for a full batch or for single servings. This works because it taps into a local database of nutrient densities, keeping your data reliable. If you're building an application that needs to process food science data, Vinkius makes this MCP available right in your workflow so your AI client can access the calculation power instantly.

## Tools

### compute_recipe_nutrition
Calculates the total nutrition and per-serving breakdown for an entire recipe based on provided weights.

### get_ingredient_details
Retrieves the specific nutritional profile, including calories and macros, for a single listed ingredient.

### search_ingredients
Searches the nutrient database by name or keyword to return a list of matching ingredients available in the registry.

## Prompt Examples

**Prompt:** 
```
Find me some ingredients that contain 'apple'.
```

**Response:** 
```
I found the following matches: Apple (ID: apple_01), Green Apple (ID: green_apple_02), and Apple Juice (ID: apple_juice_03).
```

**Prompt:** 
```
What are the nutritional details for ingredient 'chicken_breast'?
```

**Response:** 
```
For 100g of chicken breast, the nutrition profile is: 165 calories, 31g protein, 3.6g fat, 0g carbs, and 0g fiber.
```

**Prompt:** 
```
Calculate the nutrition for a recipe with 200g of chicken_breast and 100g of rice, serving 2 people.
```

**Response:** 
```
The total recipe contains 430 calories, 65g protein, 7.2g fat, and 78g carbs. Each of the 2 servings provides 215 calories, 32.5g protein, 3.6g fat, and 39g carbs.
```

## Capabilities

### Identify ingredients
Search the nutrient database by name or keyword to find potential components for a recipe.

### View ingredient data
Pull up the full nutritional profile, including macros and calories, for any specific item in the registry.

### Calculate total nutrition
Perform complex calculations to determine the combined macro and calorie content of a weighted recipe batch or portion.

## Use Cases

### Developing a new macro-friendly meal plan
A dietitian needs to build a 500-calorie lunch for a client using chicken, quinoa, and mixed greens. They ask their agent, which then uses `search_ingredients` first. It gathers the necessary details via `get_ingredient_details`, finally running `compute_recipe_nutrition` to give them the precise macro totals needed.

### Scaling a corporate cafeteria menu item
A food developer has a recipe that serves 10 people, but needs to adjust it for single-serving meal kits. They input all weights into `compute_recipe_nutrition`, and the tool immediately provides the precise per-serving nutrient breakdown.

### Checking nutritional feasibility
A client says they can't eat anything with high fiber content. The agent uses `search_ingredients` to pull a list of potential replacement items, then runs `get_ingredient_details` on those matches to filter out high-fiber options before the chef even starts cooking.

## Benefits

- Stop manually cross-referencing nutrient databases. Using `get_ingredient_details` lets your agent pull the exact macro and calorie data for any item, ensuring accuracy right out of the gate.
- Get a complete picture of a recipe's nutritional content without leaving your workflow. The tool handles complex scaling calculations via `compute_recipe_nutrition`, giving you both total and per-serving counts.
- If you just need to know if an ingredient exists or what it’s called, use `search_ingredients`. This prevents unnecessary data calls when you're simply listing components for a menu.
- Eliminate spreadsheet errors. By letting the MCP handle the math using weights and standardized densities, you get reliable totals every time.
- Speed up product development. You can test multiple recipe variations in minutes, getting immediate feedback on protein, fat, and carb balance.

## How It Works

The bottom line is that it turns disparate pieces of data (ingredients) into one clean calculation (the final nutrition panel).

1. First, you use your agent to find items in the registry using `search_ingredients` if you don't know the exact ID.
2. Next, you pull specific nutritional data for those ingredients using `get_ingredient_details` to confirm nutrient profiles and standards.
3. Finally, you feed all the weights and details into `compute_recipe_nutrition` to get a single report with total and per-serving counts.

## Frequently Asked Questions

**How does the nutritional calculation work?**
The system uses a 100g reference standard. It scales the nutrient values of each ingredient by its weight in grams relative to that 100g base, then sums all contributions for the total recipe and divides by the number of servings for per-portion data.

**Can I search for ingredients by partial names?**
Yes, the `search_ingredients` tool performs a case-insensitive search that matches any part of the ingredient name in the local database.

**What happens if an ingredient ID is not found?**
If you provide an invalid or non-existent ID to `get_ingredient_details` or `compute_recipe_nutrition`, the tool will return a failure status with a descriptive error message.

**When using `compute_recipe_nutrition`, must I provide weights in grams?**
Yes, you must provide ingredient masses by weight. The MCP requires all input measurements to be standardized in grams (g) because the underlying nutrient database uses 100g as its base unit for density calculations.

**What specific nutritional data does `get_ingredient_details` return?**
It returns a full profile of macronutrients, including calories, protein grams, fat grams, carbohydrates grams, and fiber grams. This gives you the complete picture needed to plan meals or check dietary requirements.

**Can `search_ingredients` filter results by specific food categories?**
The search function allows filtering beyond just keywords. You can narrow down your ingredient list by specifying category types, ensuring you only retrieve items like 'Grains' or 'Dairy'.

**How does `compute_recipe_nutrition` handle the serving size calculation?**
The tool takes a total yield weight and the desired number of servings. It then accurately divides the calculated total nutrition, providing precise per-serving metrics for you to use.

**Are there any usage limits or rate restrictions when calling `compute_recipe_nutrition`?**
The platform manages typical rate limiting automatically to ensure stable performance. If you exceed a high volume of complex calculations rapidly, your agent will receive an appropriate request limit error.