{"id":51495154,"url":"https://github.com/laszlopere/mcp-abacus","last_synced_at":"2026-07-07T14:31:12.951Z","repository":{"id":364713957,"uuid":"1268922606","full_name":"laszlopere/mcp-abacus","owner":"laszlopere","description":"High-precision calculator MCP server — goes beyond arithmetic to calculus (derivatives, integrals) and equation solving, all evaluated in fixed-point, IEEE-754, or exact rational mode with every answer labelled exact or inexact.","archived":false,"fork":false,"pushed_at":"2026-06-25T13:23:09.000Z","size":603,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-25T15:26:46.967Z","etag":null,"topics":["ai","arithmetic","calculator","claude","decimal","fixed-point","ieee-754","mcp","mcp-server","model-context-protocol","python","rational"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laszlopere.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["laszlopere"]}},"created_at":"2026-06-14T05:04:49.000Z","updated_at":"2026-06-25T13:23:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/laszlopere/mcp-abacus","commit_stats":null,"previous_names":["laszlopere/mcp-abacus"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/laszlopere/mcp-abacus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laszlopere%2Fmcp-abacus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laszlopere%2Fmcp-abacus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laszlopere%2Fmcp-abacus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laszlopere%2Fmcp-abacus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laszlopere","download_url":"https://codeload.github.com/laszlopere/mcp-abacus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laszlopere%2Fmcp-abacus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35232326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-07T02:00:07.222Z","response_time":90,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","arithmetic","calculator","claude","decimal","fixed-point","ieee-754","mcp","mcp-server","model-context-protocol","python","rational"],"created_at":"2026-07-07T14:30:56.729Z","updated_at":"2026-07-07T14:31:11.024Z","avatar_url":"https://github.com/laszlopere.png","language":"Python","funding_links":["https://github.com/sponsors/laszlopere","https://github.com/sponsors/laszlopere)*"],"categories":[],"sub_categories":[],"readme":"# mcp-abacus\n\n[![CI](https://github.com/laszlopere/mcp-abacus/actions/workflows/ci.yml/badge.svg)](https://github.com/laszlopere/mcp-abacus/actions/workflows/ci.yml)\n[![PyPI](https://img.shields.io/pypi/v/mcp-abacus.svg)](https://pypi.org/project/mcp-abacus/)\n[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/)\n[![License: GPLv3](https://img.shields.io/badge/License-GPLv3-blue.svg)](LICENSE)\n[![Sponsor](https://img.shields.io/badge/Sponsor-%E2%9D%A4-db61a2.svg)](https://github.com/sponsors/laszlopere)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![Checked with mypy](https://img.shields.io/badge/mypy-checked-2a6db2.svg)](https://mypy-lang.org/)\n[![Last commit](https://img.shields.io/github/last-commit/laszlopere/mcp-abacus.svg)](https://github.com/laszlopere/mcp-abacus/commits)\n\n**A calculator for the artificial minds — because we know their needs are\ndifferent.**\n\nPeople reach for a calculator to get a number. A language model reaches for one\nto get a number it can *trust* and reason about: Was this exact, or rounded? At\nwhat scale? Would a wider type have held more digits? Does this overflow the way\nthe production code will? A floating-point answer that merely *looks* precise is\nworse than no answer — it launders a rounding error into a confident claim.\n\nmcp-abacus is built for that caller. It does **type-faithful calculation**: you\npick a numeric type/mode (fixed-point, IEEE-754 double, exact rational, complex) and the\n*whole* expression behaves exactly as that type would in real code — it rounds\nwhere the type rounds, stays exact where the type is exact, and carries the\nresult onward bit-for-bit. Every answer comes back labelled with its own\nprecision verdict (`exact` vs `inexact, rounded to N decimals`), so the model\nnever has to guess whether a result is the true value. It does not approximate a\ntype; it calculates *using* that type.\n\n## What it gives you\n\n- **`calculate`** — evaluate one expression in one numeric type. Modes:\n  - `fixed-point` *(default)* — exact scaled integer; money / ERC-20-safe\n  - `floating-point` — IEEE-754 double (aliases `float64`, `double`)\n  - `rational` — exact numerator/denominator; no silent rounding\n  - `complex` — `a + b*i` over two fixed-point parts; write the imaginary unit as\n    `1i` (e.g. `3+4i`, `2.5i`). Exact `+ - *` (`(3+4i)*(1+2i)` → `-5+10i`,\n    `sqrt(-1)` → `1i`), rounds `/` and the transcendentals onto the grid; no\n    ordering, bitwise, integer (`gcd`/`factorial`), or solver support\n\n  A **vector literal** `[a, b, …]` builds a one-dimensional list of values in the\n  chosen mode (e.g. `[1, 2, 3]`, the empty `[]`, or `[1+1, 2*3]` → `[2, 6]`); it is\n  an internal container, not a selectable mode. The whole stats family reduces over a\n  single vector's elements — `min`/`max`/`avg`/`median`/`variance`/`stddev`/`sumsq`/`geomean`/`harmean`\n  (`avg([1, 2, 3])` → `2`, `sumsq([1, 2, 3])` → `14`, `geomean([4, 9])` → `6`), as do the integer reducers `gcd`/`lcm`\n  (`gcd([54, 24, 6])` → `6`). The order statistics take a leading point then the\n  data (a run or one vector): `quantile(q, …)` for `q` in `[0, 1]` and\n  `percentile(p, …)` for `p` in `[0, 100]` read the value at that rank (type-7\n  linear interpolation), generalising `median` — `percentile(50, [1, 2, 3, 4])`\n  is the median. And `covariance(x, y)`/`correlation(x, y)` take two\n  equal-length vectors (`covariance([1, 2, 3], [4, 5, 6])`, Pearson\n  `correlation(...)` in `[-1, 1]`). Going the other way, `factor(n)` PRODUCES a\n  vector — the prime factors of a positive integer, ascending with multiplicity\n  (`factor(12)` → `[2, 2, 3]`, `factor(1)` → `[]`). Otherwise vectors only\n  construct and render — other operators and functions refuse one, there is no\n  indexing (`b[i]`), and nesting (`[[1,2],[3,4]]`) is rejected.\n- **`analyze`** — evaluate an expression and return its whole parse tree, each\n  node annotated with the value it computed, so you can see *where* a surprising\n  answer rounded or overflowed (e.g. `(1 + 1/2) * 3` is `3` in fixed-point — the\n  tree shows the `1/2 = 0` leaf that explains it)\n- **`solver`** — find the value(s) of one or more variables that drive an\n  expression to a target over a bracket: *find-root* (`x**2 - 2` over `[0, 2]` → √2)\n  or *find-minimum* / *find-maximum*, in the same numeric type and expression\n  language (constants come from `name = expr` assignment lines). One unknown uses\n  *golden-section search* (or *Brent parabolic* via `algorithm=\"brent-parabolic\"`,\n  usually faster on smooth extrema); pass `variables` (a name → `[lower, upper]` map)\n  with `algorithm=\"nelder-mead\"` to solve several jointly with a *Nelder-Mead* simplex\n- **`curve_fit`** — fit known curve forms to paired `(x, y)` observations and report\n  each fitted equation with its error. Hand over the data and it estimates, for the\n  straight line, quadratic, cubic, power law `a*x**b`, exponential `a*exp(b*x)`,\n  exp-reciprocal (Arrhenius) `a*exp(b/x)`, logarithm\n  `a + b*ln(x)`, square root `a*sqrt(x) + b`, reciprocal `a/x + b`, sinusoid\n  `a*sin(b*x + c) + d`, gaussian `a*exp(-(x-b)**2/(2*c**2))`, saturation `x/(a*x + b)`\n  (Michaelis-Menten), hyperbolic `1/(a*x + b)`, Laurent `a + b*x + c/x`, Hoerl\n  `a*b**x*x**c`, Weibull CDF `1 - exp(-(x/a)**b)`, logistic `a/(1 + exp(-(b*x + c)))`\n  (with a data-fixed ceiling `a`), generalized hyperbolic `1/(a*x**2 + b*x + c)` and Lorentzian\n  peak `a/(1 + ((x-b)/c)**2)`, the parameters that best\n  match in the least-squares sense —\n  polynomials and the affine forms in closed form via the normal equations, the power,\n  exponential and exp-reciprocal laws by a log-linearisation, the gaussian and Hoerl by fitting a\n  log-space basis (Caruana's method for the gaussian), the Weibull by the double-log Weibull plot,\n  the logistic by the logit once its ceiling is fixed,\n  the saturation and hyperbolic by a reciprocal-line transform (the generalized hyperbolic and Lorentzian by a reciprocal-quadratic), and the sinusoid\n  (the lone form with no closed\n  form) by an iterative frequency search — then\n  ranks them by residual error and returns the best three (e.g. `x=[1,1.5,2],\n  y=[2,5.8,8.9]` → `6.9*x - 4.78…`). The whole fit runs in the chosen numeric type, so the\n  parameters and error carry the usual precision verdict\n- **`help`** — the grammar and type reference, on tap for the model\n- **`info`** — server version and environment\n\nEach `calculate` result is self-describing: a rendered `value` string with its\nprecision verdict baked in, plus structured `exact` / `precision` fields. An\ninexact fixed-point result even previews what a few more decimals would reveal,\nso the caller is steered toward more precision rather than toward a misleading\nfloat.\n\n## Install and register for Claude Code\n\nInstall the server as a [uv](https://docs.astral.sh/uv/) tool from this\ncheckout:\n\n```sh\nuv tool install .\n```\n\nThis puts an `mcp-abacus` executable on your PATH. Register it with Claude Code\n(user scope, so it's available in every project):\n\n```sh\nclaude mcp add abacus -- mcp-abacus\n```\n\nThen start (or `/mcp` reconnect) a Claude Code session — the `abacus` tools will\nbe available. Verify the server is up with:\n\n```sh\nclaude mcp list\n```\n\n\u003e **Upgrading from source:** the version is pinned, so a plain reinstall can\n\u003e reuse a cached wheel and silently install stale code. Force a clean rebuild:\n\u003e ```sh\n\u003e uv cache clean mcp-abacus\n\u003e uv tool install --force --no-cache .\n\u003e ```\n\u003e A long-lived Claude session keeps the old server subprocess until you `/mcp`\n\u003e reconnect or start a fresh session.\n\n## Development\n\n```sh\nuv sync\nuv run pytest\n```\n\n## Sponsoring\n\nmcp-abacus is free, open-source software developed in my spare time.\nSponsorships are what keep the project alive and actively maintained — they fund\nnew numeric modes, bug fixes, and ongoing support, and they're a direct signal\nthat the work is worth continuing.\n\nIf the project is useful to you, please consider sponsoring it through\n**[GitHub Sponsors](https://github.com/sponsors/laszlopere)**. Click the\n**Sponsor** button at the top of the repository, or visit the link directly, and\npick a one-time or recurring tier. Every contribution, large or small, is hugely\nappreciated and goes straight back into keeping mcp-abacus healthy.\n\n## License\n\nGNU General Public License v3.0 or later (GPL-3.0-or-later). See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaszlopere%2Fmcp-abacus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaszlopere%2Fmcp-abacus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaszlopere%2Fmcp-abacus/lists"}