Skip to content
MCP server
RegistryRemote

calculator-mcp-server MCP Server

Evaluate, simplify, and differentiate mathematical expressions.

calculator-mcp-server scores 72 (Good), licensed Apache-2.0 and written in TypeScript. It can be reached as a remote MCP endpoint. It declares 1 tool. Filed under AI and memory. GitHub shows 3 stars. Package registries report about 514 downloads a week. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.

by cyanheadsApache-2.0TypeScript3 stars
Trust score
72Good
Trust score 72 of 100, Good

Good trust

72 of 100 from six public signals. Nobody can buy a point.

  • Listed in the official MCP registry.
  • OSI-style license: apache-2.0.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 72 comes from

22 + 20 + 6 + 10 + 4 + 10 = 72. Each factor is capped, so no single signal can carry a listing.

Registry22 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 22 of 30 points.
Maintenance20 / 20

How recently the repository saw a commit or release.

Maintenance: 20 of 20 points.
Popularity6 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 6 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs10 / 10

A real summary, a README with depth, listed tools.

Docs: 10 of 10 points.

Install

Pick your client, copy the config, paste it in.

Remote auth: No sign-in detected. Our check reached the endpoint without being asked for credentials. Some servers only check keys after connecting, so follow the provider's setup notes. Security tips

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "cyanheads-calculator-mcp-server": {      "command": "npx",      "args": [        "-y",        "@cyanheads/calculator-mcp-server@0.6.0"      ],      "env": {        "CALC_MAX_EXPRESSION_LENGTH": "4000",        "CALC_EVALUATION_TIMEOUT_MS": "5000",        "CALC_MAX_RESULT_LENGTH": "100000",        "MCP_LOG_LEVEL": "info"      }    }  }}

Environment variables

NameRequiredNotes
CALC_MAX_EXPRESSION_LENGTHOptionalMaximum allowed expression string length.
CALC_EVALUATION_TIMEOUT_MSOptionalMaximum evaluation time in milliseconds.
CALC_MAX_RESULT_LENGTHOptionalMaximum result string length in characters.
MCP_LOG_LEVELOptionalSets the minimum log level for output (e.g., 'debug', 'info', 'warning').
MCP_TRANSPORT_TYPEOptionalSelects the HTTP transport.
CALC_MAX_EXPRESSION_LENGTHOptionalMaximum allowed expression string length.
CALC_EVALUATION_TIMEOUT_MSOptionalMaximum evaluation time in milliseconds.
CALC_MAX_RESULT_LENGTHOptionalMaximum result string length in characters.
MCP_HTTP_HOSTOptionalThe hostname for the HTTP server.
MCP_HTTP_PORTOptionalThe port to run the HTTP server on.
MCP_HTTP_ENDPOINT_PATHOptionalThe endpoint path for the MCP server.
MCP_AUTH_MODEOptionalAuthentication mode to use: 'none', 'jwt', or 'oauth'.
MCP_LOG_LEVELOptionalSets the minimum log level for output (e.g., 'debug', 'info', 'warning').

Tools1Tool docs quality grade F

All capabilities

About

Version License Docker MCP SDK npm TypeScript Bun

Install in Claude Desktop Install in Cursor Install in VS Code

Framework

Public Hosted Server: https://calculator.caseyjhand.com/mcp


Overview

Calculator powered by math.js. Verify numeric results, simplify algebraic expressions, and compute symbolic derivatives through one tool.

Tools

ToolDescription
calculateEvaluate math expressions, simplify algebraic expressions, or compute symbolic derivatives.

Resources

ResourceDescription
calculator://helpAvailable functions, operators, constants, and syntax reference.

Skills

SkillDescription
calculator-guideWhich numericType answers which question, what a result does not prove (integer-looking floats, tolerance-based ==, lusolve on a singular matrix, a simplify that stops short of 0), and workflows for derivative checks, business-day deadlines, statistics by dimension, unit chains, and integral tails

The server serves it over MCP as skill://calculator-guide/SKILL.md; it also ships in skills/ in the npm package and Docker image.

Capability reference

calculate tool

  • One expression per call, up to 4,000 characters by default. operation selects evaluate (default), simplify, or derivative (requires variable, e.g. "x"); scope assigns numeric variables ({ "x": 5 }) and precision sets 1–16 significant digits, both for evaluate only.
  • Covers arithmetic, trigonometry, logarithms, statistics, matrices and linear systems (lusolve), polynomial roots (polynomialRoot), complex numbers, units, combinatorics, dates as quoted YYYY-MM-DD strings (dateDiff, dateAdd, weekday, isoWeek, daysInMonth), and numeric definite integrals (integrate(f, x, a, b)). Accepts **, ×, ÷, −, and ° (°C, °F) as math.js operators in every operation; × and ** take scalar operands.
  • numericType selects number, BigNumber (64 significant digits, for values that overflow a 64-bit float), or Fraction (exact rationals, including integer combinatorics and rational roots: 5! → 120/1). Fraction mode returns fraction_unsupported when a result has no exact rational value (sqrt(2), 2^(1/2)), the expression calls a function Fraction mode cannot compute (log2(8), stirlingS2(5, 2)), or it uses a value Fraction mode holds only as a rounded float (pi, random()).
  • Returns the result string, result type, original expression, and operation; simplify sets unchanged: true when it cannot reduce the expression (it does no polynomial factoring or rational cancellation). Failures carry a typed reason and a recovery hint.

calculator://help resource

  • Markdown reference for functions, operators, constants, units, limits, and expression syntax; no parameters.
  • Worked examples cover scope, matrices, polynomial roots, dates, integrals, complex numbers, precision, each numericType, and all three operations.
  • Cacheable for 24 hours with public scope (cacheHint) — static content that never changes at runtime.

Features

Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.

Calculator-specific:

  • Hardened math.js v15 instance — dangerous functions disabled, evaluation run under a vm timeout
  • No auth required — all operations are read-only and stateless, and nothing reads a clock (now() and today() are rejected; pass dates as strings)
  • Input validation: expression length limits and rejection of multiple statements; matrix row separators and string contents remain valid; nesting past the call stack fails with expression_too_deep
  • Result validation: blocked result types (functions, parsers, result sets), configurable max result size
  • Size limits: functions that build a matrix, range, or string from a size, product, broadcast, index, or precision argument are capped per call, stirlingS2, bellNumbers, and bernoulli bound their arguments, and each evaluation has a total element budget; oversized requests fail fast with result_too_large. integrate() uses at most 500 subintervals per call
  • Scope sanitization: numeric-only values, prototype pollution prevention (blocked __proto__, constructor, etc.)

Agent-friendly output:

  • Effective-call echo — every response echoes the expression and operation, plus which scope variables and what precision were applied, so agents can verify what was actually computed
  • Discriminated output contracts — unchanged: true on simplify flags a no-op result instead of silently returning the same expression
  • Typed error reasons — validation and evaluation failures carry a typed reason (e.g. fraction_unsupported, evaluation_timeout, disallowed_result_type) plus an actionable recovery hint, rather than a raw exception

Getting started

Connect to the hosted instance, no install:

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

Or run it locally:

claude mcp add calculator-mcp-server -- npx -y @cyanheads/calculator-mcp-server

For other clients, add this to the MCP config file:

{
  "mcpServers": {
    "calculator-mcp-server": {
      "command": "npx",
      "args": ["-y", "@cyanheads/calculator-mcp-server"]
    }
  }
}

For Docker or a source build, see Running the server.

Configuration

VariableDescriptionDefault
CALC_MAX_EXPRESSION_LENGTHMaximum allowed expression string length (10–10,000).4000
CALC_EVALUATION_TIMEOUT_MSMaximum evaluation time in milliseconds (100–30,000).5000
CALC_MAX_RESULT_LENGTHMaximum result string length in characters (1,000–1,000,000).100000
MCP_TRANSPORT_TYPETransport: stdio or http.stdio
MCP_HTTP_HOSTHostname for the HTTP server.127.0.0.1
MCP_HTTP_PORTPort for HTTP server.3010
MCP_HTTP_ENDPOINT_PATHPath for the HTTP MCP endpoint./mcp
MCP_HTTP_MAX_BODY_BYTESMaximum inbound HTTP request size; 0 disables the limit.1048576
MCP_AUTH_MODEAuth mode: none, jwt, or oauth.none
MCP_SESSION_MODEauto, stateful, or stateless. The server declares stateless in code, so every launch path resolves the same way; setting this overrides that declaration.stateless
MCP_LOG_LEVELLog level (RFC 5424).info

See .env.example for optional session, resumability, logging, and telemetry settings.

Running the server

Local development

Requires Bun v1.4.4 or higher. The built server also runs on Node.js v24+.

  • Clone and install:

    git clone https://github.com/cyanheads/calculator-mcp-server.git
    cd calculator-mcp-server && bun install
    cp .env.example .env
    
  • Build and run the production version:

    bun run build
    bun run start:http   # or start:stdio
    
  • Run checks and tests:

    bun run devcheck     # Lints, formats, type-checks
    bun run test         # Runs test suite
    

Docker

docker run --rm -p 3010:3010 ghcr.io/cyanheads/calculator-mcp-server:latest

The image defaults to Streamable HTTP on port 3010, stateless sessions, and logs at /var/log/calculator-mcp-server. For stdio, use docker run -i --rm -e MCP_TRANSPORT_TYPE=stdio ghcr.io/cyanheads/calculator-mcp-server:latest. To build locally, run docker build -t calculator-mcp-server .; OpenTelemetry dependencies are installed by default, and --build-arg OTEL_ENABLED=false omits them.

Project structure

DirectoryPurpose
src/mcp-server/tools/Tool definitions (*.tool.ts).
src/mcp-server/resources/Resource definitions (*.resource.ts).
src/services/Domain service integrations (MathService).
skills/Published skills, served over MCP and shipped in the package.
src/config/Environment variable parsing and validation with Zod.
docs/Generated directory tree.
tests/Calculation, configuration, and response-contract tests.

Development guide

See AGENTS.md or CLAUDE.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for logging
  • Register new tools and resources in src/index.ts

Contributing

Issues are welcome. Run checks before submitting:

bun run devcheck
bun run test

License

Apache-2.0 — see LICENSE for details.

Frequently asked questions

What is calculator-mcp-server MCP Server?

Evaluate, simplify, and differentiate mathematical expressions.

How do I install calculator-mcp-server MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. calculator-mcp-server MCP Server runs locally from the npm package @cyanheads/calculator-mcp-server with the command npx -y @cyanheads/calculator-mcp-server@0.6.0.

Is calculator-mcp-server MCP Server free and open source?

Yes. calculator-mcp-server MCP Server is released under the Apache-2.0 license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

Does calculator-mcp-server MCP Server support remote (HTTP) connections?

Yes. calculator-mcp-server MCP Server offers a hosted endpoint over Streamable HTTP, so HTTP-capable clients can connect to it without running anything locally.

What tools does calculator-mcp-server MCP Server provide?

calculator-mcp-server MCP Server provides 1 tool: ctx.log. See the full tool list for descriptions and parameters.

How is calculator-mcp-server MCP Server's trust score calculated?

calculator-mcp-server MCP Server scores 72 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

—Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server