calculator-mcp-server

by cyanheads

Not rated
GitHub

About

Math evaluation, simplification, derivatives

Details

Author
cyanheads
Categories
Productivity, Other

Setup

Install calculator-mcp-server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/cyanheads/calculator-mcp-server

Follow the installation instructions in the repository README, then restart your MCP client.

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

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

One tool for all mathematical operations:

A single tool covering 100% of the server's purpose. Theoperationparameter defaults toevaluate, so the common case is just{ expression: "..." }.

- Evaluate— arithmetic, trigonometry, logarithms, statistics, matrices, complex numbers, unit conversion, combinatorics
- Simplify— reduce algebraic expressions symbolically (e.g.,2x + 3x->5 x). Supports algebraic and trigonometric identities
- Derivative— compute symbolic derivatives (e.g.,3x^2 + 2x + 1->6
x + 2)
- Variable scope viascopeparameter:{ "x": 5, "y": 3 }
- Configurable precision for numeric results
- Blank optionalvariableandprecisionvalues from form-based MCP clients are treated as omitted

- Declarative tool definitions — single file per tool, framework handles registration and validation
- Unified error handling across all tools
- Structured logging with optional OpenTelemetry tracing
- Runs locally (stdio/HTTP) or in Docker

- Hardened math.js v15 instance — dangerous functions disabled, evaluation sandboxed viavm.runInNewContext()with timeout
- No auth required — all operations are read-only and stateless
- Input validation: expression length limits, expression separator rejection (semicolons and newlines), variable name regex enforcement
- Result validation: blocked result types (functions, parsers, result sets), configurable max result size
- Scope sanitization: numeric-only values, prototype pollution prevention (blocked__proto__,constructor, etc.)

A public instance is available athttps://calculator.caseyjhand.com/mcp— no installation required. Point any MCP client at it via Streamable HTTP:

{ "mcpServers": { "calculator-mcp-server": { "type": "streamable-http", "url": "https://calculator.caseyjhand.com/mcp" } } }

Add to your MCP client config (e.g.,claude_desktop_config.json):

{ "mcpServers": { "calculator-mcp-server": { "type": "stdio", "command": "bunx", "args": ["@cyanheads/calculator-mcp-server@latest"] } } }
git clone https://github.com/cyanheads/calculator-mcp-server.git
bun run build bun run start:http # or start:stdio
bun run devcheck # Lints, formats, type-checks bun run test # Runs test suite
docker build -t calculator-mcp-server . docker run -p 3010:3010 calculator-mcp-server

SeeAGENTS.mdorCLAUDE.mdfor development guidelines and architectural rules. The short version:

- Handlers throw, framework catches — notry/catchin tool logic
- Usectx.logfor logging
- Register new tools and resources insrc/index.ts

Issues and pull requests are welcome. Run checks before submitting:

A MCP server that enables AI assistants to interact with Anki, the spaced repetition flashcard application.

Automated document processing and extraction

Great Question is an Agentic UX research platform for product builders. Its MCP lets AI agents create studies directly from any AI tool, surface insights, find the right research candidates, and query your entire research repository.

Create spaced repetition flashcards in Rember to remember anything you learn in your chats

Create and edit Tally forms and analyze submissions

Turn YouTube playlists into AI-generated flashcards with spaced repetition — create, search, and export decks via MCP.

An MCP server for ActivityWatch, allowing interaction with your personal time tracking data.

AI2Fin | Intelligent Financial Management

Tools for expense tracking, tax deductions, bill management, and financial analysis.

Manage Anki flashcards and decks using the Anki-Connect plugin.

Manage Anki flashcards and decks via the AnkiConnect plugin.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.