MCP server that evaluates mathematical expressions. Built with FastMCP, runs on the Bun runtime and uses expr-eval for parsing.
https://github.com/pwh-pwh/cal-mcpStop switching between your AI conversation and a calculator app. The cal-mcp server gives Claude, ChatGPT, and other AI assistants native mathematical calculation abilities that go far beyond basic arithmetic.
You're deep in a technical discussion about algorithm complexity, financial modeling, or system performance calculations. Your AI assistant understands the concepts but stumbles on the actual math—giving you approximated results or punting with "you'll need to calculate this yourself."
cal-mcp solves this frustration by embedding a sophisticated mathematical expression evaluator directly into your AI workflow. No more context switching, no more manual verification of calculations.
Handles Complex Expressions: While basic calculators do 2 + 2, cal-mcp processes expressions like E^(PI/4) * cos(0.5) + sqrt(144) and returns precise results instantly.
Built-in Mathematical Constants: Includes PI, E, and boolean values, so your AI can work with real mathematical formulas without approximations.
Lightning Fast: Runs on Bun runtime with expr-eval parsing—calculations complete in milliseconds, keeping your AI conversations flowing naturally.
Zero Context Loss: Results integrate seamlessly into AI responses, maintaining the conversational flow without breaking to external tools.
Financial Analysis: "Calculate the compound interest for a $50,000 investment at 7.2% over 15 years compounded monthly" gets immediate, precise results within the conversation.
Engineering Calculations: Your AI can instantly solve for stress calculations, electrical load computations, or signal processing formulas while explaining the concepts.
Data Science Work: Statistical calculations, probability distributions, and data transformations happen inline with AI explanations and insights.
Algorithm Performance: When discussing Big O complexity, your AI can calculate and compare actual runtime values for different input sizes.
Install via Smithery with one command:
npx -y @smithery/cli install @pwh-pwh/cal-mcp --client claude
The server integrates directly with Claude Desktop, giving your AI assistant immediate access to the cal tool. No API keys, no configuration complexity—it just works.
For manual setup, add this to your MCP client configuration:
"cal-mcp": {
"name": "计算",
"command": "bunx",
"args": ["cal-mcp"]
}
Instead of:
You get:
This isn't just about convenience—it's about unlocking AI conversations that can handle quantitative analysis end-to-end. Your AI becomes a true analytical partner, not just a conversational interface that hands off the math homework.
Ready to give your AI real mathematical capabilities? Install cal-mcp and stop breaking conversation flow for basic calculations.