Math MCP

v1.0.0Developer Toolsstable

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.

math-mcpmcpai-integration
Share:
137
Stars
0
Downloads
0
Weekly
0/5

What is Math MCP?

Math MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 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 thro...

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.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A Model Context Protocol (MCP) server that provides basic ma

Use Cases

Perform accurate mathematical and statistical calculations through API.
Enable LLMs to execute complex numerical operations reliably.
EthanHenrickson

Maintainer

LicenseMIT License
Languagejavascript
Versionv1.0.0
UpdatedMay 19, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx math-mcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Math MCP

Math MCP is a Model Context Protocol server that gives LLMs access to a comprehensive set of mathematical and statistical functions, enabling accurate numerical computation without relying on the model's own arithmetic. It exposes arithmetic operations (add, subtract, multiply, divide, modulo, floor, ceiling, round), statistical tools (mean, median, mode, min, max, sum), and trigonometric functions (sin, cos, tan and their inverses, plus radian/degree conversion). Developers use it to eliminate calculation errors in AI workflows that depend on precise numeric output.

Prerequisites

  • Node.js 18 or later installed on your system
  • Git to clone the repository
  • An MCP-compatible client such as Claude Desktop, Cursor, or Windsurf
  • Basic familiarity with JSON configuration files
1

Clone the repository

Clone the math-mcp repository from GitHub to a local directory on your machine.

git clone https://github.com/EthanHenrickson/math-mcp.git
2

Install dependencies

Navigate into the cloned directory and install Node.js dependencies.

cd math-mcp && npm install
3

Build the project

Compile the TypeScript source into JavaScript. The project ships pre-built, but run this step if you modify any source files.

npm run build
4

Note the path to the built entry point

The built server entry point is located at build/index.js inside the cloned directory. You will need the absolute path to this file for the MCP client configuration.

5

Add the server to your MCP client configuration

Open your MCP client configuration file (e.g. claude_desktop_config.json) and add the math-mcp entry, replacing the path with the actual absolute path on your system.

{
  "mcpServers": {
    "math": {
      "command": "node",
      "args": ["/absolute/path/to/math-mcp/build/index.js"]
    }
  }
}
6

Restart your MCP client and verify

Restart Claude Desktop (or your chosen client) so it picks up the new server. The math tools should now be available in your conversations.

Math MCP Examples

Client configuration

Minimal claude_desktop_config.json entry for the Math MCP server using a locally built binary.

{
  "mcpServers": {
    "math": {
      "command": "node",
      "args": ["/Users/yourname/math-mcp/build/index.js"]
    }
  }
}

Prompts to try

Example prompts that exercise the arithmetic, statistical, and trigonometric tools exposed by this server.

- "Calculate the mean and median of [14, 27, 3, 89, 52, 7]"
- "What is sin(45 degrees)? Convert 45 degrees to radians first."
- "Divide 987654321 by 12345 and give me the modulo as well."
- "Find the mode of [3, 7, 7, 2, 3, 7, 5] and the max value."
- "Round 3.14159265 to 4 decimal places."

Troubleshooting Math MCP

The server does not appear in Claude Desktop after restarting

Verify the absolute path in your config file points to the actual build/index.js file. Run 'node /absolute/path/to/math-mcp/build/index.js' directly in a terminal to confirm it starts without errors.

npm run build fails with TypeScript errors

Ensure you are running Node.js 18 or later ('node --version') and that all dependencies were installed ('npm install'). Delete the node_modules folder and run npm install again if issues persist.

Path contains spaces and the server fails to launch

Wrap the path in the args array as a single quoted string element and avoid spaces in the directory path where possible. Move the cloned repo to a path without spaces (e.g. /Users/yourname/tools/math-mcp).

Frequently Asked Questions about Math MCP

What is Math MCP?

Math MCP is a Model Context Protocol (MCP) server that 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. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Math MCP?

Follow the installation instructions on the Math MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Math MCP?

Math MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Math MCP free to use?

Yes, Math MCP is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "math-mcp": { "command": "npx", "args": ["-y", "math-mcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Math MCP?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides