home / mcp / math & calculator mcp server

Math & Calculator MCP Server

Provides advanced mathematical tools for MCP clients, including calculations, statistics, conversions, and equation solving.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ankluna72-math-calculator-mcp-server-": {
      "command": "node",
      "args": [
        "C:\\path\\to\\Math-Calculator-MCP-Server-\\dist\\index.js"
      ]
    }
  }
}

You have a powerful MCP server that exposes a suite of mathematical utilities for AI assistants. It lets you perform calculations, statistics, unit conversions, equation solving, percentages, and trigonometry through MCP-compatible clients, enabling seamless, on-demand math capabilities within conversations and workflows.

How to use

You connect an MCP client to the server to start making requests. The server offers multiple tools that you can invoke from your AI assistant, such as basic calculations, statistical analysis, unit conversions, quadratic equation solving, percentage computations, and trigonometric functions. Use straightforward natural language prompts like those in the usage examples to trigger specific tools. The client will route your requests to the corresponding tool, which returns precise numeric results that you can display or further process.

How to install

Prerequisites you need before installing are Node.js version 18 or newer and npm or yarn.

Step 1: Clone the project repository.

Step 2: Install dependencies.

Step 3: Build the project.

Step 4: Run the server in development or production mode.

Configuration and run instructions

Configure your MCP client to connect to the server via a local stdio (direct process) channel. The server is started by invoking Node with the built index file.

{
  "mcpServers": {
    "math_calculator": {
      "type": "stdio",
      "name": "math_calculator",
      "command": "node",
      "args": [
        "C:\\path\\to\\Math-Calculator-MCP-Server-\\dist\\index.js"
      ]
    }
  }
}

Available tools

calculate

Performs basic arithmetic operations such as addition, subtraction, multiplication, and division, with support for power, square root, and modulo, including error handling for invalid operations.

statistics

Performs statistical analysis on arrays, providing mean, median, mode, standard deviation, variance, and comprehensive summaries.

convert_units

Converts values between units across length, weight, and temperature scales, including meters, kilometers, miles, feet, inches, kilograms, grams, pounds, ounces, Celsius, Fahrenheit, and Kelvin.

solve_equation

Solves quadratic equations of the form axยฒ + bx + c = 0, handling real and complex solutions and providing discriminant analysis.

percentage

Calculates percentages, including the percentage of a number, percentage increases or decreases, and determining what percentage is a value of another.

trigonometry

Evaluates trigonometric functions such as sin, cos, tan and their inverse functions, with support for degree-based angle input and precise floating-point results.