Calculator MCP server β evaluate, simplify, and differentiate math expressions.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
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:
| Tool Name | Description |
|---|---|
calculate | Evaluate math expressions, simplify algebraic expressions, or compute symbolic derivatives. |
calculateA single tool covering 100% of the server's purpose. The operation parameter defaults to evaluate, so the common case is just { expression: "..." }.
2x + 3x -> 5 * x). Supports algebraic and trigonometric identities3x^2 + 2x + 1 -> 6 * x + 2)scope parameter: { "x": 5, "y": 3 }variable and precision values from form-based MCP clients are treated as omitted| URI Pattern | Description |
|---|---|
calculator://help | Available functions, operators, constants, and syntax reference. |
Built on @cyanheads/mcp-ts-core:
Calculator-specific:
vm.runInNewContext() with timeout__proto__, constructor, etc.)A public instance is available at https://calculator.caseyjhand.com/mcp β no installation required. Point any MCP client at it via Streamable HTTP:
Add one of the following to your MCP client configuration file:
Or with npx (no Bun required):
Or with Docker:
| Variable | Description | Default |
|---|---|---|
CALC_MAX_EXPRESSION_LENGTH | Maximum allowed expression string length (10β10,000). | 1000 |
CALC_EVALUATION_TIMEOUT_MS | Maximum evaluation time in milliseconds (100β30,000). | 5000 |
CALC_MAX_RESULT_LENGTH | Maximum result string length in characters (1,000β1,000,000). | 100000 |
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_HTTP_HOST | Hostname for the HTTP server. | localhost |
MCP_HTTP_PORT | Port for HTTP server. | 3010 |
MCP_HTTP_ENDPOINT_PATH | Path for the HTTP MCP endpoint. | /mcp |
MCP_HTTP_MAX_BODY_BYTES | Maximum inbound HTTP request size; 0 disables the limit. | 1048576 |
MCP_AUTH_MODE | Auth mode: none, jwt, or oauth. | none |
MCP_LOG_LEVEL | Log level (RFC 5424). | info |
See .env.example for optional session, resumability, logging, and telemetry settings.
Build and run the production version:
Run checks and tests:
The image defaults to Streamable HTTP on port 3010, stateless sessions, and logs at /var/log/calculator-mcp-server.
| Directory | Purpose |
|---|---|
src/mcp-server/tools/ | Tool definitions (*.tool.ts). |
src/mcp-server/resources/ | Resource definitions (*.resource.ts). |
src/services/ | Domain service integrations (MathService). |
src/config/ | Environment variable parsing and validation with Zod. |
docs/ | Generated directory tree. |
See AGENTS.md or CLAUDE.md for development guidelines and architectural rules. The short version:
try/catch in tool logicctx.log for loggingsrc/index.tsIssues and pull requests are welcome. Run checks before submitting:
Apache-2.0 β see LICENSE for details.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/calculator-mcp-server)<a href="https://allmcps.com/mcp/calculator-mcp-server"><img src="https://allmcps.com/api/badge/calculator-mcp-server?style=directory" alt="Calculator MCP Server on AllMCPs" /></a>