# Math-MCP

Math-MCP provides arithmetic, statistical, and trigonometric operations for language models. Useful when you need reliable calculations without hallucinations.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · 5958 installs · ★ 191 repo stars
- Author: EthanHenrickson
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/EthanHenrickson/math-mcp
- Updated: 2026-05-30
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/math-mcp

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Remote server: `https://math-mcp--ethanhenrickson.run.tools`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http math-mcp https://math-mcp--ethanhenrickson.run.tools
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add math-mcp --url https://math-mcp--ethanhenrickson.run.tools
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "math-mcp": {
            "url": "https://math-mcp--ethanhenrickson.run.tools"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "math-mcp": {
            "type": "http",
            "url": "https://math-mcp--ethanhenrickson.run.tools"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http math-mcp https://math-mcp--ethanhenrickson.run.tools
```

## When to use it
- 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
- 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.

## Similar
- [Math MCP Learning](https://affpapa.org/en/nevibecode/mcp/clouatre-labs-math-mcp-learning.md) — MCP server · 579 installs
- [math-tools](https://affpapa.org/en/nevibecode/skills/math-tools.md) — skill · 1 install
- [math](https://affpapa.org/en/nevibecode/skills/math.md) — skill · 887 installs
- [math-help](https://affpapa.org/en/nevibecode/skills/math-help.md) — skill · 548 installs
- [discover-math](https://affpapa.org/en/nevibecode/skills/discover-math.md) — skill · 146 installs
- [math-proof-judge](https://affpapa.org/en/nevibecode/agents/math-proof-judge.md) — subagent · ★ 47914 repo stars

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
