Math-MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Math-MCPwhat is the average of 10,20,30?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Features
Basic arithmetic operations (addition, subtraction, multiplication, division, sum, modulo)
Statistical functions (mean, median, mode, min, max)
Advanced statistics (variance, standard deviation, percentile, correlation, linear regression)
Rounding functions (floor, ceiling, round)
Trigonometric functions (sin, cos, tan, and their inverses; degrees/radians conversions)
Exact number theory and combinatorics (GCD, LCM, primes, factors, factorials, combinations, permutations)
Exact fraction simplification and arithmetic using arbitrary-size integers
Percentages, compound interest, and fixed-rate loan payments
Quadratic equations and 2x2 linear systems, including complex or non-unique solutions
3D graphics transforms, bone hierarchies, camera matrices, and world-to-screen projection
Bayes' theorem and normalized multi-hypothesis Bayesian updates
Related MCP server: Calculator MCP Server
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
Function | Description | Parameters |
| Adds two numbers together |
|
| Subtracts the second number from the first number |
|
| Multiplies two numbers together |
|
| Divides the first number by the second number |
|
| Adds any number of numbers together |
|
| Divides two numbers and returns the remainder |
|
| Rounds a number down to the nearest integer |
|
| Rounds a number up to the nearest integer |
|
| Rounds a number to the nearest integer |
|
Statistical Operations
Function | Description | Parameters |
| Calculates the arithmetic mean of a list of numbers |
|
| Calculates the median of a list of numbers |
|
| Finds the most common number in a list of numbers |
|
| Finds the minimum value from a list of numbers |
|
| Finds the maximum value from a list of numbers |
|
| Calculates population or sample variance |
|
| Calculates population or sample standard deviation |
|
| Calculates an inclusive R-7/Excel-style percentile |
|
| Calculates Pearson correlation for paired observations |
|
| Fits |
|
Exact and Number-Theory Operations
Function | Description | Parameters |
| Finds the GCD of two safe integers |
|
| Finds the exact LCM as a decimal string |
|
| Tests a safe integer for primality |
|
| Finds prime factors up to 1,000,000,000,000 |
|
| Calculates n! exactly through 1000! |
|
| Calculates n choose r exactly |
|
| Calculates nPr exactly |
|
| Reduces an arbitrary-size integer fraction exactly |
|
| Adds, subtracts, multiplies, or divides fractions exactly |
|
Applied Operations
Function | Description | Parameters |
| Calculates a percentage of a value |
|
| Calculates percent increase or decrease |
|
| Rounds to a requested number of decimal places |
|
| Calculates compound growth and optional end-of-period contributions |
|
| Calculates fixed-rate payment, total paid, and total interest |
|
Algebra Operations
Function | Description | Parameters |
| Solves |
|
| Solves or classifies two linear equations | Coefficients |
3D Graphics and Bone Projection
All matrices are flat, row-major 4x4 arrays used with column vectors. Transform
composition is projection * view * world * point. Quaternions use {x, y, z, w};
Euler inputs are radians. Defaults are right-handed coordinates, OpenGL-style
NDC depth -1..1, and a top-left screen origin where Y points down.
Function | Description |
| Converts Euler radians and an explicit rotation order to a quaternion |
| Builds a |
| Multiplies two matrices as |
| Applies a matrix to a 3D point with homogeneous |
| Combines one bone's local transform with its parent world matrix |
| Resolves named parent/child local transforms into world-space bones |
| Creates a right- or left-handed world-to-view camera matrix |
| Creates a projection matrix with selectable handedness and clip-depth range |
| Applies the view matrix to a world-space point |
| Applies the projection matrix to produce a 4D clip-space point |
| Performs perspective division: |
| Scales NDC to a requested pixel width and height |
| Runs projection with a combined |
| Batch-projects named world-space bone positions to 2D screen coordinates |
The explicit projection pipeline is:
world point -> view matrix -> view point
view point -> projection matrix -> clip point (x, y, z, w)
clip point -> divide by w -> NDC
NDC -> resolution scaling -> screen pixelsProbability Operations
Function | Description | Parameters |
| Calculates `P(H | E) = P(E |
| Normalizes likelihood-weighted priors across hypotheses | Array of hypothesis labels, priors, and likelihoods |
Trigonometric Operations
Function | Description | Parameters |
| Calculates the sine of a number in radians |
|
| Calculates the arcsine (in radians) of a number |
|
| Calculates the cosine of a number in radians |
|
| Calculates the arccosine (in radians) of a number |
|
| Calculates the tangent of a number in radians |
|
| Calculates the arctangent (in radians) of a number |
|
| Converts a radian value to its equivalent in degrees |
|
| Converts a degree value to its equivalent in radians |
|
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceA Model Context Protocol server that provides basic mathematical and statistical functions to LLMs, enabling them to perform accurate numerical calculations through a simple API.Last updated21341162MIT
- AlicenseCqualityFmaintenanceA Model Context Protocol server that enables LLMs to perform precise numerical calculations by evaluating mathematical expressions.Last updated1152MIT
- AlicenseBqualityCmaintenanceA Model Context Protocol server that provides basic calculator functionality for LLMs, enabling them to perform mathematical operations like addition, subtraction, multiplication, division, modulo, and square root.Last updated637616MIT
- -license-quality-maintenanceA calculator server that exposes mathematical functions as tools (add, subtract, multiply, divide, square, power, square root), enabling language models to perform calculations through Model Context Protocol (MCP).Last updated
Related MCP Connectors
This MCP server enables users to perform scientific computations regarding linear algebra and vect…
Educational MCP server with 17 math/stats tools, visualizations, and persistent workspace
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/PolarisHub/math-mcp-main'
If you have feedback or need assistance with the MCP directory API, please join our Discord server