cyanheads avatar

Calculator Mcp Server

cyanheads/calculator-mcp-server

A hardened math.js wrapper that gives Claude a single `calculate` tool for evaluation, symbolic simplification, and derivatives. Handles arithmetic, trig, matrices, unit conversion, and more with configurable precision and variable scoping. Built with sandbox isolation (disabled dangerous functions, vm context with timeout, input validation blocking semicolons and prototype pollution). Ships as both stdio and streamable HTTP with a public hosted instance at calculator.caseyjhand.com, so you can point Claude at it without installing anything. Reach for this when you need Claude to crunch numbers, simplify algebraic expressions, or compute symbolic derivatives without writing your own math service.

GitHub stars
3
tool
1
transport
STDIO, HTTP
env vars
9
last updated
Nov 12, 2026

Install

From registry metadata
$ npx add-mcp https://calculator.caseyjhand.com/mcp --name calculator

Run in your terminal. add-mcp asks which agents to add it to (Claude Code, Codex, Cursor and more). Add -g to install it for every project.

Review the command, arguments and environment values before installing. MCP servers run with your local permissions.

Other ways

Claude Code

$ claude mcp add --transport http calculator https://calculator.caseyjhand.com/mcp

Run in your terminal. Add --scope user to make it available in every project.

Tools

Verified live · 1 tools

Verified live against the running server on Nov 13, 2026.

calculateEvaluate math expressions, simplify algebraic expressions, or compute symbolic derivatives. One expression per call. Supports arithmetic, trigonometry, statistics, matrices, linear systems, polynomial roots, complex numbers, units, combinatorics, calendar dates (quoted YYYY-MM...6 params

Evaluate math expressions, simplify algebraic expressions, or compute symbolic derivatives. One expression per call. Supports arithmetic, trigonometry, statistics, matrices, linear systems, polynomial roots, complex numbers, units, combinatorics, calendar dates (quoted YYYY-MM...

Parameters* required
expression*string
One mathematical expression per call, at most 4,000 characters by default — neither `;` nor newlines separate statements. Inside matrices, `;` separates rows (e.g. `[1, 2; 3, 4]`). Supports arithme...
numericTypestring
Numeric type for evaluate. "number" (default): 64-bit IEEE 754 float — fastest, about 16 significant digits; a value past about 1.8e308 (171!, 2^1024, exp(1000)) overflows and fails with undefined_...one of number · BigNumber · Fractiondefault: number
operationstring
Operation to perform. "evaluate" computes a numeric result (default). "simplify" reduces an algebraic expression symbolically (e.g., "2x + 3x" -> "5 * x"). Supports algebraic and trigonometric iden...one of evaluate · simplify · derivativedefault: evaluate
precisionvalue
Significant digits (1–16) for numeric results. Omit for full precision. Empty string is treated as omitted. Fraction results always print exactly, and symbolic operations (simplify, derivative) ign...
scopeobject
Variable assignments for evaluate; simplify and derivative ignore them. Example: { "x": 5, "y": 3 } makes "x + y" evaluate to 8. Values take the selected numericType: "BigNumber" reads each value f...
variablevalue
Variable to differentiate with respect to. Required when operation is "derivative". Empty string is treated as omitted. Example: "x".

Sponsors

Configuration

CALC_MAX_EXPRESSION_LENGTHdefault: 4000

Maximum allowed expression string length.

CALC_EVALUATION_TIMEOUT_MSdefault: 5000

Maximum evaluation time in milliseconds.

CALC_MAX_RESULT_LENGTHdefault: 100000

Maximum result string length in characters.

MCP_LOG_LEVELdefault: info

Sets the minimum log level for output (e.g., 'debug', 'info', 'warning').

MCP_TRANSPORT_TYPEdefault: http

Selects the HTTP transport.

MCP_HTTP_HOSTdefault: 127.0.0.1

The hostname for the HTTP server.

MCP_HTTP_PORTdefault: 3010

The port to run the HTTP server on.

MCP_HTTP_ENDPOINT_PATHdefault: /mcp

The endpoint path for the MCP server.

MCP_AUTH_MODEdefault: none

Authentication mode to use: 'none', 'jwt', or 'oauth'.

Readme

@cyanheads/calculator-mcp-server

Evaluate, simplify, and differentiate mathematical expressions via MCP. STDIO or Streamable HTTP.

1 Tool • 1 Resource • 1 Skill

Version License Docker MCP SDK npm TypeScript Bun


View the full README on GitHub

Details

Repository
github.com/cyanheads/calculator-mcp-server
Package
@cyanheads/calculator-mcp-server
Transport
STDIO, HTTP
Registry
MCP registry, active
Resources
2
Tools verified
Nov 13, 2026

More from cyanheads