mcpField
M
Math-MCP

Math-MCP

Local
github.com/EthanHenricksonScience & Education190Updated 22w ago

About Math-MCP

Math-MCP is a Node.js MCP server that gives LLMs basic mathematical, statistical and trigonometric functions for accurate numerical calculation. It suits users who want LLMs to compute rather than estimate numbers, and it ships prebuilt for simple local setup.

Key features

  1. 01Basic arithmetic, sum and modulo operations
  2. 02Mean, median, mode, minimum and maximum
  3. 03Floor, ceiling and rounding functions
  4. 04Trigonometric functions and degree-radian conversion

Use cases

  1. 01Letting an LLM perform exact numerical calculations
  2. 02Computing statistical measures over lists of numbers
  3. 03Converting between degrees and radians

MCP support

This project is an MCP server that exposes math, statistics and trigonometry tools such as add, mean, sin and degreesToRadians to MCP clients.

Configuration

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

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

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

Math-MCP

A Model Context Protocol (MCP) server that provides basic mathematical, statistical and trigonometric functions to Large Language Models (LLMs). This server enables LLMs to perform accurate numerical calculations through a simple API.

Math-MCP MCP server

Features

  • Basic arithmetic operations (addition, subtraction, multiplication, division, sum, modulo)
  • Statistical functions (mean, median, mode, min, max)
  • Rounding functions (floor, ceiling, round)
  • Trigonometric functions (sin, cos, tan, and their inverses; degrees/radians conversions)

Installation

Note: Ensure you have Node.js installed on your computer.

Just clone this repository and save it locally somewhere on your computer.

Then add this server to your MCP configuration file:

"math": {
  "command": "node",
  "args": ["PATH\\TO\\PROJECT\\math-mcp\\build\\index.js"]
}

Here is an example for OpenCode

{
  "mcp": {
    "math-mcp": {
      "type": "local",
      "command": [
        "node",
        "PATH\\TO\\PROJECT\\math-mcp\\build\\index.js"
      ]
    }
  }
}

Replace PATH\\TO\\PROJECT with the actual path to where you cloned the repository.

Note: This project comes prebuilt, so installation is easy but if you change anything in the code, rebuild the project with npm run build.

Available Functions

The Math-MCP server provides the following mathematical operations:

Arithmetic Operations
FunctionDescriptionParameters
addAdds two numbers togetherfirstNumber: The first addend
secondNumber: The second addend
subtractSubtracts the second number from the first numberminuend: The number to subtract from (minuend)
subtrahend: The number being subtracted (subtrahend)
multiplyMultiplies two numbers togetherfirstNumber: The first number
secondNumber: The second number
divisionDivides the first number by the second numbernumerator: The number being divided (numerator)
denominator: The number to divide by (denominator)
sumAdds any number of numbers togethernumbers: Array of numbers to sum
moduloDivides two numbers and returns the remaindernumerator: The number being divided (numerator)
denominator: The number to divide by (denominator)
floorRounds a number down to the nearest integernumber: The number to round down
ceilingRounds a number up to the nearest integernumber: The number to round up
roundRounds a number to the nearest integernumber: The number to round
Statistical Operations
FunctionDescriptionParameters
meanCalculates the arithmetic mean of a list of numbersnumbers: Array of numbers to find the mean of
medianCalculates the median of a list of numbersnumbers: Array of numbers to find the median of
modeFinds the most common number in a list of numbersnumbers: Array of numbers to find the mode of
minFinds the minimum value from a list of numbersnumbers: Array of numbers to find the minimum of
maxFinds the maximum value from a list of numbersnumbers: Array of numbers to find the maximum of
Trigonometric Operations
FunctionDescriptionParameters
sinCalculates the sine of a number in radiansnumber: The number in radians to find the sine of
arcsinCalculates the arcsine (in radians) of a numbernumber: The number to find the arcsine of
cosCalculates the cosine of a number in radiansnumber: The number in radians to find the cosine of
arccosCalculates the arccosine (in radians) of a numbernumber: The number to find the arccosine of
tanCalculates the tangent of a number in radiansnumber: The number in radians to find the tangent of
arctanCalculates the arctangent (in radians) of a numbernumber: The number to find the arctangent of
radiansToDegreesConverts a radian value to its equivalent in degreesnumber: The number in radians to convert to degrees
degreesToRadiansConverts a degree value to its equivalent in radiansnumber: The number in degrees to convert to radians

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.