evaluate_batchLABSCO SUMMARY
Small on purpose, and hard where it matters.
A language model doing arithmetic in its head is guessing; this makes the answer a computed one, and the batch call means a page of figures costs a single round trip. The author's own notes on parser bugs found during development — grammar ambiguity around -5, precision loss on expressions like 1e20 + 1 - 1e20 — say more about the care taken than a feature list would.
What it is
A small Rust server that parses and evaluates arithmetic expressions and hands the model a real result. It covers the four operators with correct precedence, parentheses, decimals, scientific notation and unary minus, and returns a typed error rather than a wrong number when the input is malformed.
What you get
evaluate_batchtakes a list of expressions and returns the results in one call- Full precedence and grouping:
(2 + 3) * 4evaluates the way it reads - Scientific notation —
1e10,2.5e-3,1.23E+4— and decimals such as3.14159 - Unary operators, including nested forms like
-(5 + 3) - Division by zero surfaces as a distinct error instead of a NaN drifting through the answer
- The same binary doubles as a CLI:
cargo run --bin stdio_direct -- eval "2 + 3 * 4"
Requirements
Nothing to sign up for. Build with cargo build --release and point your client at the stdio_direct binary in target/release. Communicates over stdio. MIT licensed.
Setup effort
Build from source — git clone https://github.com/inanna-malick/calculate-mcp
USE CASES
Getting a total you can rely on
Hand the expression over instead of letting the model compute it, and get a real result or a real error.
Recomputing a column of figures
Send the whole list of expressions in one call rather than a tool call per row.
Working with values in scientific notation
Mix 1e10 and decimals in the same expression and let the parser handle precedence.
1 tool
Listed in project docs. Your client may show a different list.
BEFORE YOU INSTALL
What to know first
Tools you get
1 tool named in the project's documentation.
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
You clone and build this one yourself.
Server setup
git clone https://github.com/inanna-malick/calculate-mcp
cd calculate-mcp
cargo build --releaseMCP Clients
Any MCP client
{
"mcpServers": {
"compute": {
"command": "<YOUR_PATH_TO_CALCULATE_MCP>/target/release/stdio_direct"
}
}
}