Math-MCP — Claude Code MCP server: median and mode of number lists
Math-MCP provides arithmetic, statistical, and trigonometric operations for language models. Useful when you need reliable calculations without hallucinations.
MIT 5,958 installs ★ 191 updated 2026-05-30
claude mcp add --transport http math-mcp https://math-mcp--ethanhenrickson.run.toolsWhat Math-MCP does
Standard language models struggle with exact arithmetic calculations. Math-MCP offloads operations to deterministic code, handling addition, subtraction, division, and modulo logic. It also calculates averages, medians, modes, minimums, and maximum values over lists.
Trigonometric tools cover standard functions, their inverse counterparts, and conversions between radians and degrees. Running the server locally requires Node.js. While prebuilt files are included, modifying the source requires running npm run build to update the output.
What it helps with
- calculate median and mode across numerical lists
- convert degrees to radians for angle calculations
- compute remainder values using
modulo - evaluate trigonometric functions and their inverses
Example prompts for the agent
- Calculate the sine and cosine of the angle stored in
angle.txt. - Find the arithmetic mean and median for the imported dataset array.
- Sum all items in the list and identify the maximum value.
How to install Math-MCP
Platform CLI: remote server
claude mcp add --transport http math-mcp https://math-mcp--ethanhenrickson.run.toolsPlatform CLI: remote server
codex mcp add math-mcp --url https://math-mcp--ethanhenrickson.run.toolsConfig file
{
"mcpServers": {
"math-mcp": {
"url": "https://math-mcp--ethanhenrickson.run.tools"
}
}
}Config file
{
"servers": {
"math-mcp": {
"type": "http",
"url": "https://math-mcp--ethanhenrickson.run.tools"
}
}
}Platform CLI: remote server
gemini mcp add -t http math-mcp https://math-mcp--ethanhenrickson.run.toolsStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Math-MCP
How to install Math-MCP in Claude Code?
Run claude mcp add --transport http math-mcp https://math-mcp--ethanhenrickson.run.tools in your terminal.
What does Math-MCP do?
It gives models direct access to arithmetic, statistical functions, rounding helpers, and trigonometry.
What is required to run Math-MCP locally?
You need Node.js installed locally. If you modify source files, rebuild the project with npm run build.