An MCP server for type-faithful calculation: evaluate expressions bit-for-bit under fixed-width int, IEEE-754 float, fixed-point, decimal, and rational regimes.
Project description
mcp-abacus
A calculator for the artificial minds — because we know their needs are different.
People reach for a calculator to get a number. A language model reaches for one to get a number it can trust and reason about: Was this exact, or rounded? At what scale? Would a wider type have held more digits? Does this overflow the way the production code will? A floating-point answer that merely looks precise is worse than no answer — it launders a rounding error into a confident claim.
mcp-abacus is built for that caller. It does type-faithful calculation: you
pick a numeric type/mode (fixed-point, IEEE-754 double, exact rational) and the
whole expression behaves exactly as that type would in real code — it rounds
where the type rounds, stays exact where the type is exact, and carries the
result onward bit-for-bit. Every answer comes back labelled with its own
precision verdict (exact vs inexact, rounded to N decimals), so the model
never has to guess whether a result is the true value. It does not approximate a
type; it calculates using that type.
What it gives you
calculate— evaluate one expression in one numeric type. Modes:fixed-point(default) — exact scaled integer; money / ERC-20-safefloating-point— IEEE-754 double (aliasesfloat64,double)rational— exact numerator/denominator; no silent rounding
analyze— evaluate an expression and return its whole parse tree, each node annotated with the value it computed, so you can see where a surprising answer rounded or overflowed (e.g.(1 + 1/2) * 3is3in fixed-point — the tree shows the1/2 = 0leaf that explains it)help— the grammar and type reference, on tap for the modelinfo— server version and environment
Each calculate result is self-describing: a rendered value string with its
precision verdict baked in, plus structured exact / precision fields. An
inexact fixed-point result even previews what a few more decimals would reveal,
so the caller is steered toward more precision rather than toward a misleading
float.
Install and register for Claude Code
Install the server as a uv tool from this checkout:
uv tool install .
This puts an mcp-abacus executable on your PATH. Register it with Claude Code
(user scope, so it's available in every project):
claude mcp add abacus -- mcp-abacus
Then start (or /mcp reconnect) a Claude Code session — the abacus tools will
be available. Verify the server is up with:
claude mcp list
Upgrading from source: the version is pinned, so a plain reinstall can reuse a cached wheel and silently install stale code. Force a clean rebuild:
uv cache clean mcp-abacus uv tool install --force --no-cache .A long-lived Claude session keeps the old server subprocess until you
/mcpreconnect or start a fresh session.
Development
uv sync
uv run pytest
Sponsoring
mcp-abacus is free, open-source software developed in my spare time. Sponsorships are what keep the project alive and actively maintained — they fund new numeric modes, bug fixes, and ongoing support, and they're a direct signal that the work is worth continuing.
If the project is useful to you, please consider sponsoring it through GitHub Sponsors. Click the Sponsor button at the top of the repository, or visit the link directly, and pick a one-time or recurring tier. Every contribution, large or small, is hugely appreciated and goes straight back into keeping mcp-abacus healthy.
License
GNU General Public License v3.0 or later (GPL-3.0-or-later). See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_abacus-0.1.0.tar.gz.
File metadata
- Download URL: mcp_abacus-0.1.0.tar.gz
- Upload date:
- Size: 205.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b743311623ebe1c815ed2065d6cd203e8e52f0bac17df3f99fa4e8bdf56468b
|
|
| MD5 |
225c541ec64c16a08fd467eb577cbf3f
|
|
| BLAKE2b-256 |
07377727381903fe8c6f269c0b5addff051b847fb6a655f212a6b8a55065027d
|
Provenance
The following attestation bundles were made for mcp_abacus-0.1.0.tar.gz:
Publisher:
release.yml on laszlopere/mcp-abacus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_abacus-0.1.0.tar.gz -
Subject digest:
5b743311623ebe1c815ed2065d6cd203e8e52f0bac17df3f99fa4e8bdf56468b - Sigstore transparency entry: 1812260758
- Sigstore integration time:
-
Permalink:
laszlopere/mcp-abacus@5869a16dc7146f4bef43c0e84e36aef29fa136d1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/laszlopere
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5869a16dc7146f4bef43c0e84e36aef29fa136d1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mcp_abacus-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_abacus-0.1.0-py3-none-any.whl
- Upload date:
- Size: 58.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c76e0de98303bbcc6fce4312839f655d8bfdbc05ae9582d2fe17b8afae318667
|
|
| MD5 |
309141b6f04091458a92ae51f2561671
|
|
| BLAKE2b-256 |
ea7d3023abca627e906850e5a90bef5b27058d390cdab3595d417bc0e735b4a3
|
Provenance
The following attestation bundles were made for mcp_abacus-0.1.0-py3-none-any.whl:
Publisher:
release.yml on laszlopere/mcp-abacus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_abacus-0.1.0-py3-none-any.whl -
Subject digest:
c76e0de98303bbcc6fce4312839f655d8bfdbc05ae9582d2fe17b8afae318667 - Sigstore transparency entry: 1812260895
- Sigstore integration time:
-
Permalink:
laszlopere/mcp-abacus@5869a16dc7146f4bef43c0e84e36aef29fa136d1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/laszlopere
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5869a16dc7146f4bef43c0e84e36aef29fa136d1 -
Trigger Event:
push
-
Statement type: