rog0x avatar

Math

rog0x/mcp-math-tools

Exposes five calculation tools via MCP: a safe expression evaluator supporting functions like sqrt, sin, and log with constants and variables; a unit converter covering length, weight, temperature, data, time, and speed; a statistics calculator for mean, median, variance, standard deviation, and correlation; a number formatter for currency, percentage, scientific notation, and different bases; and a percentage calculator for tips, discounts, and markup. Runs as a Node.js stdio server. Reach for this when you need Claude to handle numerical operations beyond simple arithmetic, whether converting 100 km/h to mph, calculating summary statistics on a dataset, or formatting financial figures with proper separators and currency symbols.

tools
22
transport
STDIO
last updated
Mar 22, 2026

Tools

22 tools

Public tool metadata for what this MCP can expose to an agent.

addAdds two numbers together2 params

Adds two numbers together

Parameters* required
firstNumbernumber
The first addend
secondNumbernumber
The second addend
subtractSubtracts the second number from the first number2 params

Subtracts the second number from the first number

Parameters* required
minuendnumber
The number to subtract from (minuend)
subtrahendnumber
The number being subtracted (subtrahend)
multiplyMultiplies two numbers together2 params

Multiplies two numbers together

Parameters* required
SecondNumbernumber
The second number
firstNumbernumber
The first number
divisionDivides the first number by the second number2 params

Divides the first number by the second number

Parameters* required
denominatornumber
The number to divide by (denominator)
numeratornumber
The number being divided (numerator)
sumAdds any number of numbers together1 params

Adds any number of numbers together

Parameters* required
numbersarray
Array of numbers to sum
moduloDivides two numbers and returns the remainder2 params

Divides two numbers and returns the remainder

Parameters* required
denominatornumber
The number to divide by (denominator)
numeratornumber
The number being divided (numerator)
meanCalculates the arithmetic mean of a list of numbers1 params

Calculates the arithmetic mean of a list of numbers

Parameters* required
numbersarray
Array of numbers to find the mean of
medianCalculates the median of a list of numbers1 params

Calculates the median of a list of numbers

Parameters* required
numbersarray
Array of numbers to find the median of
modeFinds the most common number in a list of numbers1 params

Finds the most common number in a list of numbers

Parameters* required
numbersarray
Array of numbers to find the mode of
minFinds the minimum value from a list of numbers1 params

Finds the minimum value from a list of numbers

Parameters* required
numbersarray
Array of numbers to find the minimum of
maxFinds the maximum value from a list of numbers1 params

Finds the maximum value from a list of numbers

Parameters* required
numbersarray
Array of numbers to find the maximum of
floorRounds a number down to the nearest integer1 params

Rounds a number down to the nearest integer

Parameters* required
numbernumber
The number to round down
ceilingRounds a number up to the nearest integer1 params

Rounds a number up to the nearest integer

Parameters* required
numbernumber
The number to round up
roundRounds a number to the nearest integer1 params

Rounds a number to the nearest integer

Parameters* required
numbernumber
The number to round
sinCalculates the sine of a number in radians1 params

Calculates the sine of a number in radians

Parameters* required
numbernumber
The number in radians to find the sine of
arcsinCalculates the arcsine of a number in radians1 params

Calculates the arcsine of a number in radians

Parameters* required
numbernumber
The number to find the arcsine of
cosCalculates the cosine of a number in radians1 params

Calculates the cosine of a number in radians

Parameters* required
numbernumber
The number in radians to find the cosine of
arccosCalculates the arccosine of a number in radians1 params

Calculates the arccosine of a number in radians

Parameters* required
numbernumber
The number to find the arccosine of
tanCalculates the tangent of a number in radians1 params

Calculates the tangent of a number in radians

Parameters* required
numbernumber
The number in radians to find the tangent of
arctanCalculates the arctangent of a number in radians1 params

Calculates the arctangent of a number in radians

Parameters* required
numbernumber
The number to find the arctangent of
radiansToDegreesConverts a radian value to its equivalent in degrees1 params

Converts a radian value to its equivalent in degrees

Parameters* required
numbernumber
The number in radians to convert to degrees
degreesToRadiansConverts a degree value to its equivalent in radians1 params

Converts a degree value to its equivalent in radians

Parameters* required
numbernumber
The number in degrees to convert to radians

Sponsors

Readme

mcp-math-tools

Math and calculation tools for AI agents, exposed via the Model Context Protocol (MCP).

Tools

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:

  • Length: m, km, cm, mm, mi, yd, ft, in
  • Weight: kg, g, mg, lb, oz, ton
  • Temperature: C, F, K
  • Data: B, KB, MB, GB, TB
  • Time: s, min, h, d, week
  • Speed: m/s, km/h, mph, knots

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.


View the full README on GitHub

Details

Repository
github.com/rog0x/mcp-math-tools
Package
@rog0x/mcp-math-tools
Transport
STDIO
Registry
MCP registry, active

More from rog0x