CALCULATE_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., "@CALCULATE_MCP what's 0.1 + 0.2 exactly, with 50 decimal places?"
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.
CALCULATE_MCP
Deterministic calculation tools for LLMs via the Model Context Protocol (MCP).
Instead of asking a language model to do arithmetic in hidden reasoning, CALCULATE_MCP gives it explicit deterministic tools for arithmetic, high-precision decimals, units, statistics, finance, matrices, complex numbers, numerical calculus, probability distributions, date math, and root solving.
Built for the 2026 MCP TypeScript SDK v2 and usable over both Streamable HTTP and stdio.
Tools
Tool | Purpose |
| Safe arithmetic/scientific expression evaluation with variables |
| 1-200 digit decimal arithmetic using |
| Length, mass, time, area, volume, speed, data, temperature |
| Discover accepted unit symbols |
| Mean, median, variance, standard deviation, quartiles, IQR |
| Percent-of, percent ratio, increase/decrease, percentage change |
| Compound FV/PV and periodic loan payments |
| Bracketed numerical root solving with bisection |
| Add/subtract/multiply/transpose/determinant/inverse/solve Ax=b |
| Complex add/subtract/multiply/divide/abs/arg/conjugate/pow/sqrt |
| Numerical derivative and definite integral |
| Normal PDF/CDF, binomial PMF/CDF, Poisson PMF/CDF |
| ISO date add/difference/weekday/business-day calculations |
Related MCP server: Math-MCP
Why another calculator MCP?
The point is not to replace a pocket calculator. The point is to give an LLM a deterministic numerical execution layer that it can call whenever a response depends on exact arithmetic or repeatable numerical methods.
The expression evaluator does not use JavaScript eval. Expressions are parsed by a dedicated math parser with assignment, logical expressions, conditionals, concatenation, and membership operators disabled.
For decimal-sensitive work such as 0.1 + 0.2, use calculate_decimal:
{
"operation": "add",
"a": "0.1",
"b": "0.2",
"precision": 50
}Result: 0.3.
Advanced examples
Matrix solve:
{
"operation": "solve",
"a": [[2, 1], [1, -1]],
"b": [5, 1]
}Numerical derivative:
{
"operation": "derivative",
"expression": "x^3",
"x": 2
}Normal CDF:
{
"distribution": "normal",
"operation": "cdf",
"params": { "x": 1.96, "mean": 0, "sd": 1 }
}Date math uses YYYY-MM-DD and UTC calendar semantics. business_days counts Monday-Friday and does not remove public holidays.
Run over HTTP
Requires Node.js 22+.
npm install
npm run build
npm startMCP endpoint: http://localhost:3000/mcp
Health check: GET /health
Environment variables:
Variable | Default | Description |
|
| HTTP port |
|
| Bind address |
| unset | Comma-separated public hostnames for Host validation |
For public deployment, set ALLOWED_HOSTS, for example:
ALLOWED_HOSTS=calculate.example.com npm startRun over stdio
npm install
npm run build
npm run start:stdioExample local MCP client configuration:
{
"mcpServers": {
"calculate": {
"command": "node",
"args": ["/absolute/path/to/CALCULATE_MCP/dist/src/stdio.js"]
}
}
}Expression syntax
Examples:
2 + 3 * 4
sqrt(2)^2
sin(pi / 2)
log10(1000)
a*b + c
x^3 - x - 2Constants: pi, e, tau.
Functions include abs, sqrt, sin, cos, tan, inverse/hyperbolic trig, ln, log10, log2, exp, min, max, hypot, floor, ceil, round, trunc, and sign.
Supported units
Call list_units for the machine-readable list. Categories include length, mass, time, area, volume, speed, data size, and temperature.
Numerical-method notes
Matrix inverse/solve use Gaussian elimination with partial pivoting.
Derivatives use a five-point central difference.
Definite integrals use Simpson's rule.
Root solving uses bisection and requires a sign-changing bracket.
Probability functions are deterministic numerical implementations; they are not intended as a replacement for specialized high-precision statistical libraries in extreme-tail scientific work.
Development
npm install
npm run check
npm test
npm run buildLicense
MIT
Available Tools
13 toolscalculate_calculusC
Numerical calculus for one-variable expressions: five-point numerical derivative or Simpson definite integral.
Inputs: operation (required), expression (required), x, step, +3 more.
calculate_complexC
Complex-number arithmetic using {re, im}: add, subtract, multiply, divide, magnitude, argument, conjugate, power, and square root.
Inputs: a (required), operation (required), b.
calculate_dateB
Deterministic ISO calendar math in UTC: add days/weeks/months/years, date difference, weekday, or weekday-only business-day count.
Inputs: date (required), operation (required), unit, amount, +1 more.
calculate_decimalB
Perform high-precision decimal arithmetic without IEEE-754 surprises. Inputs are decimal strings and precision can be 1-200 significant digits.
Inputs: a (required), operation (required), b, precision.
calculate_expressionA
Safely evaluate a mathematical expression with optional numeric variables. Supports arithmetic, powers, factorial, trig, logs, sqrt, min/max, pi, e, and tau.
Inputs: expression (required), variables.
calculate_financeC
Calculate compound future/present value or periodic loan payment.
Inputs: years (required), operation (required), principal (required), annualRatePercent (required), +1 more.
calculate_matrixC
Matrix arithmetic: add, subtract, multiply, transpose, determinant, inverse, and solve Ax=b.
Inputs: a (required), operation (required), b.
calculate_percentageC
Calculate percent-of, what-percent, increase/decrease, and percentage change.
Inputs: x (required), y (required), operation (required).
calculate_probabilityC
Evaluate normal PDF/CDF, binomial PMF/CDF, or Poisson PMF/CDF.
Inputs: params (required), operation (required), distribution (required).
convert_unitsC
Convert common length, mass, time, area, volume, speed, data-size, and temperature units.
Inputs: to (required), from (required), value (required), category (required).
list_unitsA
List every accepted unit symbol, grouped by category.
Inputs: no named parameters.
solve_rootB
Numerically solve f(x)=0 on a bracket using robust bisection.
Inputs: lower (required), upper (required), expression (required), tolerance, +1 more.
summarize_statisticsB
Compute descriptive statistics: count, sum, mean, median, range, variance, standard deviation, quartiles, and IQR.
Inputs: values (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool targets a distinct mathematical subdomain (expression evaluation, decimal precision, units, statistics, percentage, finance, root solving, matrix, complex, calculus, probability, date). Overlap is minimal and descriptions clarify when to use specialized tools like calculate_finance versus calculate_expression.
All tool names follow a consistent snake_case verb_noun pattern (e.g., calculate_expression, convert_units, list_units). The variation in verbs (calculate, convert, list, summarize, solve) is appropriate and predictable.
13 tools is well within the ideal 3-15 range for a multi-domain calculation server. Each tool covers a distinct area and earns its place without redundancy.
The surface covers a broad range of mathematical operations, from basic arithmetic to finance, statistics, and calculus. Minor gaps exist (e.g., base conversion, random number generation, polynomial root finding without brackets), but core workflows are well supported.
Maintenance
Related MCP Connectors
Math.js MCP — wraps the mathjs.org API (free, no auth)
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
This MCP server enables users to perform scientific computations regarding linear algebra and vect…
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol server that exposes 8 mathematical tools (arithmetic, algebra, calculus, matrix operations, statistics, probability, unit conversions) to any MCP-compatible AI agent, enabling mathematical computations without code.811 npm1MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol (MCP) server that provides basic mathematical, statistical and trigonometric functions to Large Language Models (LLMs).5935 npm1MIT
- AlicenseAqualityDmaintenanceA stdio MCP server that gives LLMs a safe scientific calculator with infix math, complex numbers, matrices, statistics, unit conversions, and more via tools that return JSON.331MIT
- FlicenseAqualityCmaintenanceEnables AI agents to perform arithmetic operations — addition, subtraction, multiplication, and division with divide-by-zero validation — through MCP tool calls. It can be run locally over stdio or as an HTTP microservice via streamable-http transport.4-