MCP Financial Calculator
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Financial Calculator calculate the IRR for cash flows -10000, 3000, 4200, 6800"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Financial Calculator
A Node.js MCP service that provides:
Basic arithmetic:
add,subtract,multiply,divideCash flow and return tools:
xnpv,xirr,npv,irr,mirrTime value of money tools:
pv,fv,pmt,nper,rateOther metrics:
cagr,payback_period,discounted_payback_period
1. Install
npm installRelated MCP server: wealth-engine
2. Start
npm startThe service communicates with MCP clients via stdio.
3. Run Tests
npm test4. MCP Config Example
{
"mcpServers": {
"financial-calculator": {
"command": "node",
"args": ["/absolute/path/to/mcp-financial-calculator/src/index.js"]
}
}
}5. Tool Input Examples
xnpvInput:
{
"rate": 0.1,
"cashflows": [
{ "amount": -10000, "date": "2024-01-01" },
{ "amount": 12000, "date": "2025-01-01" }
]
}xirrInput:
{
"cashflows": [
{ "amount": -10000, "date": "2024-01-01" },
{ "amount": 12000, "date": "2025-01-01" }
],
"guess": 0.1
}npvInput:
{
"rate": 0.1,
"cashflows": [-10000, 3000, 4200, 6800]
}irrInput:
{
"cashflows": [-10000, 3000, 4200, 6800],
"guess": 0.1
}mirrInput:
{
"cashflows": [-10000, 3000, 4200, 6800],
"financeRate": 0.08,
"reinvestRate": 0.1
}pvInput:
{
"rate": 0.01,
"nper": 12,
"pmt": -1000,
"fv": 0,
"type": 0
}fvInput:
{
"rate": 0.01,
"nper": 12,
"pmt": -1000,
"pv": 0,
"type": 0
}pmtInput:
{
"rate": 0.01,
"nper": 12,
"pv": 10000,
"fv": 0,
"type": 0
}nperInput:
{
"rate": 0.01,
"pmt": -1000,
"pv": 10000,
"fv": 0,
"type": 0
}rateInput:
{
"nper": 12,
"pmt": -1000,
"pv": 10000,
"fv": 0,
"type": 0,
"guess": 0.01
}cagrInput:
{
"beginningValue": 100,
"endingValue": 150,
"years": 3
}payback_periodInput:
{
"cashflows": [-10000, 3000, 4200, 6800]
}discounted_payback_periodInput:
{
"discountRate": 0.1,
"cashflows": [-10000, 3000, 4200, 6800]
}6. Parameter Constraints
Cashflow tools usually require at least 2 values.
xirr,irr, andmirrrequire both positive and negative cashflows.Rate parameters must be greater than
-1.Irregular cashflow
datemust be strictYYYY-MM-DD.typeonly supports0(end of period) or1(beginning of period).
7. Code Structure
src/index.js: MCP server bootstrap onlysrc/tools/: tool registration modulessrc/lib/finance.js: financial algorithmssrc/lib/result.js: unified result formatsrc/schemas.js: input validation schemas
8. Finance Concepts in Plain Language
NPV/XNPV: Convert future cashflows into today's value by discounting them with a rate. If NPV is positive, the investment is better than your required return.IRR/XIRR: Find the rate that makes NPV equal to 0. This project uses numerical solving because there is usually no closed-form formula.MIRR: A more stable alternative to IRR with two explicit assumptions: borrowing cost (financeRate) and reinvestment return (reinvestRate).PV/FV:PVasks "what is a future amount worth today?" andFVasks "what will today's plan be worth in the future?".PMT/NPER/RATE: Loan or savings planning trio:PMT= payment per period,NPER= number of periods,RATE= implied periodic interest rate.CAGR: Smoothed annual growth rate from a start value to an end value over years.Payback Period: How long until cumulative cashflows recover the initial outflow.Discounted Payback Period: Same as payback period, but each future cashflow is discounted first.
9. Sign Convention (Important)
Outflow (money you pay) should be negative.
Inflow (money you receive) should be positive.
Mixed signs are required for
IRR,XIRR, andMIRR.
10. Notes on Numerical Results
Floating-point math is approximate, so tiny differences are normal.
XNPV/XIRRuse an Actual/365 day basis in this implementation.
Available Tools
17 toolsaddB
Add two numbers.
Inputs: a (required), b (required).
cagrC
Calculate compound annual growth rate.
Inputs: years (required), endingValue (required), beginningValue (required).
discounted_payback_periodC
Calculate discounted payback period for periodic cashflows.
Inputs: cashflows (required), discountRate (required).
divideA
Divide a by b.
Inputs: a (required), b (required).
fvD
Calculate future value.
Inputs: pv (required), pmt (required), nper (required), rate (required), +1 more.
irrB
Calculate IRR for periodic cashflows.
Inputs: cashflows (required), guess.
mirrC
Calculate MIRR for periodic cashflows.
Inputs: cashflows (required), financeRate (required), reinvestRate (required).
multiplyA
Multiply two numbers.
Inputs: a (required), b (required).
nperC
Calculate number of periods.
Inputs: pv (required), pmt (required), rate (required), fv, +1 more.
npvB
Calculate NPV for periodic cashflows (index as period).
Inputs: rate (required), cashflows (required).
payback_periodC
Calculate payback period for periodic cashflows.
Inputs: cashflows (required).
pmtC
Calculate payment amount per period.
Inputs: pv (required), nper (required), rate (required), fv, +1 more.
pvC
Calculate present value.
Inputs: fv (required), pmt (required), nper (required), rate (required), +1 more.
rateC
Calculate rate per period (numerical solve).
Inputs: pv (required), pmt (required), nper (required), fv, +2 more.
subtractA
Subtract b from a.
Inputs: a (required), b (required).
xirrC
Calculate XIRR from irregular cashflows.
Inputs: cashflows (required), guess.
xnpvC
Calculate XNPV from irregular cashflows and a discount rate.
Inputs: rate (required), cashflows (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Each tool maps to a distinct financial formula, and pairs like irr/xirr, npv/xnpv, and rate/cagr are separated by the periodic-vs-irregular cashflow distinction stated in their descriptions. The add/subtract/multiply/divide group is trivially distinct but feels tangential to the financial-analysis core, and a couple of near-neighbors (irr vs xirr, cagr vs rate) still require reading descriptions to pick correctly.
All names are lowercase snake_case using standard finance abbreviations (xirr, nper, mirr, discounted_payback_period), which reads predictably as a set. There is no verb_noun convention, but that is appropriate for a calculator where the tool name is the formula, so consistency holds with only minor length deviations.
At 17 tools the surface is on the heavy side, but each corresponds to a specific, non-redundant financial function rather than a variant of the same action. The four basic arithmetic tools are the only entries that feel like padding for a 'financial calculator' scope.
The set covers time value of money (fv, pv, pmt, nper, rate), cashflow valuation (npv, xnpv, irr, xirr, mirr), and payback analysis, which is solid coverage for the stated purpose. Minor gaps remain around amortization schedules, effective/nominal rate conversion, and compounding helpers, but agents can compose these from existing tools.
Maintenance
Related MCP Connectors
MCP server for Financial Modeling Prep API with 250+ financial data tools
Financial data MCP server for global quotes, news, financials, funds, bonds, IPOs and macro data.
SmartMoney77 MCP v0.6.0 — 14 public tools that turn financial questions into exact numbers and citable links. New: historical_investment_return and compare_investments, which compute "what if I had invested" results from real yearly price data. Also compound interest, FIRE number, credit-card payoff, emergency fund, inflation, latte factor, investment fees, cost of waiting, plus discovery/deep-link/share-pack tools for a catalog of calculators in 6 languages (he/en/ar/es/pt/in). Public, no login. Endpoint: https://smartmoney77.com/mcp
This MCP server enables users to perform scientific computations regarding linear algebra and vect…
Related MCP Servers
- AlicenseBqualityBmaintenanceAn MCP server and CLI providing business, financial, and tax calculations including math expressions, income tax estimates, loan amortization, depreciation, and more.102MIT
- AlicenseAqualityDmaintenanceA personal finance and business economics MCP server that provides math-backed answers to financial questions, including investment growth, loan amortization, debt payoff strategies, and tax estimation, all computed locally without API keys or network calls.11MIT
- AlicenseNot gradedqualityDmaintenanceA quantitative finance MCP server providing 24 tools for option pricing, portfolio optimization, risk measurement, fixed income analysis, and utility functions, enabling AI clients to perform professional financial calculations.MIT
- AlicenseAqualityCmaintenanceAn MCP server that provides deterministic, high-precision business, finance, and operational calculations such as SaaS metrics, currency conversion, business days, and financial formulas, returning structured JSON results.1149 npmMIT