mcp-calculator
Click on "Install 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-calculatoradd 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.
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It only says 'Add two numbers together,' but does not disclose behavioral traits such as result type, precision, overflow handling, or error behavior. For a simple arithmetic tool, this may be passable, but it lacks depth.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, coherent sentence with no extraneous words. It efficiently conveys the tool's purpose. Front-loading is not an issue due to its brevity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 numbers, arithmetic operation), the description is adequate but incomplete. It does not mention the return value (output schema exists but is not described), nor does it address edge cases, making it insufficient for complex usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, meaning parameters have no descriptions. The description adds no semantic context beyond the schema (that a and b are numbers). It does not explain what the numbers represent, range constraints, or units, leaving the agent with minimal guidance.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (add) and the object (two numbers), and it distinguishes from sibling arithmetic tools like subtract, multiply, etc. It is specific and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when addition is needed, but provides no explicit guidance on when to use this tool versus alternatives, nor any context about prerequisites or restrictions. The sibling tools differentiate by operation, but the description does not elaborate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
divideA
Divide a by b. Raises an error if b is zero.
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Despite no annotations, the description explicitly warns about an error condition ('Raises an error if b is zero'), which is a critical behavioral trait. It does not mention other behaviors like return type, but the presence of an output schema mitigates this.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise: one sentence for the operation and one for the error. It is front-loaded with the key verb 'Divide' and contains no unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity and the existence of an output schema, the description covers the essential behavior. It could mention the return type, but that is already specified in the output schema. The error disclosure adds necessary completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description should add meaning to parameters, but it only repeats the parameter names ('a' and 'b') without defining them as dividend and divisor. The meaning is mostly inferred from context.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action: 'Divide a by b.' It uses a specific verb and resource, and the operation is distinct from siblings (add, multiply, subtract, power, square_root).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives. It does not mention scenarios where division is preferred over other operations or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
multiplyA
Multiply two numbers.
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations are absent, so the description carries the full burden for behavioral disclosure. 'Multiply two numbers' accurately describes the core operation, but does not disclose edge cases, error handling, or return behavior. However, for a trivial arithmetic operation, this minimal description is acceptable and not misleading.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, 'Multiply two numbers,' with no filler words or redundant information. It is effectively front-loaded and maximally concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-number multiply tool with an existing output schema, the description covers the essential purpose. It lacks details on return values or edge cases, but these are not critical given the tool's triviality and the presence of an output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for the lack of parameter details. It confirms that both parameters are numbers and are to be multiplied, but does not explain individual roles. Since multiplication is commutative, the symmetry reduces the need for further clarification.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the specific verb 'Multiply' and the resource 'two numbers', which clearly distinguishes it from sibling tools like add, subtract, divide, power, square_root, and percentage. There is no ambiguity about what the tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus the sibling arithmetic operations. The description does not mention any alternatives, exclusions, or context for when multiplication is preferred.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
powerB
Raise base to the power of exponent.
| Name | Required | Description | Default |
|---|---|---|---|
| base | Yes | ||
| exponent | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It fails to mention edge cases (e.g., negative exponents, zero base, overflow), performance, or any side effects. The description is too minimal to inform safe usage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that front-loads the essential information. However, it is arguably too brief given the need for more behavioral and parameter context.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having an output schema (not shown), the description does not mention return value or behavior for edge cases. For a simple tool, it lacks completeness regarding what the agent can expect from invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, requiring the description to add meaning beyond the schema. The description only names 'base' and 'exponent' without providing constraints, types, or expected ranges, which does little to clarify parameter usage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Raise base to the power of exponent' clearly states the mathematical operation (exponentiation) with specific verb and resources (base, exponent). It distinguishes from sibling tools (divide, square_root, etc.) which perform other operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for exponentiation but provides no explicit guidance on when to use this tool versus alternatives like square_root (which is a special case). No exclusions or context mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
square_rootA
Return the square root of a number. Raises an error for negative values.
| Name | Required | Description | Default |
|---|---|---|---|
| n | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses the critical behavior of raising an error for negative inputs. Given the tool's simplicity, this covers the most important behavioral aspect, though it could mention the return type or precision.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is exceptionally concise at two sentences, with no wasted words. It front-loads the primary purpose and includes a critical constraint efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one required parameter, output schema exists), the description covers the purpose and a key error case. It is nearly complete, though it could briefly note that the result is a number.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The parameter 'n' is a number with no schema description (0% coverage). The description adds context by mentioning it is a number and that negative values cause errors, but does not elaborate further. For a single numeric parameter, this is minimally adequate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states the tool returns the square root of a number, using a specific verb ('return') and resource ('square root'). It clearly distinguishes from sibling tools like 'power', 'divide', etc., as it uniquely computes the square root.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description indicates when to use the tool (for square root computation) and when not (negative numbers cause an error). While it doesn't explicitly name alternatives among siblings, the sibling tools have distinct purposes, making the usage context sufficiently clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
subtractA
Subtract b from a.
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of explaining behavior. It clearly specifies the order of operands (b from a) but does not disclose additional traits such as return type, edge cases, or side effects. For a simple arithmetic function, this is minimal but adequate; however, it lacks richness beyond the core operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, focused sentence with no filler words. It communicates the essential operation clearly and efficiently, earning a perfect score for conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity of the tool, the explicit input schema, and the presence of an output schema (as indicated by context), the description provides sufficient context. It does not need to explain return values or complex behaviors, making it complete for its purpose.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Although the input schema has no descriptions for a and b, the description adds critical semantic meaning by clarifying the subtractive relationship: a is the minuend and b is the subtrahend. This compensates for the 0% schema description coverage and helps the agent understand how to correctly pass arguments.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's action as 'Subtract b from a', using a specific verb and resource. This unambiguously identifies the operation and distinguishes it from sibling tools like add, multiply, and divide.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use for subtraction but does not explicitly state when to choose this tool over alternatives. There is no mention of exclusions or competing tools, leaving the usage context to be inferred from the operation name and sibling context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v0.1.0- First observed
add - First observed
divide - First observed
multiply - First observed
power - First observed
square_root - First observed
subtract
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.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
This MCP server enables users to perform scientific computations regarding linear algebra and vect…
Educational MCP server with 17 math/stats tools, visualizations, and persistent workspace
A simple MCP server built with FastMCP and python
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.62ISC
- FlicenseAqualityDmaintenanceA simple MCP server that provides basic calculator operations such as add, subtract, multiply, and divide.4-