Math MCP
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.
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
Maintainer
Works with
Installation
Manual Installation
npx math-mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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.gitInstall dependencies
Navigate into the cloned directory and install Node.js dependencies.
cd math-mcp && npm installBuild 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 buildNote 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.
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"]
}
}
}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.
Math MCP Alternatives — Similar Developer Tools Servers
Looking for alternatives to Math MCP? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
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.
Set Up Math MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.