# Recipe Batch Constraint Solver AI Agent Connect

> Recipe Batch Constraint Solver MCP handles the math behind production planning. It finds valid batch combinations by checking your target portions against vessel capacities, minimum and maximum batch sizes, and current ingredient inventory. Your AI client uses these tools to ensure each production run is physically possible and fully stocked.

## Overview
- **Category:** logistics
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_FKY8U1TXnhcUUT9P7J5KM8WpBkHNYnmabfjHc5PH/ai-agent-connect
- **Tags:** production, batch-planning, inventory, constraints, recipe-management

## Description

You can stop manually calculating batch sizes and checking ingredient levels. This MCP handles the heavy lifting of production planning by solving for constraints that usually break a manual plan. When you need to hit a specific production target, the MCP looks at your vessel capacities and ingredient stock to find a set of batches that actually works. It prevents you from planning a run that exceeds your equipment limits or runs you out of flour halfway through. You can verify if a single batch size is mathematically sound or run a full analysis on how efficient your production plan is compared to your actual demand. It's a direct way to turn production targets into actionable, validated batch lists.

## Tools

### calculate_yield_metrics
This tool measures how well your production plan hits your target demand. It compares planned output against actual yield to find deviations.

### get_ingredient_availability
This tool tracks your remaining stock. It calculates exactly how much of an ingredient is left after you account for a specific set of batches.

### solve_batch_combinations
This tool finds a valid set of batches to meet your portion targets. It respects all physical equipment limits and current inventory levels.

### validate_single_batch
This tool checks if one specific batch size is possible. It verifies the quantity against your recipe requirements and vessel capacity.

## Prompt Examples

**Prompt:** 
```
Find a batch combination for 500 units with a yield factor of 1.2, vessel capacity of 200, min batch of 50, max batch of 250, waste tolerance of 0.05, and stock: {'flour': 1000, 'sugar': 500} with requirements: {'flour': 2, 'sugar': 1}.
```

**Response:** 
```
The selected batches are: Batch 1 (200 units), Batch 2 (200 units), Batch 3 (100 units). Total yield is 500 units. Unused stock: {'flour': 0, 'sugar': 0}. Yield deviation: 0%.
```

**Prompt:** 
```
Is a batch of 300 units valid for a vessel with 250 capacity?
```

**Response:** 
```
No, the batch is invalid because the proposed size exceeds the vessel capacity.
```

**Prompt:** 
```
Calculate the yield metrics for a target of 100 units with an actual yield of 105 units and a waste tolerance of 0.10.
```

**Response:** 
```
The deviation is 5.0%, which is within the allowed tolerance. The surplus amount is 5 units.
```

## Capabilities

### Batch Combination Solving
Your agent finds sets of batches that meet demand without exceeding equipment limits.

### Inventory Verification
Your agent checks if you have enough ingredients to complete a proposed production run.

### Capacity Validation
Your client confirms if a specific batch size fits within your vessel constraints.

### Efficiency Analysis
The tool calculates yield deviations to see how close you are to your production targets.

## Use Cases

### Daily Production Scheduling
Generate a list of batches that meet a daily order volume using available equipment.

### Stock Impact Analysis
Determine if current flour and sugar levels can support a large production run.

### Equipment Constraint Checking
Verify that a requested batch size won't exceed the maximum capacity of a specific vessel.

### Yield Monitoring
Compare actual production results against targets to monitor waste and efficiency.

## Benefits

- Prevents overfilling vessels by enforcing capacity constraints during planning.
- Avoids production delays by checking ingredient availability before batches are scheduled.
- Reduces manual math errors by automating batch combination calculations.
- Identifies yield deviations to keep production within waste tolerances.

## How It Works

You connect the MCP to your AI client and start providing production parameters.

1. Connect your AI client to the Vinkius hosted MCP.
2. Provide your target portions, vessel capacities, and current stock levels.
3. Your agent uses the solver tools to calculate valid batch combinations.
4. Review the resulting batch list and ingredient usage reports.

## Frequently Asked Questions

**How does this MCP handle equipment limits?**
The solver tool checks each batch combination against your defined vessel capacity and minimum/maximum batch size constraints to ensure they are physically possible.

**Can I check if I have enough ingredients for a run?**
Yes, the get_ingredient_availability tool calculates how much stock will be left after your proposed batches are completed.

**What AI clients can use this MCP?**
You can use this MCP with any compatible client like Claude, Cursor, Windsurf, or VS Code.

**Does it help with waste management?**
Yes, you can use the calculate_yield_metrics tool to analyze production efficiency and ensure deviations stay within your waste tolerance.

**Do I need to host the MCP myself?**
No, Vinkius hosts and manages the MCP for you. You connect your client and start using the tools.

**How does the solver handle ingredient shortages?**
The `solve_batch_combinations` tool identifies if any ingredient stock is insufficient and returns a list of rejected options with the specific reason for failure.

**Can I check if a specific batch size is valid?**
Yes, you can use the `validate_single_batch` tool to verify if a proposed quantity respects vessel capacity, batch size limits, and available stock.

**What is waste tolerance?**
Waste tolerance is the maximum allowable percentage of over-production relative to your target portions, allowing for slight deviations in yield.
