mcpField
M
math

math

Local
github.com/rog0xScience & Education0Updated 32w ago

About math

An MCP server that gives AI agents tools for calculations, unit conversion, statistics, and number formatting. It covers both general expressions and common percentage operations.

Key features

  1. 01Safe expression evaluation
  2. 02Conversion across six unit categories
  3. 03Dataset statistics and correlation
  4. 04Number formatting options
  5. 05Percentage and tip calculations

Use cases

  1. 01Evaluate formulas with variables and functions
  2. 02Convert measurements between supported units
  3. 03Summarize datasets and compare arrays
  4. 04Format values for reports
  5. 05Calculate discounts, tips, or percentage changes

MCP support

Exposes calculation and number-analysis tools to MCP clients, including `calculate`, `convert_units`, and `statistics`.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"rog0x-math": {
"command": "npx",
"args": [
"-y",
"@rog0x/mcp-math-tools"
]
}
}
}
Run commandnpx -y @rog0x/mcp-math-tools

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@rog0x/mcp-math-tools1.0.1

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project 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.

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.

Installation

npm install
npm run build

Usage with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "math-tools": {
      "command": "node",
      "args": ["path/to/mcp-math-tools/dist/index.js"]
    }
  }
}

Examples

Calculate: 2 * (3 + 4) ^ 2 returns 98

Convert: 100 from km/h to mph returns 62.137...

Statistics: summary of [1, 2, 3, 4, 5] returns mean, median, mode, variance, etc.

Format: 1234567.89 as currency returns $1,234,567.89

Percentage: 15% tip on 85.50 bill split 3 ways

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.