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 15 plus 27?"
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 very basic MCP (Model Context Protocol) server built for training purposes. It exposes five simple tools over stdio so you can see the core MCP mechanics — tool listing, input schemas, and structured responses — without any extra complexity like auth, persistence, or external APIs.
Tools
Tool | Input | Description |
|
| Returns |
|
| Returns |
|
| Returns |
|
| Returns |
|
| Returns the reversed string |
Related MCP server: MPC-PoC-1-EchoServerToolsbasicas
Setup
npm install
npm run buildTesting locally
Use the MCP Inspector to interactively call each tool from a browser UI:
npm run inspectThis opens a local web page where you can select a tool, fill in arguments, and see the raw JSON-RPC request/response.
Using it in Claude Desktop / Claude Code
Add this to your MCP client's config (e.g. claude_desktop_config.json):
{
"mcpServers": {
"calculator": {
"command": "node",
"args": ["/Users/douglasbailey/my-dev/claude-mcp/dist/index.js"]
}
}
}Restart the client, and the five calculator tools will be available for Claude to call.
How it works
src/index.tscreates an MCPServer, declares thetoolscapability, and connects overStdioServerTransport(the standard transport for local MCP servers).ListToolsRequestSchemahandler returns the tool definitions (name, description, JSON-schema input).CallToolRequestSchemahandler dispatches onrequest.params.nameand returns{content: [{type: "text", text: ...}]}.Throwing an
Errorinside a handler (e.g. divide-by-zero) is automatically surfaced to the client as a tool error — no special handling needed.
Available Tools
5 toolsaddA
Add two numbers together
Inputs: a (required), b (required).
divideB
Divide a by b
Inputs: a (required), b (required).
multiplyB
Multiply two numbers together
Inputs: a (required), b (required).
reverse_stringB
Reverse a string of text
Inputs: text (required).
subtractB
Subtract b from a
Inputs: a (required), b (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
The four arithmetic tools (add, subtract, multiply, divide) have clearly distinct, unambiguous purposes. The only oddity is reverse_string, which is unrelated to arithmetic and slightly muddies the server's scope, though it does not overlap with any other tool.
All tools use lowercase snake_case with a consistent verb-based pattern (add, subtract, multiply, divide, reverse_string). No mixing of conventions or casing styles.
Five tools is well-scoped for a simple calculator. Each operation earns its place and there is no redundancy or bloat.
Core arithmetic is fully covered (add, subtract, multiply, divide), but common calculator operations like modulo, exponent, or square root are missing. reverse_string also feels out of place and suggests an incomplete or inconsistent domain focus.
Related MCP Connectors
500+ deterministic tools for AI agents: math, conversion, validation, hashing, encoding, date/time.
Five text and JSON utilities. Paid execution: 0.01 USDC standard or 0.05 USDC priority on Base.
Everyday calculators and converters for AI assistants: units, dates, percentages, text, JSON.
Exactly 50 data transformation and live web verification tools for AI agents.
Related MCP Servers
- AlicenseDqualityDmaintenanceProvides basic mathematical operations (addition, subtraction, multiplication, division) through a calculate tool. Supports both stdio and HTTP/SSE transport modes.113 npmISC
- FlicenseAqualityDmaintenanceA learning-oriented MCP server that exposes basic tools (echo, add, reverse) over stdio transport to validate MCP handshake and tool calls.3-
- AlicenseNot gradedqualityDmaintenanceExposes add, subtract, multiply, and divide tools for performing arithmetic operations over stdio via the Model Context Protocol.24 npmMIT
- FlicenseAqualityCmaintenanceEnables AI agents to perform arithmetic operations — addition, subtraction, multiplication, and division with divide-by-zero validation — through MCP tool calls. It can be run locally over stdio or as an HTTP microservice via streamable-http transport.4-