
Mcp Chainladder
io.github.datalatticePublished by GitHub account datalatticev1.2.2Updated Oct 24, 2026
Actuarial chain-ladder reserving: IBNR, Mack stochastic stats, and assumption diagnostics.
Overview
Local MCP server that gives an assistant actuarial chain-ladder reserving tools: IBNR, ultimates, Mack stochastic errors and assumption diagnostics.
- What you can do
- Compute chain-ladder reserves: volume and simple age-to-age factors, cumulative development factors, ultimates and IBNR per accident year, with optional selected factors, tail and excluded cells
- Project the full triangle and convert between cumulative and incremental views
- Estimate uncertainty with Mack (1993) standard errors and coefficients of variation, including total reserve error
- Run Mack (1994) assumption diagnostics: standardised residuals, outliers, calendar-year sign test, independence test and inflation trend
- Load loss triangles from CSV files on disk, treating blank or NA cells as unobserved
- Return a textbook 10x10 sample triangle as a self-check
- When to use it
- Useful when an assistant needs to run chain-ladder reserving arithmetic on a loss triangle during a conversation: estimating IBNR, projecting ultimates, or checking whether the projection's assumptions hold. It is a mechanical calculator, not a substitute for actuarial judgement.
- Requirements
- Runs locally over stdio as a Python package (mcp-chainladder) via uvx or pipx; Python 3.10 or newer. No authentication, API keys or environment variables are declared. CSV parsing reads files from the local disk, so the assistant needs a path to the triangle file.
Installation
In SourceWeft
- Open Mcp Chainladder in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
mcp-chainladder
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.
What it does
Eight tools, exposed over MCP. Claude picks the right one when you ask a question; you don't have to call them by name.
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.
Install
Python 3.10 or newer; no other runtime dependencies beyond the official MCP SDK.
Hook into Claude Desktop
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).
Examples
Run the chain ladder on a CSV
Check whether you should worry about assumptions
Exclude an outlier and re-run
Tool reference
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.
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.
Triangle format
- Outer index = accident year, oldest first
- Inner index = development period, 0 = first age
- Use
None(or JSONnull) for unobserved cells - All rows must be the same length — pad with trailing
null
Testing
Tests pin every public tool against the textbook triangle's well-known parity values to ~1e-9.
Pro tier
<< 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.
License file format
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.
License
MIT. See LICENSE.
Source: README.md at commit 36825b6
Tools
0Version history
1- v1.2.2LatestSep 16, 2026
Score
40% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Declare a license in the repository or the registry entry.