A simple Model Context Protocol calculator server
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A simple Model Context Protocol (MCP) server that provides basic calculator functionality through MCP tools.
This MCP server provides the following calculator tools:
Start the MCP server:
Or run in development mode:
To use this calculator MCP server with an MCP client (like Claude Desktop), add it to your MCP configuration:
Adds two numbers together.
a (number), b (number)add(5, 3) returns 5 + 3 = 8Subtracts the second number from the first.
a (number), b (number)subtract(10, 4) returns 10 - 4 = 6Multiplies two numbers together.
a (number), b (number)multiply(6, 7) returns 6 Γ 7 = 42Divides the first number by the second.
a (number), b (number)divide(15, 3) returns 15 Γ· 3 = 5Raises the base to the power of the exponent.
base (number), exponent (number)power(2, 8) returns 2^8 = 256Calculates the square root of a number.
number (number)sqrt(16) returns β16 = 4The calculator includes proper error handling for:
All errors are returned with appropriate error messages and the isError flag set to true.
MIT
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/calculator-mcp)<a href="https://allmcps.com/mcp/calculator-mcp"><img src="https://allmcps.com/api/badge/calculator-mcp?style=directory" alt="Calculator MCP on AllMCPs" /></a>