mcp-calculator
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., "@mcp-calculator add 123 and 456"
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.
MCP Calculator Server
A simple Model Context Protocol server that exposes basic calculator tools. Built with the official mcp Python SDK and FastMCP.
Tools
Tool | Description |
| Add two numbers |
| Subtract one number from another |
| Multiply two numbers |
| Divide one number by another |
| Raise a number to a power |
| Compute the square root of a number |
Related MCP server: MCP Playground Server
Setup
Requires Python 3.12+ and uv.
cd mcp-calculator
uv syncRun
Start the server (stdio transport, default for MCP clients like Cursor):
uv run calculator_server.pyFor HTTP transport (e.g. MCP Inspector), change the last line of calculator_server.py to mcp.run(transport="streamable-http") and connect to http://localhost:8000/mcp.
Cursor configuration
Add this to your Cursor MCP settings:
{
"mcpServers": {
"calculator": {
"command": "uv",
"args": [
"run",
"--directory",
"/Users/premithun/Downloads/cursor_projects/mcp-calculator",
"calculator_server.py"
]
}
}
}Replace the --directory path with the absolute path to this project on your machine.
Available Tools
6 toolsaddB
Add two numbers together.
Inputs: a (required), b (required). Returns: result
divideA
Divide a by b. Raises an error if b is zero.
Inputs: a (required), b (required). Returns: result
multiplyA
Multiply two numbers.
Inputs: a (required), b (required). Returns: result
powerB
Raise base to the power of exponent.
Inputs: base (required), exponent (required). Returns: result
square_rootA
Return the square root of a number. Raises an error for negative values.
Inputs: n (required). Returns: result
subtractA
Subtract b from a.
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 unique mathematical operation (add, subtract, multiply, divide, power, square root) with no overlap.
All tool names are single-word or underscore-separated (e.g., square_root), using consistent imperative verbs.
Six tools cover essential arithmetic plus power and square root, appropriate for a basic calculator.
Covers addition, subtraction, multiplication, division, exponentiation, and square root. Missing common operations like modulus or floor division, but reasonable for a simple calculator.
Related MCP Connectors
This MCP server enables users to perform scientific computations regarding linear algebra and vect…
Math MCP server for primality, factorization, Java templates, and integer multiplication.
Educational MCP server with 17 math/stats tools, visualizations, and persistent workspace
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA simple MCP server that provides basic calculator functionality for performing mathematical operations. Built with FastMCP and demonstrates fundamental MCP server implementation patterns.-
- FlicenseNot gradedqualityDmaintenanceA simple educational MCP server providing basic math operations, string manipulation, and greeting functionality. Demonstrates how to implement MCP tools for learning purposes.-
- AlicenseNot gradedqualityDmaintenanceA simple MCP server that provides calculator tools for basic arithmetic operations with zero-division protection.154 npmISC
- AlicenseAqualityDmaintenanceA simple MCP server that provides basic calculator operations such as add, subtract, multiply, and divide.4MIT