addLABSCO SUMMARY
Division by zero errors out, which is the whole design in miniature.
A model asked to divide by zero will often produce something confident and wrong; a tool refuses. That is the difference this makes on every operation, not just the pathological one. It is also about as small as an MCP server gets, which makes it a readable first example if you are writing one.
What it is
A minimal server exposing the four basic arithmetic operations as tools. It exists because a language model producing digits is not the same as a calculator producing a result.
What you get
add— adds two numberssubtract— subtracts one number from anothermultiply— multiplies two numbersdivide— divides two numbers, returning an error on division by zero rather than a wrong answer
Requirements
The project arithmetic-server, version 1.0.0, built from source: clone it, npm install, npm run build, then launch index.js with node from the client config. TypeScript with the MCP SDK and Zod for validation. No account, no key, no network access.
Setup effort
Build from source
USE CASES
Getting arithmetic right inside a longer answer
Hand the numbers to a tool so the total is computed rather than produced.
Reading a very small MCP server end to end
Four tools, Zod schemas, one entry point — enough to see the shape without wading through a codebase.
4 tools
Listed in project docs. Your client may show a different list.
subtractmultiplydivideBEFORE YOU INSTALL
What to know first
Tools you get
4 tools named in the project's documentation.
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
git clone https://github.com/YuheiNakasaka/arithmetic-mcp-server
cd arithmetic-mcp-server
npm install
npm run buildMCP Clients
Cline
{
"mcpServers": {
"arithmetic": {
"command": "node",
"args": [
"<YOUR_PATH>/arithmetic-mcp-server/build/index.js"
],
"disabled": false,
"autoApprove": []
}
}
}<YOUR_PATH> is the folder that holds your clone; npm run build writes build/index.js inside it.