What it does
calcport evaluates arithmetic expressions that use the operators + - * / % ^, parentheses, unary minus, the functions sqrt, abs, floor, ceil and round, and the constants pi and e. According to the publisher, its evaluator is a hand-written parser, so an expression cannot run as code, make a shell call or perform a property lookup. Four single-purpose operations (add, subtract, multiply, divide) are also provided.
It suits callers that need one numeric result from an expression, or only a single sum, difference, product or quotient, whether from an MCP client or from the command line.
The package runs as a container image, which starts the MCP server by default; passing CLI arguments runs it as a CLI instead. The MCP server runs over stdio through the mcp subcommand and is set up in an MCP client. The calculate tool returns the numeric result with the expression echoed back, and the four operation tools return the result with both operands. In CLI mode, exit code 0 means success, 1 means the calculation cannot be done, and 2 means a usage error.
Limitations and requirements
Expressions are limited to the operators, functions and constants listed above. Division by zero and malformed expressions produce errors; in CLI mode these return exit code 1, and the divide tool returns an error when dividing by zero. Running as an MCP server requires an MCP client to be configured.
Safety
Our team has not reviewed this resource. Only automated rules checked it; resources with high-risk signals are not published. These are signals, not a guarantee that installing it is safe. Try it in a sandbox project first.
- Runs code or changes an assistant's behaviour
Sources
- Official MCP Registry first seen 13 Nov 2026 · last seen 13 Nov 2026 · its page on the source
io.github.CloudCorpRecords/calcport
Safe arithmetic: evaluate expressions and add, subtract, multiply, divide.
v0.1.0As shown on registry.modelcontextprotocol.io when we last read it