API & MCP
Everything a person can do on Ledgerly Solar Payback Calculator, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://ledgerlysolarpayback.usefulweb.app/api/v1/calculate– run Ledgerly Solar Payback CalculatorGET https://ledgerlysolarpayback.usefulweb.app/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Ledgerly Solar Payback Calculator
Year-by-year cash flow of a PV system: bill savings from the power you use yourself, feed-in income for the guaranteed years, ageing of the panels, running costs, an inverter replacement and an optional loan. Returns simple and discounted payback, NPV, IRR, the cost per kWh produced and a payback table for other price rises and self-consumption shares. Part of Ledgerly’s Solar & Heat.
| Field | Type | Default | Description |
|---|---|---|---|
currency | text | "EUR" | Currency |
systemCost | number | 14000 | System price incl. installation |
subsidy | number | 0 | Subsidies and tax refunds |
annualYieldKwh | number | 7600 | Yield in the first year (kWh) |
selfConsumptionPercent | number | 30 | Used in the house (% of the yield). Without a battery often 25–35 %; the battery simulation gives your value. |
electricityPrice | number | 0.35 | Electricity price per kWh |
electricityPriceIncreasePercent | number | 2 | Electricity price increase (% per year) |
feedInTariff | number | 0.078 | Feed-in payment per kWh |
feedInYears | integer | 20 | Years the feed-in payment is guaranteed. After that, exported energy earns nothing in this model. |
degradationPercent | number | 0.5 | Yield loss through ageing (% per year) |
maintenancePerYear | number | 150 | Insurance, metering and upkeep per year |
costIncreasePercent | number | 2 | Increase of the running costs (% per year) |
inverterReplacementCost | number | 1500 | Inverter replacement |
inverterReplacementYear | integer | 15 | Inverter replaced in year (0 = never) |
loanAmount | number | 0 | Financed by a loan |
loanRatePercent | number | 4.5 | Loan interest rate (% per year) |
loanYears | integer | 10 | Loan term (years) |
discountRatePercent | number | 3 | Discount rate for NPV (% per year). What your money would earn elsewhere. |
horizonYears | integer | 25 | Years to compare |
Example request
8 kWp for €14,000, 30 % self-use
curl -X POST https://ledgerlysolarpayback.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"currency":"EUR","systemCost":14000,"annualYieldKwh":7600,"selfConsumptionPercent":30,"electricityPrice":0.35,"feedInTariff":0.078}'
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://ledgerlysolarpayback.usefulweb.app/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
ledgerly_solar_payback - Local stdio connector:
node src/mcp-stdio.ts --tool=ledgerly-solar-payback
{
"mcpServers": {
"ledgerly-solar-payback": { "type": "http", "url": "https://ledgerlysolarpayback.usefulweb.app/mcp" }
}
}