Calculator MCP Server
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., "@Calculator MCP Server Walk me through solving 2x + 5 = 15"
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.
Calculator MCP Server
A Model Context Protocol (MCP) server built with FastMCP that exposes a
calculator as a set of tools, resources, and prompts for use by an LLM
client.
Tools
Basic:
add,subtract,multiply,divideAdvanced:
power,square_root,percentage
Each tool validates its inputs (division by zero, negative square roots, undefined powers, zero-denominator percentages) and returns a formatted string, and logs every successful calculation to an in-memory history.
Related MCP server: calculator-mcp-server
Resources
constants://math— pi, e, the golden ratio, and tauhistory://calculations— a chronological log of every calculation made during the current session
Prompts
solve_equation(problem)— walks a word problem step by step, directing the model to use the calculator tools for arithmeticcalculation_help(topic)— explains which tools/resources are relevant to a topic, with a worked example
Running it
uv sync
uv run python calculator_server.pyPoint an MCP client (e.g. Claude Desktop, or an MCP inspector) at that command over stdio.
Available Tools
7 toolsaddA
Add two numbers together.
Args: a: The first number. b: The second number.
Returns: A string with the sum of a and b.
Inputs: a (required), b (required). Returns: result
divideA
Divide the first number by the second.
Args: a: The numerator. b: The denominator. Must not be zero.
Returns: A string with the result of a / b, or an error message if b is zero.
Inputs: a (required), b (required). Returns: result
multiplyA
Multiply two numbers together.
Args: a: The first number. b: The second number.
Returns: A string with the product of a and b.
Inputs: a (required), b (required). Returns: result
percentageA
Compute what percentage 'part' is of 'whole'.
Args: part: The partial amount. whole: The total amount. Must not be zero.
Returns: A string with the percentage part is of whole, or an error message if whole is zero.
Inputs: part (required), whole (required). Returns: result
powerA
Raise a number to a power.
Args: base: The base number. exponent: The exponent to raise the base to.
Returns: A string with the result of base ** exponent, or an error message if the operation is undefined (e.g. a negative base with a fractional exponent).
Inputs: base (required), exponent (required). Returns: result
square_rootA
Compute the square root of a number.
Args: value: The number to take the square root of. Must be non-negative.
Returns: A string with the square root of value, or an error message if value is negative.
Inputs: value (required). Returns: result
subtractA
Subtract the second number from the first.
Args: a: The number to subtract from. b: The number to subtract.
Returns: A string with the result of a - b.
Inputs: a (required), b (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool performs a unique arithmetic operation with no overlap or ambiguity. The names and descriptions clearly distinguish addition, subtraction, multiplication, division, exponentiation, square root, and percentage.
All tool names follow a consistent lowercase_with_underscores pattern (e.g., add, square_root, percentage). The naming is uniform and predictable across the set.
With 7 tools, the set covers the core arithmetic operations needed for a calculator server. The count is well within the typical 3-15 range and feels neither sparse nor bloated.
The tool set covers the essential operations (add, subtract, multiply, divide, power, square root, percentage). A modulo operation could be expected but its absence does not create a significant gap for standard calculator use.
Maintenance
Related MCP Connectors
Math.js MCP — wraps the mathjs.org API (free, no auth)
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.
AI-callable calculators and engineering models with real formulas. No hallucinated math.
SmartMoney77 MCP v0.6.0 — 14 public tools that turn financial questions into exact numbers and citable links. New: historical_investment_return and compare_investments, which compute "what if I had invested" results from real yearly price data. Also compound interest, FIRE number, credit-card payoff, emergency fund, inflation, latte factor, investment fees, cost of waiting, plus discovery/deep-link/share-pack tools for a catalog of calculators in 6 languages (he/en/ar/es/pt/in). Public, no login. Endpoint: https://smartmoney77.com/mcp
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides comprehensive mathematical capabilities including basic arithmetic, advanced functions, statistical tools, and access to mathematical constants. It allows users to perform computations and generate math-related prompts through a standardized MCP interface.MIT
- AlicenseNot gradedqualityDmaintenanceProvides a comprehensive set of mathematical functions as MCP tools, enabling language models to perform calculations including arithmetic, trigonometry, logarithms, and more.10 npm1MIT
- AlicenseAqualityCmaintenanceEnables advanced mathematics operations including linear algebra, vector math, symbolic computation, and calculus through MCP tools. Designed for use with Claude and other MCP-compatible LLMs.192MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to perform arithmetic operations such as addition, subtraction, multiplication, and division through standardized MCP tools.1-