# Recipe Substitution Cost Comparator MCP. AI Agent Connect

> Recipe Substitution Cost Comparator handles the math behind ingredient changes. It lets your AI client calculate new quantities, check if a replacement fits your budget, verify allergen safety, and predict how a swap changes the total recipe yield.

## Overview
- **Category:** nutrition
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_nrsIuDuqVQydaAtjXfTQIVDzmQxfR7VvLNu7amol/ai-agent-connect
- **Tags:** recipe, substitution, cost, allergens, cooking-assistant

## Description

When you need to swap an ingredient in a recipe, you aren't just changing a name on a list. You're changing the cost, the volume, and the dietary profile of the dish. This MCP gives your agent the math it needs to make those decisions accurately. Instead of guessing how much almond flour you need to replace wheat, or if a cheaper oil will break your budget, you can get exact answers. You can run a single analysis to see how one item performs, or rank multiple options at once to find the best value. It also keeps things safe by checking replacements against your specific allergen requirements. If you're worried about changing the total amount of food produced, the tool calculates how the new volume or weight affects your final serving count. It turns recipe modification from a guessing game into a precise calculation.

## Tools

### calculate_yield_adjustment
This tool determines how much the total volume or weight of a recipe changes after you swap an ingredient.

### compare_multiple_substitutions
This tool ranks several potential ingredient replacements to find the best balance of cost and safety.

### validate_allergen_profile
This tool checks if a specific ingredient contains any prohibited allergens from your provided list.

### get_substitution_analysis
This tool evaluates a single replacement to find the necessary quantity, total cost, and dietary impact.

## Prompt Examples

**Prompt:** 
```
I want to replace 200g of butter with margarine. Margarine costs 0.05 per gram and I have 500g in stock. The conversion ratio is 1.1. How much will it cost and is it available?
```

**Response:** 
```
You will need 220g of margarine, which will cost 11.00. The required quantity is available in your stock.
```

**Prompt:** 
```
Compare replacing 100g of flour with almond flour (0.1/g, 50g stock, 1.2 ratio) vs cornstarch (0.02/g, 100g stock, 1.0 ratio).
```

**Response:** 
```
The best option is cornstarch. It is the cheapest option at 2.00 and is fully available.
```

**Prompt:** 
```
If I replace 500ml of milk with 400ml of coconut milk for a recipe that serves 4, how many servings will I get?
```

**Response:** 
```
The adjusted serving count is 3.2 servings.
```

## Capabilities

### Cost Analysis
Your agent calculates the price difference between original and replacement ingredients.

### Allergen Verification
The tool checks ingredient profiles against a list of prohibited allergens.

### Yield Prediction
Your agent determines how a substitution changes the total weight or volume of the dish.

### Inventory Check
The tool verifies if you have enough of a replacement ingredient in stock.

### Multi-Option Ranking
Your agent compares several different substitutes to find the most efficient choice.

## Use Cases

### Budget Optimization
Find the cheapest way to replace an expensive ingredient without ruining the recipe.

### Dietary Compliance
Ensure a new ingredient doesn't introduce allergens to a sensitive recipe.

### Scaling and Yield
Adjust serving counts when a substitute changes the total weight of the batch.

### Inventory Management
Check if a planned substitution is actually possible with current stock levels.

## Benefits

- Calculates exact quantities based on conversion ratios.
- Identifies the cheapest replacement options from a list.
- Prevents allergen errors by validating ingredient profiles.
- Predicts changes in serving sizes based on volume shifts.

## How It Works

Connect the MCP to your AI client to start running ingredient math immediately.

1. Connect your preferred client like Claude or Cursor to Vinkius.
2. Provide your ingredient details and conversion ratios to your agent.
3. Ask the agent to compare costs, check allergens, or calculate yield.
4. Receive precise data on quantities, prices, and safety.

## Frequently Asked Questions

**How does this MCP handle ingredient conversions?**
It uses specific conversion ratios provided in the prompt to calculate the exact quantity needed for a substitution.

**Can I use this with Claude or Cursor?**
Yes, you can connect this MCP to any compatible client including Claude, Cursor, and Windsurf.

**Will it tell me if a substitution is safe for someone with allergies?**
Yes, the validate_allergen_profile tool checks ingredients against a list of prohibited allergens you provide.

**Does it account for the cost of ingredients?**
Yes, it can calculate the total cost of a replacement and rank multiple options by price.

**How does it handle changes in recipe volume?**
The calculate_yield_adjustment tool determines how much the total weight or volume changes due to the swap.

**How does the tool handle different ingredient ratios?**
The `get_substitution_analysis` tool uses a conversion ratio to calculate the exact amount of the replacement ingredient needed to match the original recipe's requirements.

**Can I compare multiple ingredients at once?**
Yes, use `compare_multiple_substitutions` to provide a list of options. The tool will rank them based on cost, safety, and availability.

**How are allergens checked?**
The `validate_allergen_profile` tool checks ingredients against a provided list of prohibited allergens to ensure dietary safety.
