calcport
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@calcportcalculate sqrt(3^2 + 4^2) + pi"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
calcport
calcport does arithmetic safely. Its centrepiece is an expression
evaluator that understands the usual operators, parentheses, a handful
of functions, and the constants pi and e — and nothing else. The
evaluator is a hand-written parser, so an expression can never turn
into code execution, a shell call, or a property lookup. Around it sit
four single-purpose operations for callers that just need one sum,
difference, product, or quotient.
Install
npx @reneturcios/calcport calculate "2+3*4"Or run the container image:
docker run -i ghcr.io/cloudcorprecords/calcportThe container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead.
Related MCP server: My Calculator MCP Server
CLI
# Evaluate an expression
calcport calculate "sqrt(3^2 + 4^2) + pi"
# 8.141592653589793
# Single operations
calcport add 2 3 # 5
calcport subtract 10 4 # 6
calcport multiply 2.5 4 # 10
calcport divide 7 2 # 3.5
# Machine-readable output
calcport calculate "2^10" --json
calcport add 2 3 --json
calcport --versionExpressions may use + - * / % ^, parentheses, unary minus, the
functions sqrt, abs, floor, ceil, and round, and the
constants pi and e. ^ is right-associative, so 2^3^2 is 512.
Exit codes: 0 on success, 1 when a calculation cannot be done
(division by zero, a malformed expression — the error says why), 2
for usage errors.
MCP server
One bin serves both faces. The mcp subcommand starts a stdio MCP
server:
npx -y @reneturcios/calcport mcpMCP client configuration:
{
"mcpServers": {
"calcport": {
"command": "npx",
"args": ["-y", "@reneturcios/calcport", "mcp"]
}
}
}Tools
Tool | Input | What it returns |
|
| The numeric result of the expression, with the expression echoed back. |
|
|
|
|
|
|
|
|
|
|
|
|
Development
npm install
npm run build # tsc -> dist/
npm test # node test runner over test/*.test.ts, no network
npm run dev # run the CLI from source via tsxLicense
MIT — see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Safe scientific calculator MCP for numeric expressions
MCPCalc gives agents access to a comprehensive library of calculators spanning finance, math, health, construction, engineering, food, automotive, and more. It includes a full Computer Algebra System (CAS) and a grid-based Spreadsheet calculator.
Math.js MCP — wraps the mathjs.org API (free, no auth)
Calculators accessible via MCP with real-time collaborative sessions and shareable URLs.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides basic mathematical calculation functionality through MCP tools including arithmetic operations, exponentiation, and square root calculations. Features proper error handling for edge cases like division by zero and negative square roots.620 npm2MIT
- AlicenseNot gradedqualityDmaintenanceEnables basic calculator operations such as add, subtract, multiply, and divide through an MCP interface.4 npmISC
- AlicenseAqualityDmaintenanceEnables safe math expression evaluation, unit conversion, statistical analysis, number formatting, and percentage calculations for AI agents via MCP.539 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to perform basic arithmetic operations such as addition, subtraction, multiplication, and division through a remotely hosted HTTP endpoint.40 npmMIT