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 what's 47 times 89?"
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 simple calculator MCP (Model Context Protocol) server built with FastMCP. Exposes basic arithmetic tools that you can plug into any MCP client such as Claude Desktop.
Tools
Tool | Description |
| Add two numbers |
| Subtract |
| Multiply two numbers |
| Divide |
| Raise |
| Square root of a non-negative number |
Related MCP server: Calculator MCP Server
Prerequisites
Setup
# 1. Create a virtual environment
uv venv .venv
# 2. Install dependencies (reads pyproject.toml)
uv sync
# 3. (Optional) Activate the venv
source .venv/bin/activateRun the server
# Runs over stdio (default)
uv run python main.pyOr use the FastMCP CLI:
uv run fastmcp dev main.py # runs with auto-reload
uv run fastmcp list main.py # list exposed tools
uv run fastmcp call --server-spec main.py --target add --input-json '{"a": 3, "b": 4}'Claude Desktop Configuration
Quit Claude Desktop completely.
Open
claude_desktop_config.json:macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Add (or merge) the following
mcpServersentry, replacing the project path with your local path:
{
"mcpServers": {
"calculator": {
"command": "uv",
"args": [
"run",
"--project",
"/absolute/path/to/calculator",
"--directory",
"/absolute/path/to/calculator",
"python",
"/absolute/path/to/calculator/main.py"
]
}
}
}Note: If
uvis not on Claude Desktop'sPATH(common for GUI apps), use the absolute path instead, e.g."/Users/<you>/.local/bin/uv". Find yours withwhich uv.
Relaunch Claude Desktop. You should see a calculator icon, and the 6 tools will be available to use in chat.
Project Layout
calculator/
├── main.py # FastMCP server with all tools
├── pyproject.toml # Project metadata + dependencies
├── uv.lock # Lock file
└── README.mdAvailable Tools
6 toolsaddAddB
Add two numbers.
Inputs: a (required), b (required). Returns: result
divideDivideA
Divide the first number by the second.
Inputs: a (required), b (required). Returns: result
multiplyMultiplyB
Multiply two numbers.
Inputs: a (required), b (required). Returns: result
powerPowerB
Raise a base to a given exponent.
Inputs: base (required), exponent (required). Returns: result
sqrtSqrtA
Return the (principal) square root of a non-negative number.
Inputs: value (required). Returns: result
subtractSubtractA
Subtract the second number from the first.
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 6 tools
Each tool performs a single, clearly distinct arithmetic operation with no overlap or ambiguity. An agent can easily select the correct tool for a given mathematical need.
Names are lowercase and concise, following a consistent operation-based convention. Minor deviation: add/subtract/multiply/divide are verbs while power/sqrt are noun-like, but still predictable.
Six tools are well-scoped for a basic calculator, covering core arithmetic operations without bloat or obvious redundancy.
Core arithmetic operations (add, subtract, multiply, divide) and common extras (power, sqrt) are present. Minor gaps include modulo, absolute value, rounding, or logarithm, but agents can work around them for basic calculation tasks.
Maintenance
Related MCP Connectors
Unofficial Math.js MCP — wraps the mathjs.org API (free, no auth)
500+ deterministic tools for AI agents: math, conversion, validation, hashing, encoding, date/time.
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
Free calculators as MCP tools: finance, taxes, health, units, dates. Search, fetch & compute.
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.641 npm2MIT
- FlicenseNot gradedqualityDmaintenanceProvides basic calculator operations (add, subtract, multiply, divide) as MCP tools for use with Claude Desktop and other MCP clients.-
- FlicenseNot gradedqualityDmaintenanceExposes calculator operations (add, subtract, multiply, divide, power) as MCP tools, allowing users to perform arithmetic calculations through natural language in MCP-compatible clients like Cursor.-
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to perform arithmetic operations such as addition, subtraction, multiplication, and division through standardized MCP tools.1-