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.
Overview
Math-MCP is a Model Context Protocol (MCP) server that provides basic mathematical and statistical functions to Large Language Models (LLMs), enabling them to perform accurate numerical calculations through a simple API.
To use Math-MCP, clone the repository and add the server to your MCP configuration file, specifying the path to the server's index.js file.
- Basic arithmetic operations (addition, subtraction, multiplication, division) - Statistical functions (sum, average, min, max) - Rounding functions (floor, ceiling, round)
- Enhancing LLMs with accurate mathematical capabilities.
- Performing statistical analysis in data processing applications.
- Supporting educational tools that require mathematical computations.
Add to your AI client
Use these steps to connect Math-MCP in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"math-mcp-ethanhenrickson": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-math-mcp-ethanhenrickson"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"math-mcp-ethanhenrickson": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-math-mcp-ethanhenrickson"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"math-mcp-ethanhenrickson": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-math-mcp-ethanhenrickson"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"math-mcp-ethanhenrickson": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-math-mcp-ethanhenrickson"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"math-mcp-ethanhenrickson": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-math-mcp-ethanhenrickson"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"math-mcp-ethanhenrickson": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-math-mcp-ethanhenrickson"
]
}
}
}FAQ
What operations can Math-MCP perform?
Math-MCP can perform basic arithmetic, statistical functions, and rounding operations.
How do I install Math-MCP?
Clone the repository and configure it in your MCP setup as described in the documentation.
Is Math-MCP suitable for production use?
Yes, Math-MCP is designed to be integrated into applications requiring reliable mathematical computations.