# math [Health: Active]

**Category:** 🧮 Data Science Tools  
**Repository:** https://github.com/rog0x/mcp-math-tools  
**GitHub Stars:** 0  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/math

## Description
Calculator, units, statistics for AI agents

## Tools
Capabilities this server exposes over MCP:

- **calculate** — Evaluate math expressions safely (no `eval`). Supports arithmetic operators (`+`, `-`, `*`, `/`, `^`, `%`), parentheses, functions (`sqrt`, `abs`, `floor`, `ceil`, `round`, `log`, `ln`, `sin`, `cos`, `tan`, `min`, `max`, `pow`), constants (`pi`, `e`), and named variables.
- **convert_units** — Convert between units across six categories:
- **statistics** — Statistical analysis on datasets: mean, median, mode, variance, standard deviation, min, max, range, percentile, correlation between two arrays, and a full summary mode.
- **format_number** — Format numbers as: currency (`$1,234.56`), percentage, scientific notation, binary, octal, hexadecimal, significant figures, or with thousands separators.
- **percentage_calc** — Common percentage operations: X% of Y, what percent X is of Y, percentage change between two values, tip calculator, discount calculator, and markup calculator.

## Claude Desktop Quick Installation
No confirmed install details yet, so no config is published. Follow the setup steps in the repository above.

## Documentation

## What math MCP server does

The math MCP server gives AI agents a set of focused numerical tools through the Model Context Protocol. It covers expression evaluation, unit conversion, descriptive statistics, number formatting, and common percentage operations. The tools are useful for calculations that need explicit operators, supported functions, consistent output formats, or named input values.

The server does not connect to a remote database, SaaS API, or data warehouse. Its documented inputs are expressions, numbers, units, arrays, and formatting options supplied through MCP tool calls. That makes the math MCP server a fit for local agent workflows where calculations should be delegated to a defined tool rather than generated as prose.

## How it works

Install the project with npm, build it, and run the generated Node.js entry point as an MCP server. An MCP-compatible client starts the process and sends tool requests over the configured connection. The README provides a Claude Desktop configuration that invokes `node` with `dist/index.js`.

Expression evaluation is described as safe and does not use JavaScript `eval`. The calculator accepts arithmetic operators, parentheses, named variables, constants such as `pi` and `e`, and functions including square root, rounding, logarithms, trigonometry, minimum, maximum, and powers.

## Setup and configuration

The documented setup requires Node.js project commands:

```bash
npm install
npm run build
```

After building, configure the MCP client to launch the compiled file. A Claude Desktop entry uses a server name such as `math-tools`, the `node` command, and an argument pointing to `path/to/mcp-math-tools/dist/index.js`. Replace that path with the location of the built project on the host machine.

No environment variables are documented as required. The provided setup is local and does not specify credentials, network endpoints, or service configuration.

## Tools and capabilities

The math MCP server exposes five tools:

- `calculate` evaluates arithmetic and supported mathematical functions. It also accepts variables and constants.
- `convert_units` converts length, weight, temperature, data, time, and speed values. Examples include kilometers per hour to miles per hour and conversions between bytes, kilobytes, megabytes, gigabytes, and terabytes.
- `statistics` analyzes datasets with mean, median, mode, variance, standard deviation, minimum, maximum, range, percentile, correlation between two arrays, and a full summary mode.
- `format_number` renders values as currency, percentages, scientific notation, binary, octal, hexadecimal, significant figures, or numbers with thousands separators.
- `percentage_calc` handles percentage-of calculations, percentage comparisons, percentage change, tips, discounts, and markups.

## Limitations and notes

Unit conversion is limited to the six documented categories and their listed units. The calculator supports the functions and operators specified by the project rather than arbitrary JavaScript execution. Statistical operations require datasets, while correlation requires two arrays. Formatting and percentage results depend on the options supplied to their respective tools.

The README demonstrates use with Claude Desktop but does not document authentication, hosted deployment, persistent storage, or client-specific behavior beyond launching the local process.

_Full upstream README: https://allmcps.com/mcp/math/readme_

