# Financial Math Engine MCP MCP

> Financial Math Engine provides deterministic calculation for financial models. It lets your AI client calculate flawless amortization schedules (SAC/PRICE) and compound interest projections without hallucination. If you need math that won't fail on a complex loan or investment scenario, this MCP runs the numbers right.

## Overview
- **Category:** productivity
- **Price:** Free
- **Tags:** financial-modeling, loan-amortization, compound-interest, math-engine, typescript, deterministic-calculation

## Description

LLMs are bad at arithmetic, especially when dealing with multi-period financial tables; they often mess up the small details but ruin the big picture. This MCP fixes that by running calculations through a dedicated TypeScript engine. You can ask your agent to generate an exact 360-month loan schedule using either SAC or PRICE methods, getting perfect principal, interest, and remaining balance for every single month. Need to project investments over years with monthly contributions? Use the compound interest tool. Best part is that this engine requires nothing outside of Vinkius itself; no external APIs or keys are needed.

## Tools

### calculate_amortization
Generates a perfect loan amortization schedule using either SAC or PRICE methods, ensuring flawless principal and interest breakdown.

### calculate_compound_interest
Calculates the precise future value of an investment over time based on compounding interest.

## Prompt Examples

**Prompt:** 
```
Generate a PRICE amortization table for a $100,000 loan over 12 months at 1.5% monthly interest.
```

**Response:** 
```
I calculated the PRICE table for $100,000 at 1.5% for 12 months.

Your fixed monthly installment is **$9,168.00**.
Total Interest Paid: **$10,015.99**.
Total Amount Paid: **$110,015.99**.

Here is the month-by-month breakdown...
```

**Prompt:** 
```
Calculate compound interest for a $10,000 initial investment over 240 months, with a $500 monthly contribution at 0.8% monthly return.
```

**Response:** 
```
Here is the 20-year (240 months) compound interest projection:

- **Initial Principal:** $10,000.00
- **Total Out of Pocket:** $130,000.00
- **Total Interest Earned:** $286,413.91
- **Final Balance:** $416,413.91

The power of compound interest means you more than tripled your total contributed amount over 20 years.
```

**Prompt:** 
```
Generate a SAC amortization table for a $500,000 mortgage over 360 months at a 0.75% monthly rate.
```

**Response:** 
```
I generated the SAC (Constant Amortization System) table for the $500,000 mortgage.

Your first installment will be **$5,138.89**, decreasing every month until your final installment of **$1,399.31**.
- **Total Interest:** $676,875.00
- **Total Paid:** $1,176,875.00

Here is the detailed table showing exactly how your interest decreases each month.
```

## Capabilities

### Model loan repayment schedules
The MCP generates full amortization tables for mortgages using either SAC (Constant Amortization) or PRICE (French Amortization System).

### Project compound growth
It calculates the exact future value of investments based on an initial principal, regular contributions, and a set interest rate over time.

## Use Cases

### Mortgage pre-approval review
A broker needs to show a client the difference between SAC and PRICE systems. They prompt their agent using `calculate_amortization` for both scenarios, getting two distinct, accurate tables instantly to guide the client toward the best loan type.

### Retirement savings projection
A financial planner needs to show a couple how much their $500 monthly contribution will grow over 25 years. They use `calculate_compound_interest` and feed it the variables, getting the final balance and total interest earned.

### Loan payoff comparison
A user wants to see how much faster they can pay off a $500,000 loan by making extra payments. They run `calculate_amortization` with different payment structures and compare the total interest paid.

### Investment planning audit
An analyst reviews an old portfolio's growth rate. Using `calculate_compound_interest`, they accurately project what the final balance would be if contributions were slightly higher or lower, proving the impact of small changes.

## Benefits

- You eliminate math errors. Forget relying on the LLM to calculate complex schedules; this engine runs everything through a deterministic TypeScript calculation, meaning the results are guaranteed accurate.
- The `calculate_amortization` tool handles both SAC and PRICE methods. You tell your agent which system you need for a mortgage or loan repayment plan, getting perfect monthly breakdowns every time.
- Use the `calculate_compound_interest` function to accurately model investment growth over decades. It accounts for initial principal amounts plus regular contributions.
- It's self-contained and secure. You don't connect external APIs or risk third-party failures; everything runs reliably within Vinkius, keeping your data safe while calculating.
- You save hours of manual work. Instead of opening a spreadsheet to model 360 payments, you just ask your agent, and the detailed table appears instantly.

## How It Works

The bottom line is: you get mathematically guaranteed results for time-value calculations, bypassing LLM arithmetic errors.

1. Tell your agent exactly what you need: for example, "Calculate a PRICE amortization table for $100k over 12 months at 1.5%."
2. The MCP invokes the necessary calculation tool, running the complex math against its internal, deterministic engine.
3. Your agent receives the precise financial breakdown—total interest paid, final balance, and detailed tables—ready to use.

## Frequently Asked Questions

**How do I use calculate_amortization for a mortgage?**
You instruct your agent to run `calculate_amortization` and specify the loan details, including whether you need SAC or PRICE. The tool returns the full schedule showing how payments decrease over time.

**Is calculate_compound_interest better than just using a formula?**
Yes. While formulas work for simple cases, this MCP handles compound interest projections for long periods with variable contributions and initial principals automatically, guaranteeing precision.

**Can I use the Financial Math Engine to compare different loan types?**
Absolutely. You can run `calculate_amortization` multiple times in one session, comparing two or more repayment systems side-by-side for direct analysis.

**Does running the `calculate_amortization` tool require external APIs or internet access?**
No, it runs entirely self-contained within the Vinkius platform. This MCP does not need third-party API keys or active internet connections to calculate schedules accurately. It handles all complex math internally, keeping your workflow secure and reliable.

**What should I do if `calculate_compound_interest` receives invalid input parameters?**
The MCP includes robust validation checks for inputs like rates and time periods. If you provide bad data, the engine returns a specific error message detailing what needs correcting rather than failing silently. This helps your agent pinpoint the exact issue quickly.

**Can I use `calculate_amortization` to model very long-term loans, like 30+ years?**
Yes, the engine is designed for extended calculations. It handles amortization schedules across many periods, ensuring that even decades-long mortgage projections are calculated with perfect precision. You won't run into rounding errors or performance issues.

**How do I ensure my agent can use the Financial Math Engine MCP?**
You simply connect your AI client through Vinkius and grant it access to this MCP. Once connected, your agent automatically recognizes the available tools, like `calculate_amortization` and `calculate_compound_interest`, and can invoke them naturally in conversation.

**When should I use `calculate_amortization` with SAC versus PRICE?**
You choose based on how the loan is structured. Use SAC if you need a constant principal reduction over time, while PRICE reflects loans where the monthly payment remains fixed for the entire term.

**Does this require an API key?**
No! It is a self-contained engine. It performs calculations directly within the Vinkius Edge process, meaning it does not rely on third-party APIs or external services.

**Why use this instead of letting the AI calculate it?**
Because Large Language Models (LLMs) are text predictors, not calculators. If you ask an AI to generate a 360-month amortization table, it will hallucinate cents and make cascading mathematical errors. This MCP uses deterministic code to guarantee 100% banking-level accuracy.