mcp-abacus
Pure-Python MCP server for type-faithful calculation — evaluate expressions under fixed-point, IEEE-754 double, or exact rational arithmetic, with every answer labelled with its precision (exact vs inexact).
README
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)solver— find the value(s) of one or more variables that drive an expression to a target over a bracket: find-root (x**2 - 2over[0, 2]→ √2) or find-minimum / find-maximum, in the same numeric type and expression language (constants come fromname = exprassignment lines). One unknown uses golden-section search (or Brent parabolic viaalgorithm="brent-parabolic", usually faster on smooth extrema); passvariables(a name →[lower, upper]map) withalgorithm="nelder-mead"to solve several jointly with a Nelder-Mead simplexhelp— 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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.