The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the MCP Chainladder listing page.
Actuarial chain-ladder reserving for Claude. A Model Context Protocol server that hands Claude the tools to compute IBNR, project ultimates, run Mack (1993) stochastic error estimates, check Mack (1994) model assumptions, and parse loss triangles from CSV — all from a natural- language conversation.
Calculation only — not actuarial advice. This is a mechanical chain-ladder calculator. Selection of data, factors, tails, and exclusions, and the interpretation of stochastic error measures, require professional actuarial judgement.
Eight tools, exposed over MCP. Claude picks the right one when you ask a question; you don't have to call them by name.
| Tool | When Claude reaches for it |
|---|---|
compute_chain_ladder | "What's the IBNR on this triangle?" — the workhorse |
project_triangle | "What does the full projected triangle look like?" |
mack_stochastic | "What's the uncertainty on the total reserve?" |
mack_diagnostics | "Are there outliers or trend issues?" |
parse_csv_triangle | "Run the chain ladder on this CSV file" |
to_incremental | "Show me the incremental development pattern" |
to_cumulative | "Cumulate these incremental values" |
sample_triangle | "Show me a working example" — quick demo |
All numerical conventions match the Mack 1993 and Mack 1994 papers; results are stable to ~1e-12 against hand calculation on the textbook 10×10 triangle.
Python 3.10 or newer; no other runtime dependencies beyond the official MCP SDK.
Edit ~/Library/Application Support/Claude/claude_desktop_config.json
(macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
Quit and reopen Claude Desktop. The triangle tools appear under the 🔌 icon in any conversation.
For Cursor / Cline / Continue / Zed — same mcpServers block, each app
has its own config file location (their docs walk you through it).
Each tool returns a JSON object (or a 2-D list, in the case of
project_triangle/to_incremental/to_cumulative). Claude reads the
descriptions and types directly from the server — you don't need to
memorise the shapes — but here's the cheat sheet.
compute_chain_ladder(triangle, selected_factors?, tail?, excluded?)End-to-end chain ladder.
| Field returned | Meaning |
|---|---|
volume_factors[j] | All-year volume-weighted age-to-age factor for transition j→j+1 |
simple_factors[j] | Unweighted average of individual link ratios |
selected_factors[j] | The factor set actually used to project (defaults to volume) |
individual_factors[i][j] | Per-row link ratio C[i,j+1] / C[i,j]; null where the pair is unobserved |
cdf[j] | Cumulative dev factor to ultimate; cdf[-1] == tail |
latest_diagonal[i] | Most recent observed value per AY |
ultimates[i] | Projected ultimate per AY |
ibnr[i] | Ultimate − Latest per AY |
total_* | Sums of the three above |
n_acc, n_dev | Triangle dimensions |
mack_stochastic(triangle, selected_factors, excluded?)Mack (1993) distribution-free standard errors. Returns σ̂²_j per dev period (tail-rule backfilled when only one observation), SE & CV per row, and SE_total / CV_total including cross-row covariance per eq. 5.15.
mack_diagnostics(triangle, selected_factors, excluded?, outlier_threshold?)Returns standardised residuals, outliers (|r| > threshold, default
2.0), the calendar-year sign test, Spearman independence test across
adjacent dev columns, and the inflation slope of mean log-link-ratio
against accident-year index.
p-value bands to translate to plain English:
parse_csv_triangle(path)Reads a CSV from disk, treats blank / NA / NaN / N/A / − cells as unobserved, strips embedded thousand-separator commas, and skips header / metadata rows. Returns the triangle + dimensions + the absolute path read (useful for the assistant to confirm what it loaded).
project_triangle(triangle, selected_factors)Fills the lower-right of the triangle with chain-ladder projections.
Returns a fully-rectangular list[list[float]] (no nulls). NaN where
a row has no observation to project forward from.
to_incremental(cumulative) / to_cumulative(incremental)Two conversions. Unobserved cells stay unobserved; the inverse on observed cells is exact.
sample_triangle()Returns the textbook 10×10 cumulative paid triangle. Use as a
self-check: pass it to compute_chain_ladder and you should get
Paid 49,458 / Ultimate 65,883 / IBNR 16,425.
None (or JSON null) for unobserved cellsnullTests pin every public tool against the textbook triangle's well-known parity values to ~1e-9.
<< UNDER REVIEW - COMING SOON >>
The free tier covers all 8 tools listed above. Pro unlocks
additional methods + bulk workflows, gated by a local license file
at ~/.chainladder/license (or wherever $CHAINLADDER_LICENSE_FILE
points).
Pro licenses are currently for internal and testing purposes only — not open to the public. No purchase channel is available at this time. The Pro tools are listed below for reference and will continue to return
pro_license_requiredfor external users.
| Pro tool | What it does |
|---|---|
pro_license_status | Inspect current license state (free to call) |
interpret_diagnostics | Mack tests with verdict labels + plain-English summaries + recommended actions |
sensitivity_analysis | Drop each link ratio one-at-a-time and rank by IBNR impact |
tail_extrapolation | Fit exponential + inverse-power tail models, recommend best fit |
bornhuetter_ferguson | BF reserving method with side-by-side CL comparison |
compare_methods | Run CL + BF in one call, report deltas + largest divergence |
generate_pdf_report (coming v1.2) | Full 5-page actuarial PDF — cover / triangle / factors / results / 3D loss surface |
batch_csv_processing (coming v1.2) | Fold the chain ladder over a directory of CSV triangles |
cape_cod, mack_bf (coming v1.3) | Additional reserving methods, all returning side-by-side comparisons |
Drop it at ~/.chainladder/license (the file's directory must exist;
the server doesn't create it). Pro tools immediately respond as
unlocked the next time Claude calls them.
When the license is missing or expired, every Pro tool returns
{"error": "pro_license_required", "status": {...}} instead of
computing — Claude reads the status and points you to the upgrade
URL. The free-tier tools always work regardless of license state.
MIT. See LICENSE.