# Ingredient Substitution Engine MCP

> Ingredient Substitution Engine finds dietary alternatives while checking flavor risk. Need a vegan option for dairy milk? This MCP searches compatible ingredients, analyzes how that change will affect the dish's texture and taste, and verifies it meets all required restrictions like gluten-free or lactose-free.

## Overview
- **Category:** nutrition
- **Price:** Free
- **Tags:** vegan, gluten-free, lactose-free, low-carb, cooking-assistant

## Description

Recipe development running into dietary walls is a massive time sink. You can’t just swap things out; you have to know if the replacement works chemically, flavor-wise, and legally for allergens. This MCP handles that complexity. Your agent consults ingredient databases to find alternatives—for constraints like Vegan or GlutenFree—and then does more than just check the box. It runs deep checks to see how replacing wheat flour with almond flour will change the overall feel of your bread. You'll also use Vinkius, our catalog, which connects this engine to everything else you need, so you don't have to jump between five different compliance tools. The system gives you a full risk assessment, making sure every single substitute is safe and functional for your final product.

## Tools

### analyze_substitution_impact
Predicts how swapping one ingredient for another will affect the dish’s flavor and texture.

### search_substitutes
Finds compatible ingredients when you have a specific dietary restriction, like vegan or gluten-free.

### verify_restriction_compatibility
Checks if any chosen substitute meets every single required dietary rule without introducing new risks.

## Prompt Examples

**Prompt:** 
```
I need a vegan substitute for milk. What are my options?
```

**Response:** 
```
You can use soy milk, almond milk, or oat milk as substitutes for dairy milk in a vegan recipe.
```

**Prompt:** 
```
If I replace wheat flour with almond flour, how will it affect the texture?
```

**Response:** 
```
Replacing wheat flour with almond flour will change the texture from elastic and chewy to more gritty and crumbly.
```

**Prompt:** 
```
Is cashew butter safe for a recipe that must be both GlutenFree and LactoseFree?
```

**Response:** 
```
Yes, cashew butter is safe as it does not contain gluten or lactose.
```

## Capabilities

### Find dietary alternatives
It searches ingredient databases to pull compatible swaps based on specific restrictions like LactoseFree or low-carb.

### Assess flavor and texture risk
The engine predicts how a replacement ingredient will alter the sensory experience of your recipe, noting changes in grit, chewiness, and overall taste.

### Validate allergen safety
It cross-checks any proposed substitute against complex dietary rules to guarantee no new allergens or violations are introduced into the final mix.

## Use Cases

### Creating a kid’s low-carb snack
A client needs a low-carb cookie, but the original recipe uses high-sugar fillers. The agent first calls `search_substitutes` to find compatible sweeteners, then uses `analyze_substitution_impact` to make sure the texture doesn't become too gritty for kids.

### Developing a gluten-free bread line
The baker swaps out wheat flour. Instead of guessing, they use `search_substitutes` and then `verify_restriction_compatibility` to confirm the new mix is 100% safe for celiac customers.

### Veganizing a classic dessert
A recipe requires heavy cream. The agent finds vegan alternatives using `search_substitutes`, then uses `analyze_substitution_impact` to ensure the final whipped topping still tastes rich, not watery.

### Addressing multiple severe allergies
You need a dish that is simultaneously LactoseFree and Nut-Free. The agent runs all potential substitutes through `verify_restriction_compatibility` to guarantee both safety rules are met instantly.

## Benefits

- Don't guess what works. Use `search_substitutes` to get a vetted list of options for constraints like Vegan or GlutenFree immediately.
- Stop losing product ideas because of texture changes. The MCP runs an impact analysis to predict how swapping flour types will change the final bite, using `analyze_substitution_impact`.
- Stay ahead of allergen risk. Instead of manually checking labels, use `verify_restriction_compatibility` to guarantee zero dietary violations in your recipes.
- Save hours on compliance audits. This MCP handles the complex cross-referencing needed when you swap out a core ingredient.
- Maintain flavor integrity. The engine doesn't just find *a* substitute; it finds one that minimizes negative sensory impact.

## How It Works

The bottom line is that instead of doing three separate database lookups, your agent performs them all in one sequence.

1. Tell your agent what ingredient needs replacing and what dietary restriction you're working with.
2. The MCP first finds a list of potential swaps, then runs those options through impact analysis to predict flavor changes.
3. Finally, it verifies the best option against all listed restrictions, giving you a clear 'safe' confirmation.

## Frequently Asked Questions

**What is `analyze_substitution_impact` used for?**
It predicts how swapping one food item changes the sensory feel of your dish—things like making it chewier or more crumbly. This keeps your recipes tasting right, even after a big swap.

**How do I use `search_substitutes`?**
You provide an ingredient and the restriction (e.g., 'milk' for LactoseFree). The tool finds several compatible options you can use in your recipe.

**`verify_restriction_compatibility` checks what?**
It acts as a final safety net, confirming that any chosen substitute meets all specified rules—like being both Vegan and GlutenFree—and doesn't introduce new allergens.

**Can this MCP handle multiple restrictions at once?**
Yes. You can input several constraints (e.g., low-carb, nut-free, lactose-free), and the tools will only suggest substitutes that meet every single rule you list.

**How does the `search_substitutes` command handle conflicting or vague dietary constraints?**
The tool returns a specific error message when inputs contradict each other. It flags impossible combinations, telling you exactly which restrictions conflict and why the substitution cannot be made.

**What data does the `analyze_substitution_impact` tool provide regarding usage ratios?**
It gives specific ratio guidance for successful replacements. The analysis includes suggested proportions needed to maintain optimal texture and structural integrity in your finished dish.

**Does the output of `verify_restriction_compatibility` include common allergen warnings?**
Yes, it checks against major allergens. The result details if a chosen substitute introduces new or previously unforeseen dietary hazards into the recipe.

**Is there an optimal way to use the `search_substitutes` tool for large ingredient lists?**
The system handles batch processing efficiently. For best performance, group similar ingredients together in a single request rather than running many individual searches.