API & MCP
Everything a person can do on Ledgerly Savings Goal Calculator, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://ledgerlysavingsgoal.usefulweb.app/api/v1/calculate– run Ledgerly Savings Goal CalculatorGET https://ledgerlysavingsgoal.usefulweb.app/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Ledgerly Savings Goal Calculator
Works out the monthly amount you need to reach a savings goal by a target date, or how long it takes with the amount you can put aside. Includes what you already have, interest with monthly, yearly or daily compounding, fees and an option to keep the goal in today’s money so it grows with inflation. A small table shows the effect of a higher or lower return. Part of Ledgerly’s Debt & Growth.
| Field | Type | Default | Description |
|---|---|---|---|
currency | text | "EUR" | Currency. ISO code used for the labels, e.g. EUR, USD, GBP. |
mode | select (monthly-needed, time-needed) | "monthly-needed" | What to find |
targetAmount | number | 20000 | Savings goal |
targetIn | select (nominal, today) | "nominal" | The goal is in |
startAmount | number | 2000 | Already saved |
years | number | 5 | Years until the goal (for the monthly amount) |
monthlyContribution | number | 300 | Monthly amount (for the time needed) |
annualReturnPercent | number | 3 | Interest or return (% per year) |
compounding | select (monthly, yearly, daily) | "monthly" | Compounding |
feePercent | number | 0 | Yearly fees (% of the balance) |
inflationPercent | number | 2 | Inflation (% per year) |
startMonth | text | — | First saving month (YYYY-MM, optional). Gives the month you reach the goal; leave empty to count months only. |
Example request
20,000 in 5 years with 2,000 saved at 3 %
curl -X POST https://ledgerlysavingsgoal.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"currency":"EUR","mode":"monthly-needed","targetAmount":20000,"startAmount":2000,"years":5,"annualReturnPercent":3,"startMonth":"2027-01"}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://ledgerlysavingsgoal.usefulweb.app/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
ledgerly_savings_goal - Local stdio connector:
node src/mcp-stdio.ts --tool=ledgerly-savings-goal
{
"mcpServers": {
"ledgerly-savings-goal": { "type": "http", "url": "https://ledgerlysavingsgoal.usefulweb.app/mcp" }
}
}