
Calculator Mcp
Exposes six calculator operations as MCP tools: add, subtract, multiply, divide, power, and sqrt. Each operation takes numeric parameters and returns formatted results like "5 + 3 = 8" or "2^8 = 256". Includes basic error handling for division by zero and negative square roots. You'd reach for this as a simple reference implementation when learning to build MCP servers or testing client integrations. The TypeScript source is straightforward, making it easy to fork and extend with additional mathematical operations. Runs via stdio transport and integrates with Claude Desktop through a standard node command configuration.
- GitHub stars
- 2
- tool
- 1
- transport
- STDIO
- last updated
- Oct 28, 2025
Tools
1 toolsPublic tool metadata for what this MCP can expose to an agent.
calculateEvaluate math expressions, simplify algebraic expressions, or compute symbolic derivatives. Supports arithmetic, trigonometry, statistics, matrices, complex numbers, units, and combinatorics.5 params
Evaluate math expressions, simplify algebraic expressions, or compute symbolic derivatives. Supports arithmetic, trigonometry, statistics, matrices, complex numbers, units, and combinatorics.
expressionstringoperationstringevaluate · simplify · derivativedefault: evaluateprecisionvaluescopeobjectvariablevalueSponsors
Readme
Calculator MCP Server
A simple Model Context Protocol (MCP) server that provides basic calculator functionality through MCP tools.
Features
This MCP server provides the following calculator tools:
- add: Add two numbers together
- subtract: Subtract second number from first number
- multiply: Multiply two numbers together
- divide: Divide first number by second number (with zero-division protection)
- power: Raise first number to the power of second number
- sqrt: Calculate square root of a number (with negative number protection)
Installation
- Install dependencies:
npm install
- Build the TypeScript code:
npm run build
Usage
Running the Server
Start the MCP server:
npm start
Or run in development mode:
npm run dev
MCP Client Configuration
To use this calculator MCP server with an MCP client (like Claude Desktop), add it to your MCP configuration:
{
"mcpServers": {
"calculator": {
"command": "node",
"args": ["/path/to/calculator-mcp/dist/index.js"],
"env": {}
}
}
}
Available Tools
Details
- Repository
- github.com/tech-sushant/calculator-mcp
- Package
@tech-sushant/calculator-mcp- Transport
- STDIO
- Registry
- MCP registry, active