Financial calculators
Compound interest, amortization schedule, and loan payment in one call - the three financial calculations agents need most.
3 tools run server-side in one request. You pay once, settle once, and get a single response - no orchestration, no per-step payments, and a partial-success envelope if any step fails. USDC over x402 on any supported chain.
When to use this pack
An agent is helping with a financial decision (investment projection, mortgage comparison, loan evaluation) and needs all three core calculations without making separate calls. Pure math, no market data needed.
Tools in this pack
All 3 run inside the single $0.050 call above. Each is also callable on its own if you only need one part.
- Compound interest POST /api/compound-interest Compute future value of a principal under compound interest. Returns future value, total interest earned, and the effective annual rate (APY) given the compounding frequency. Matches Excel's FV(rate, nper, 0, -principal) and the classic (1+r/n)^(nt) textbook formula.
- Amortization schedule POST /api/amortization Build the full per-period amortization schedule for a fully-amortizing loan. Each row reports the period number, payment, the principal vs. interest split for that payment, and the remaining balance after that payment. Use this when the user wants to see how interest tapers over the life of the loan, or to model an extra-payment scenario by reading the balance at any period.
- Loan payment POST /api/loan-payment Compute the monthly (or per-period) payment on a fully-amortizing loan: mortgage, auto, student loan, business loan. Returns the periodic payment, total paid over the term, and total interest. Matches Excel's PMT(rate, nper, -principal). Use this when you just need the payment number, not the full per-period schedule (see amortization).
Workflow
- Project growth with compound-interest - monthly compounding over the given horizon. Shows future value of the principal.
- Generate an amortization schedule - first 12 periods showing principal/interest breakdown per payment.
- Compute the monthly payment with loan-payment - the flat PMT for the given principal, rate, and term.
Call it directly
Any x402 client pays the 402 and gets the whole workflow back in one response:
npx agent402-client call finance-calc {"principal":"10000","rate":"7","years":"10"}
Run it in Claude
claude mcp add agent402 -s user -- npx -y agent402-mcp@latest
Then paste this prompt into Claude:
Run financial calculators using Agent402: (1) compound-interest {principal:10000, annualRate:0.07, years:10, compoundingPerYear:12}. (2) amortization {principal:300000, annualRate:0.065, termYears:30, maxRows:12}. (3) loan-payment {principal:300000, annualRate:0.065, termYears:30}. Return {growth, schedule, payment}.