math
A Model Context Protocol (MCP) server that provides basic mathematical and statistical functions to Large Language Models (LLMs). This server enables LLMs to perform accurate numerical calculations through a simple API.
claude mcp add --transport stdio ethanhenrickson-math-mcp node PATH\\TO\\PROJECT\\math-mcp\\build\\index.js
How to use
The Math-MCP server provides a collection of basic arithmetic, statistical, and trigonometric functions that can be invoked by an LLM through the MCP interface. It exposes operations such as add, subtract, multiply, division, and sums, as well as statistical tools like mean, median, mode, min, and max, along with rounding and trigonometric functions (sin, cos, tan, arcsin, arccos, arctan) and unit conversions between radians and degrees. LLMs can call these endpoints to perform precise numerical calculations or data analysis as part of generated responses. The server is designed to accept structured function calls with named parameters, returning numeric results that can be used directly in follow-up reasoning or generated outputs.
How to install
Prerequisites:
- Node.js (LTS version) installed on your system
- Access to the repository containing the Math-MCP server
Installation steps:
-
Install Node.js from https://nodejs.org/ if you don’t have it already.
-
Clone the Math-MCP repository and navigate to the project directory:
git clone <repository-url>\n cd math-mcp
-
Build or prepare the server as described by the project, ensuring you have a built index.js at build/index.js. If a build step is required, run the project’s build script (for example, npm ci && npm run build) if provided by the repo.
-
Update your MCP configuration file to include the new server:
{ "math": { "command": "node", "args": ["PATH\TO\PROJECT\math-mcp\build\index.js"] } }
-
Start the server using your normal MCP startup workflow. If you run the server directly, you can test with:
node PATH\TO\PROJECT\math-mcp\build\index.js
Note: Replace PATH\TO\PROJECT with the actual file path to where you cloned the repository and where the built index.js resides.
Additional notes
Tips and considerations:
- Ensure the build/index.js path in the mcp_config matches where the server is built on your machine.
- If the server relies on environment variables (for example, API keys or configuration flags), add them under an env section in the MCP config or set them in your runtime environment.
- When integrating with an LLM, consider providing explicit error handling for numeric edge cases (division by zero, invalid inputs) and return clear error messages.
- If you update the code, re-build and verify that the index.js path in the MCP config remains correct.
- Test a few sample calls (e.g., add(1,2), mean([1,2,3]), sin(0.5)) to confirm correct behavior and output formats.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.