# Demand Forecast Calculator MCP for AI Agents AI Agent Connect

> Demand Forecast Calculator generates 3-month demand projections using three distinct mathematical models: Simple Moving Average, Weighted Moving Average, and Exponential Smoothing. It doesn't just give you numbers; it performs error backtesting to calculate Mean Absolute Error (MAE) and Mean Absolute Percentage Error (MAPE). This lets you see which model actually fits your historical data best so you can plan your inventory with more confidence.

## Overview
- **Category:** supply-chain
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_sv6aatMHqHyqOR4XjXsLusL61ZUZceGD44vNHlLt/ai-agent-connect
- **Tags:** demand-planning, sma, wma, exponential-smoothing, forecasting-engine

## Description

Planning for next month's inventory or production shouldn't feel like throwing darts at a board. When you have a mountain of historical sales data, you need a way to turn those past numbers into a reliable roadmap for the future. This Connector takes the heavy lifting out of statistical forecasting by letting your AI client run multiple types of demand models simultaneously. Instead of just guessing, you can see how different weighting methods and smoothing techniques react to your specific trends. It even handles the math for error analysis, telling you exactly how far off a specific model's predictions were in the past. This means you can stop arguing about which method is better and start making decisions based on actual performance metrics. You can find this in the Vinkius catalog to get your agent set up with professional-grade supply chain math. It's about moving from I think we'll sell this much to the data shows we'll likely sell this much, with this level of confidence.

## Tools

### analyze_exponential_smoothing
Calculates demand forecasts using Exponential Smoothing to account for recent trends. It helps you see how demand momentum shifts over time.

### analyze_sma
Generates a forecast based on the Simple Moving Average of your historical data points. This provides a steady, balanced baseline.

### analyze_wma
Produces a Weighted Moving Average forecast where you can prioritize specific past periods. It's great for reacting to recent spikes.

## Prompt Examples

**Prompt:** 
```
We sold 50, 60, 70, 80, and 90 units over the last 5 months. What's the 3-month forecast using a simple moving average?
```

**Response:** 
```
Based on your data, here is the 3-month forecast using the Simple Moving Average:

*   **Month 1:** 80
*   **Month 2:** 80
*   **Month 3:** 80

The Mean Absolute Percentage Error (MAPE) for this model is approximately 0%. This suggests a very steady trend, but you might want to check the weighted model if you think the most recent month is more important.
```

**Prompt:** 
```
Run an exponential smoothing forecast for our last 3 months of sales: 100, 120, 140. Use alpha 0.4 and beta 0.2.
```

**Response:** 
```
I've processed that using Exponential Smoothing. Your predicted demand for the next three periods is:

*   **Period 1:** 148
*   **Period 2:** 156
*   **Period 3:** 164

This model is particularly good at reacting to the recent upward trend in your sales.
```

**Prompt:** 
```
I have sales of 50, 60, 70. Use weights of 0.5, 0.3, and 0.2 for a weighted moving average. What's the forecast?
```

**Response:** 
```
Using the Weighted Moving Average with your specified weights, the forecast for the next three months is:

*   **Month 1:** 76
*   **Month 2:** 76
*   **Month 3:** 76

This puts the most weight on your most recent sales data, reflecting a more aggressive growth curve.
```

## Capabilities

### Generate 3-month demand projections
Get a 90-day outlook on your sales based on historical data points.

### Calculate Simple Moving Average forecasts
Create a baseline forecast that treats all past data points with equal importance.

### Run Weighted Moving Average projections
Generate forecasts that prioritize recent sales over older data using custom weights.

### Apply Exponential Smoothing to historical data
Use a smoothing factor to account for recent trends and momentum in your demand.

### Perform error backtesting on models
See how well a model would have performed against your actual past results.

### Calculate Mean Absolute Error (MAE)
Get a raw number representing the average magnitude of your forecast errors.

### Determine Mean Absolute Percentage Error (MAPE)
Get a percentage score to understand the relative accuracy of your demand models.

## Use Cases

### Validating a model for a new product
A manager sees erratic sales for a new item. They ask the agent to run analyze_exponential_smoothing to see if it captures the recent spike better than a simple average.

### Justifying an inventory order
A warehouse head needs to justify a new order. The agent runs analyze_wma with specific weights to show that recent months are the primary drivers of demand.

### Comparing forecast accuracy
A planner wants to know which model to trust. They have the agent run all three tools and compare the MAPE to find the one with the lowest error.

### Quick 90-day outlook for a SKU
A startup needs a quick 3-month outlook. They provide a list of past sales and ask for a forecast using analyze_sma.

## Benefits

- Stop guessing on stock levels by using analyze_sma to get a steady baseline for your upcoming 3-month demand.
- Prioritize recent sales trends over old data by using analyze_wma to give more weight to what's happening right now.
- See the actual math behind the forecast with analyze_exponential_smoothing to handle fluctuating demand patterns.
- Identify your most reliable model quickly by using error backtesting to see which method had the lowest MAPE.
- Cut down on manual spreadsheet work by letting your agent handle the Mean Absolute Error calculations automatically.
- Make confident procurement decisions based on Mean Absolute Percentage Error instead of just gut feelings.

## How It Works

The bottom line is you get a data-backed demand forecast with a clear picture of each model's historical accuracy.

1. Provide your historical demand data and choose your preferred forecasting method.
2. Run the analysis to generate 3-month projections and error metrics.
3. Compare the MAE and MAPE results to pick the most accurate model for your needs.

## Frequently Asked Questions

**How does the Demand Forecast Calculator help with inventory?**
It gives you a 3-month projection of what you'll likely sell, helping you decide how much stock to order so you don't run out or overbuy.

**Can I see how accurate the forecasts are?**
Yes, the Connector calculates Mean Absolute Error and Mean Absolute Percentage Error for each model so you can see which one fits your history best.

**What is the difference between the SMA and WMA options?**
Simple Moving Average treats all past months equally, while Weighted Moving Average lets you prioritize recent months over older ones.

**Does the Demand Forecast Calculator handle my historical data?**
You provide the historical demand numbers, and the Connector handles all the mathematical modeling and error backtesting.

**How do I know which forecasting model to choose?**
You can run all three methods and compare the MAPE scores. The model with the lowest percentage error is usually your most reliable bet for that specific product.

**Is this useful for seasonal products?**
It's great for identifying trends. For products with very complex yearly cycles, you'll want to use the Exponential Smoothing option to help capture recent momentum.

**What forecasting methods are supported?**
The server supports Simple Moving Average (`analyze_sma`), Weighted Moving Average (`analyze_wma`), and Exponential Smoothing (`analyze_exponential_smoothing`).

**How is the accuracy of the forecast measured?**
Accuracy is measured using Mean Absolute Error (MAE) and Mean Absolute Percentage Error (MAPE) through a backtesting process on your historical data.

**What inputs are required for the SMA tool?**
The `analyze_sma` tool requires an array of historical demand values and a window size representing the number of periods to include in the average.