# Basis Calculator MCP MCP

> Basis Calculator determines commodity market parity by comparing local physical prices against exchange futures contracts. This MCP helps analysts calculate a commodity's absolute basis value, telling you instantly if the market is priced above or below expected levels. It also provides historical benchmarks and seasonal forecasts to give you context for today’s numbers.

## Overview
- **Category:** finance
- **Price:** Free
- **Tags:** basis, commodity-trading, market-analysis, agriculture-tech, pricing

## Description

Commodity pricing is complicated; it involves looking at physical local costs while simultaneously tracking far-off futures contracts. This MCP lets your agent analyze that gap, determining the true basis of a commodity in one place. Instead of manually cross-referencing multiple data streams, you ask for an analysis, and the system calculates the current value and its market classification. It doesn't stop there; it benchmarks today’s findings against years of regional averages and models seasonal shifts, giving you a full picture of risk. Because this MCP is hosted on Vinkius, you connect your preferred AI client once to access this tool alongside thousands of others. You get the context needed to make an informed trade or financial decision.

## Tools

### calculate_current_basis
Computes the current absolute basis value and classifies it as Above Parity (positive) or Below Parity (negative).

### get_historical_averages
Retrieves established historical average basis figures for specific commodities in defined regions.

### get_seasonality_trend
Identifies the expected direction of basis movement based on the current period in the agricultural cycle.

## Prompt Examples

**Prompt:** 
```
Calculate the basis if the physical price is 120 and the future price is 115.
```

**Response:** 
```
The absolute basis value is 5, which indicates a market position of Above Parity.
```

**Prompt:** 
```
What is the historical average basis for Mato Grosso - Soy?
```

**Response:** 
```
The historical average basis for Mato Grosso - Soy is retrieved from the registry to provide context.
```

**Prompt:** 
```
What is the expected trend during the Harvest season?
```

**Response:** 
```
During the Harvest season, the basis movement direction is typically identified as part of the seasonal behavior profile.
```

## Capabilities

### Assess immediate market deviation
Calculate the absolute difference between local physical prices and futures, showing if the commodity is above or below parity right now.

### Benchmark against past performance
Pull hardcoded historical average basis data for specific regions and commodities to give context to current pricing.

### Predict seasonal market movement
Forecast expected changes in the commodity's basis by analyzing the agricultural cycle (e.g., Harvest or Off-season).

## Use Cases

### Evaluating a potential forward sale
A commodity trader needs to decide if they should sell their inventory now. They ask the agent to calculate the current basis using `calculate_current_basis`, then cross-check this result with `get_seasonality_trend` for the next three months. The system reports that while the immediate basis is slightly low, the seasonal trend suggests it will improve sharply in four weeks.

### Investigating a market anomaly
A financial analyst notices current prices are spiking but suspects they might be an outlier. They use `calculate_current_basis` and then immediately call `get_historical_averages` to prove whether the spike is statistically normal or represents a rare event.

### Planning for end-of-year inventory
A consultant needs to advise a farmer on timing their sales. They ask the agent what the expected basis movement will be during the Off-season period, using `get_seasonality_trend`. This helps them recommend storing goods until prices are predicted to rise.

### Validating compliance reports
An analyst preparing quarterly reports needs to ensure the current basis value is consistent with long-term regional trends. They run `calculate_current_basis` and then feed that result into a comparative analysis using `get_historical_averages`.

## Benefits

- Reduces reliance on gut feeling. By running `calculate_current_basis` alongside historical data from `get_historical_averages`, you get an immediate measure of how unusual today's market position is.
- Moves past simple point-in-time analysis. Instead of just looking at current prices, the system uses `get_seasonality_trend` to show if the basis is expected to change during harvest or off-season periods.
- Saves time running complex queries across multiple systems. You don't have to jump between your pricing feed and your historical database; this MCP pulls it all into one analysis.
- Mitigates single-data-point risk. Knowing the basis is 'Above Parity' only tells half the story. Cross-validating that result with `get_historical_averages` provides crucial depth for due diligence.
- Provides actionable context, not just numbers. The combination of all three tools gives you a comprehensive picture: where the market stands, where it usually is, and where it’s going.

## How It Works

The bottom line is that it provides a three-part risk assessment: what’s happening now, what usually happens, and what's predicted to happen next.

1. First, your agent uses `calculate_current_basis` to establish the absolute value of the basis using today's local and future prices.
2. Next, it calls `get_historical_averages` to retrieve past regional data points. This gives you a necessary comparison point for current pricing models.
3. Finally, running through `get_seasonality_trend` adjusts the analysis by predicting expected basis shifts based on the commodity's time of year.

## Frequently Asked Questions

**How can I calculate the current market parity?**
Use the `calculate_current_basis` tool by providing the local physical price and the futures contract price for the same maturity.

**Can I check historical basis values for specific regions?**
Yes. By using `get_historical_averages`, an agent can retrieve hardcoded historical mean basis values for a given location and commodity.

**Does the server provide information on seasonal trends?**
Yes, the `get_seasonality_trend` tool identifies expected basis movements (Increasing, Decreasing, or Stable) based on whether it is currently Harvest or Off-season.

**What data parameters must I provide when using `calculate_current_basis`?**
You need two specific values for this calculation: the local physical price and the corresponding exchange futures price. The tool determines the absolute basis value by subtracting one price from the other.

**If I use `get_historical_averages` with a commodity or region code that is not supported, what happens?**
The MCP will return an error indicating invalid input identifiers. You must verify that you are using the exact, hardcoded codes for both the specific region and the commodity type.

**Is there a limit on how many times I can call `get_seasonality_trend` in one day?**
Vinkius handles rate limiting across all its MCPs. However, for standard analytical use cases like predicting seasonal trends, the calls are reliable and designed to support high-frequency analysis.

**How often is the data used by `get_historical_averages` refreshed?**
The historical basis averages are periodically updated by Vinkius. Keep in mind that while these figures provide strong context, they don't represent real-time market movements.

**Can I combine the output from `get_seasonality_trend` with my current pricing using `calculate_current_basis`?**
Absolutely. You can feed the predicted seasonal movement into your agent's context, helping you interpret whether a calculated basis value is expected or unusually divergent.