MCP Arithmetic 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., "@MCP Arithmetic Server What is 12 times 8?"
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 Arithmetic Server
A Model Context Protocol (MCP) server built with Node.js that exposes four arithmetic tools: add, subtract, multiply, and divide.
Prerequisites
Node.js 18+ (for top-level
awaitand ES modules)
Related MCP server: Math Operations MCP Server
Installation
npm installRunning the server
npm startThe server communicates over stdio, so it can be connected to any MCP-compatible client.
MCP Inspector
The MCP Inspector is a tool for inspecting and testing MCP servers. It provides a web UI where you can list tools and call them interactively.
npm run inspectorThis launches the inspector in your browser. In the inspector UI:
Set the transport to
StdioSet the command to
nodeand the args toserver.jsClick Connect
You can then call any of the tools directly from the browser.
Available tools
All four tools share the same input schema — two numbers:
Property | Type | Required | Description |
| number | yes | The first number |
| number | yes | The second number |
add
Adds two numbers together.
{ "a": 5, "b": 7 }Result: 5 + 7 = 12
subtract
Subtracts the second number from the first (a - b).
{ "a": 10, "b": 4 }Result: 10 - 4 = 6
multiply
Multiplies two numbers together.
{ "a": 5, "b": 7 }Result: 5 * 7 = 35
divide
Divides the first number by the second (a / b). Returns an error if b is zero.
{ "a": 15, "b": 3 }Result: 15 / 3 = 5
{ "a": 15, "b": 0 }Result (error): Cannot divide by zero.
Testing locally
You can test the server with the MCP Inspector:
npm run server:inspectConnecting to a client
Configure your MCP client (e.g., Claude Desktop, VS Code Copilot) to use this command:
node D:\Learning_Projects\MCP\server.jsAvailable Tools
4 toolsaddA
Add two numbers and return the result.
Inputs: a (required), b (required).
divideA
Divide the first number by the second (a / b) and return the result. Returns an error if b is zero.
Inputs: a (required), b (required).
multiplyA
Multiply two numbers and return the result.
Inputs: a (required), b (required).
subtractA
Subtract the second number from the first (a - b) and return the result.
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 4 tools
Each tool performs a unique arithmetic operation with no overlap. Clear parameter conventions (a, b) further eliminate ambiguity.
All tool names are single verbs matching their operations exactly: add, subtract, multiply, divide. Perfectly consistent pattern.
Four tools cover the four basic arithmetic operations without redundancy. The scope is narrow and well-suited to the server's purpose.
The core arithmetic operations are fully covered. Minor additions like modulo or exponentiation could be useful, but the current set is coherent and complete for basic arithmetic.
Maintenance
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
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.
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.655 npm2MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI applications to perform basic mathematical operations like addition and subtraction through MCP tools. Also provides REST API endpoints for the same operations.MIT
- FlicenseNot gradedqualityDmaintenanceEnables basic calculator operations such as add, subtract, multiply, and divide through an MCP interface.-
- FlicenseAqualityDmaintenanceProvides basic arithmetic operations (add, subtract, multiply, divide) through MCP, enabling AI clients to perform calculations via natural language.4-