Skip to main content
MCP server CX Codex

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

Install into Claude Code · Platform CLI: remote server All methods and platforms ↓
claude mcp add --transport http math-mcp https://math-mcp--ethanhenrickson.run.tools
Open on GitHub

What 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.tools

Step 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.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

More in the catalog

Project sponsors

Companies that keep this analytics open