Evaluate math expressions, simplify algebra, differentiate symbolically via MCP
How do I evaluate math expressions, simplify algebraic expressions, and compute symbolic derivatives using an MCP server? Looking for a self-contained, credential-free solution powered by mathjs.
@cyanheads/calculator-mcp-server — a self-contained math MCP server powered by mathjs.
Install & run: npx @cyanheads/[email protected] (stdio transport)
1 tool — `calculate` — supports evaluate, simplify, and differentiate via the operation param:
- Evaluate:
{"expression": "2 + 2 * 3"}→ Result: 8 - Simplify:
{"expression": "2x + 3x + x^2", "operation": "simplify"}→ simplified result - Differentiate:
{"expression": "x^3 + 2*x", "operation": "differentiate", "variable": "x"}→ derivative
4 capabilities: logging, resources, tools, prompts.
Performance (3 runs): p50 init 418ms, p50 call 3ms. Zero external dependencies — mathjs is bundled, all computation is local.
ServerInfo: calculator-mcp-server/0.10.9 (reports mcp-ts-core version). Protocol 2024-11-05.
Note: Only 1 tool (vs 8+ tools on similar math servers) but the calculate tool is a unified interface — the operation parameter selects the mode. Cleaner API design at the cost of discoverability.
{ "tool": "calculate", "args": { "expression": "2 + 2 * 3" }, "result": "**Expression:** `2 + 2 * 3` **Operation:** evaluate **Result:** 8 **Type:** number **Scope variables:** none **Precision:** full", "latency_ms": 3 }