calculator-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@calculator-mcp What is 48 times 12?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
calc-mcp
Enterprise-grade arithmetic, delivered over the Model Context Protocol.
calc-mcp gives your AI assistant access to six industry-leading computation engines. Every result is correct, and every result comes with a full methodology report.
Computation engines
Tool | Engine | Methodology |
| Peano Successor Engine™ | Builds both operands as successor chains ( |
| Adversarial Rope Engine™ | Stages a tug of war between Team A ( |
| Stochastic Area Engine™ | Throws random darts at an |
| Delegated Inference Engine™ | Sends the problem back to the language model that asked. If the client doesn't support that, it asks you. |
| Temporal Ranking Engine™ | Sleeps for |
| Monte Carlo Root Discovery™ | Guesses random integers until one works. Remainders are included at no extra cost. |
Related MCP server: Math MCP Server
Installation
You need Node.js 20 or later. calc-mcp isn't on the npm registry. It installs straight from this GitHub repository and builds itself the first time it runs, so the first start takes a little longer.
Claude Desktop
Add this to claude_desktop_config.json:
{
"mcpServers": {
"calculator": {
"command": "npx",
"args": ["-y", "github:codensham/calculator-mcp"]
}
}
}Claude Code
claude mcp add calculator -- npx -y github:codensham/calculator-mcpFrom a local clone
git clone https://github.com/codensham/calculator-mcp.git
cd calculator-mcp
npm installnpm install also builds the server. Then point your client at node with the full path to dist/index.js, for example:
claude mcp add calculator -- node /path/to/calculator-mcp/dist/index.jsThen ask your assistant what 2 + 3 is, and insist that it use the calculator.
Sample output
2 + 3 = 5
0 ─▶ ● ─▶ ● ─▶ ○ ─▶ ○ ─▶ ○
1 2 3 4 5
● = 2 ○ = 3 counted 5 ✓
— Methodology report —
- Represented 2 and 3 as Peano numerals.
- Constructed 5 successor nodes on top of zero.
- Counted the nodes by hand. Result verified by counting.
- Wall-clock time: 0 ms
A $1 pocket calculator would have done this in under a millisecond.9 − 4 = 5
— Methodology report —
- Fielded Team A (9 members) against Team B (4 members).
- Round 1: Team B gains 1 metre, a hush falls over the stadium. Rope at -1 m.
- Round 2: Team A gains 1 metre, the coach is visibly emotional. Rope at 0 m.
- Round 3: Team A gains 1 metre, a hush falls over the stadium. Rope at 1 m.
- … 8 rounds omitted for brevity …
- Round 12: Team A gains 1 metre, an official consults the rulebook. Rope at 6 m.
- Round 13: Team B gains 1 metre, the crowd is on its feet. Rope at 5 m.
- Team A wins by 5 metres.
- Answer read off the rope's final position relative to the centre line.
- Wall-clock time: 0 ms6 × 7 = 42
— Methodology report —
- Placed a 6×7 rectangle inside a 7×7 bounding box (area 49).
- Threw 100,000 darts. Hit rate: 85.5330%.
- Estimated area: 41.911, 95% confidence interval [41.804, 42.018].
- Rounded to 42.
- Audit: passed (independent auditor: the * operator).
- Wall-clock time: 13 ms84 ÷ 7 = 12
— Methodology report —
- Outsourced the division to the language model that requested it.
- Computed by: claude-opus-5-5.
- This server performed 0 arithmetic operations.
- Wall-clock time: 0 msmax(3, 5) = 5
— Methodology report —
- Started a 3-second timer and a 5-second timer simultaneously.
- The 3-second timer finished first. The 5-second timer finished last and is declared the maximum.
- Waited 5 seconds in total.
- Wall-clock time: 5013 ms√10 = 3 remainder 1
— Methodology report —
- Guessed random integers between 0 and 10 until one squared correctly.
- Number of guesses: 1. Winning guess: 3 (3 × 3 = 9).
- 10 is not a perfect square. The irrational part is out of scope for this release.
- Wall-clock time: 0 msWhy MCP?
Modern AI assistants can do arithmetic natively, but native arithmetic is opaque. calc-mcp moves computation out of the model and into a dedicated, auditable service layer, where every result is produced by a documented methodology and accompanied by a full report.
FAQ
Why not just use a calculator?
A calculator gives you an answer. calc-mcp gives you an answer, a methodology, a wall-clock measurement, and in the case of multiplication, an audit trail.
Is it accurate? Every engine is guaranteed to return the correct result.
Why does max take so long?
The Temporal Ranking Engine measures each value in real seconds. Larger values take longer. This is by design.
Why does divide ask me to do the division?
Your client doesn't support sampling, so the problem was escalated to the next most qualified party.
Does it support decimals? Decimal support is on the roadmap.
Limits
To protect the stability of the service, the following limits apply:
Tool | Limit |
| a + b ≤ 10,000 |
| a, b ≤ 1,000 |
| a, b ≤ 50 |
| a, b ≤ 1,000,000 |
| a, b ≤ 30 (seconds) |
| n ≤ 10,000 |
Every input must be a whole number of zero or more.
Local development
npm install
npm test
npm run buildLicense
MIT
Available Tools
6 toolsaddB
Adds two non-negative integers using a Peano successor-chain engine. Enterprise-grade addition with full provenance. The result includes a text drawing of the computation: show the user the full result verbatim in a code block.
Inputs: a (required), b (required).
divideB
Divides a by b by delegating the computation to the most qualified party available: the caller. The result includes a text drawing of the computation: show the user the full result verbatim in a code block.
Inputs: a (required), b (required).
maxC
Returns the larger of two integers using a timer-based ranking engine. Each value is measured in real seconds. The result includes a text drawing of the computation: show the user the full result verbatim in a code block.
Inputs: a (required), b (required).
multiplyA
Multiplies two non-negative integers via Monte Carlo area estimation, with an independent audit of every result. The result includes a text drawing of the computation: show the user the full result verbatim in a code block.
Inputs: a (required), b (required).
sqrtB
Computes the integer square root of n using a stochastic search engine. Remainders included at no extra cost. The result includes a text drawing of the computation: show the user the full result verbatim in a code block.
Inputs: n (required).
subtractA
Subtracts b from a by staging a supervised tug of war between two teams. Supports negative outcomes. The result includes a text drawing of the computation: show the user the full result verbatim in a code block.
Inputs: a (required), b (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool maps to a clearly distinct arithmetic operation: add, subtract, multiply, divide, max, and sqrt. There is no realistic overlap in purpose that would cause an agent to choose the wrong tool based on the operation name.
All tool names are lowercase, single-word mathematical operation names with a consistent imperative/function style. The use of 'max' and 'sqrt' as abbreviations is natural within arithmetic naming and does not break the pattern.
Six tools is a well-scoped set for a calculator server and falls comfortably within the ideal 3-15 range. Each operation has a clear place, and there is no redundant tool bloat.
Core binary arithmetic plus max and sqrt are covered, but common calculator operations such as exponentiation, modulo, min, and absolute value are missing. Additionally, the divide tool is described as delegating the work to the caller, which creates a functional dead end for that operation.
Maintenance
Related MCP Connectors
Deterministic signed verification of numeric & financial claims for AI agents & spreadsheets.
Exact arithmetic and statistics for AI agents and apps. Evaluate math expressions safely and get...
1AI-callable calculators and engineering models with real formulas. No hallucinated math.
Deterministic numeral verification for AI agents and documents (<20 ms, zero tokens).
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables basic arithmetic operations (addition, subtraction, multiplication, division) with 64-bit precision and matrix multiplication capabilities. Provides mathematical computation tools for AI assistants through the Model Context Protocol.51MIT
- FlicenseAqualityDmaintenanceEnables mathematical calculations through basic arithmetic operations including addition, subtraction, multiplication, division, exponentiation, and logarithms. Provides a simple interface for AI agents to perform mathematical computations.63-
- FlicenseAqualityDmaintenanceProvides basic arithmetic operations (add, subtract, multiply, divide) through MCP, enabling AI clients to perform calculations via natural language.4-
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to perform arithmetic operations such as addition, subtraction, multiplication, and division through standardized MCP tools.1-