Releases: laszlopere/mcp-abacus
Release list
v0.5.0
Fifth release. No new tools this time — instead the two youngest ones grew up: the solver gained a full fleet of root finders and minimisers you can pick by name, and curve_fit went from 12 curve forms to 19.
Solver — ten new algorithms
Root finding, all in the chosen numeric type:
- Sign-change bracketers:
brent-dekker,chandrupatlaandsecant(joining the existingbisectionandridders), sharing one bracketing harness. - Derivative-following, bracket-free:
newton-raphsonandhalley— they use the expression's own symbolic derivatives, so they also reach a root that merely touches zero and never changes sign.
Minimisation / maximisation:
ternary-search— the plain bracket-shrinking minimiser.newton-optimise— steps to the zero of the objective's own slope; lands a quadratic in a single step.bfgs— quasi-Newton gradient descent over several unknowns, far fewer iterations than a simplex on a smooth bowl.powell— direction-set minimisation over several unknowns; derivative-free like Nelder-Mead, usually the cheapest of the three on a smooth objective.
Pass several unknowns to any multivariate engine with variables (a name → [lower, upper] map).
Curve fit — seven new forms (19 total)
All closed-form, each via its own linearisation:
- Laurent
a + b*x + c/x— direct linear basis{1, x, 1/x}. - exp-reciprocal / Arrhenius
a*exp(b/x)— log-linear against1/x. - Hoerl
a*b**x*x**c— log-linear over the basis{1, x, ln x}. - Weibull CDF
1 - exp(-(x/a)**b)— the double-log Weibull plot. - Logistic
a/(1 + exp(-(b*x + c)))— the logit, once the ceilingais fixed from the data. - Generalized hyperbolic
1/(a*x**2 + b*x + c)and Lorentzian/Cauchy peaka/(1 + ((x-b)/c)**2)— a reciprocal-quadratic transform.
New functions
geomean/harmean— geometric and harmonic means, variadic with a vector overload.sumsq— sum of squaresΣ xi**2, variadic with a vector overload.residual_sum_squares— least-squares cost of a model against paired data.map— element-wise vector transform (a special form, like the range folds).
Fixes
- Fixed-point
**no longer hangs the server on a fractional exponent. newton-raphson/halleyno longer return a root outside the bracket you gave them.
v0.4.0
Fourth release. Headline feature: the new curve_fit tool, plus complex and vector numeric modes and a large batch of new functions.
New tool
curve_fit— fit a library of 12 curve forms to paired(x, y)data and rank the best three by residual error: linear, quadratic, cubic, power, exponential, logarithmic, square-root, reciprocal, sinusoidal, gaussian, saturation (Michaelis-Menten), and hyperbolic. Closed-form least-squares wherever possible (normal equations, log/reciprocal linearisations, Caruana's method); the sinusoid uses an iterative frequency search. The whole fit runs in the chosen numeric type, so parameters and error carry the usual exact/inexact verdict.
New numeric modes
- Complex mode over two fixed-point parts.
- Vector type with
[a, b, …]literals, and functions that reduce over a vector:min/max, the descriptive stats,covariance/correlation,gcd/lcm,percentile/quantile, andfactor(prime factorisation).
Solver
- Bisection and Ridders' root finders (sign-change bracketers).
- Auto-detect the single unknown when
variableis omitted;min_fixed_point_precisiondefaults to 9 so the bare fixed-point solve just works.
New functions
hypot,comb/perm,clamp,lerp,sign, two-arg range foldssum(i, lo, hi, expr)/product(i, lo, hi, expr), and the financial helperspct/pct_change/bps/compoundandpmt/fv/pv.
Fixes & ergonomics
- "Did you mean…" suggestions on an unknown function/mode/algorithm.
- Lifted CPython's 4300-digit int↔str cap so large exact results (big factorials, exact rational fits) render instead of crashing.
v0.3.0
Type-faithful calculator MCP server — third release. Install with uvx mcp-abacus.
Calculus & equation solving
diff(expr, var, at)— numerical derivative of an expression at a pointintegral(expr, var, a, b)— definite integral over[a, b]- Classic solver benchmark problems added to the end-to-end suite
New language functions
atan2(y, x)— quadrant-aware arctangent- Hyperbolic and inverse-hyperbolic functions:
sinh,cosh,tanh,asinh,acosh,atanh gcd(...)andlcm(...)— variadic greatest-common-divisor / least-common-multiplelog(x, base)—logoverloaded to a two-argument general logarithmfactorial(n)— unary, capped at 1000degrees(x)/radians(x)— angle conversions
Robustness
- Tolerate LLM-mangled JSON arguments, returning actionable errors that tell the model how to fix the request
Full changelog: v0.2.0...v0.3.0
v0.2.0
Type-faithful calculator MCP server — second release. Install with uvx mcp-abacus.
New language functions
exp,log2,cbrtfloor,ceil,round,trunc— each taking an optionalndigitsasin,acos,atan- Optional-argument arity for trailing defaulted parameters
- Bare
piandeusable as reserved constants
calculate & solver
calculatereturns every output line of a multi-line program, not just the lastsolvergains a Brent parabolic minimiser (selectable viaalgorithm)solverrequiresmin_fixed_point_precisionin fixed-point mode (avoids silently flooring the unknown to integers)solversnaps drifted floating-point answers onto clean roundings
Exactness & diagnostics
- Fixed-point quantization error is stored and surfaced
analyzeshows a per-noderounding <residual> ≈ <approx>fragment (renamed fromerrorto avoid colliding with the failure channel)- Caller-supplied inexact-handling policy with abort-on-inexact, plus a human-readable abort message
MCP surface & metadata
- Server
instructions; every tool parameter described in itsinputSchema;help's section as a schema enum - Language reference exposed as MCP resources
- Documented the full set of mode aliases (incl.
decimal→ fixed-point); bidirectional tool cross-references - Trove classifiers,
rationalkeyword,glama.json
Full changelog: v0.1.0...v0.2.0
v0.1.0
First public release of mcp-abacus — a pure-Python MCP server for type-faithful calculation.
Highlights
calculate— evaluate one expression in one numeric type:fixed-point(default),floating-point(IEEE-754 double), orrational(exact). Every result is labelled with its precision verdict (exactvsinexact, rounded to N decimals).analyze— evaluate an expression and return its annotated parse tree, so you can see exactly where a result rounded or overflowed.help— grammar and type reference.info— server version and environment.
See the README for install and Claude Code registration.