Math & Calculator MCP Server

Math & Calculator MCP Server

Provides advanced mathematical utilities including basic arithmetic, statistical analysis, unit conversions, quadratic equation solving, percentage calculations, and trigonometric functions for AI assistants.

Category
Visit Server

README

๐Ÿงฎ Math & Calculator MCP Server

A powerful Model Context Protocol (MCP) Server that provides advanced mathematical utilities and calculator tools for AI assistants like Claude and other MCP-compatible clients.

License: MIT Node.js Version TypeScript

๐Ÿ“– About

This MCP server exposes mathematical tools that AI assistants can use to perform calculations, statistical analysis, unit conversions, and more. Built with the Model Context Protocol SDK, it seamlessly integrates with Claude Desktop, VSCode, and other MCP clients.

Author: Jefferson Rosas Chambilla
Repository: https://github.com/Ankluna72/Math-Calculator-MCP-Server-

โœจ Features

๐Ÿ”ข Basic Calculator

  • Addition, subtraction, multiplication, division
  • Power, square root, modulo operations
  • Error handling (division by zero, invalid operations)

๐Ÿ“Š Statistical Analysis

  • Mean, median, mode
  • Standard deviation and variance
  • Complete statistical summaries

๐Ÿ”„ Unit Conversions

  • Length: meters, kilometers, miles, feet, inches
  • Weight: kilograms, grams, pounds, ounces
  • Temperature: Celsius, Fahrenheit, Kelvin

๐Ÿ“ Equation Solver

  • Quadratic equation solver (axยฒ + bx + c = 0)
  • Handles real and complex solutions
  • Discriminant analysis

๐Ÿ’ฏ Percentage Calculator

  • Percentage of a number
  • Percentage increase/decrease
  • "What percentage is X of Y?"

๐Ÿ“ Trigonometry

  • Sin, cos, tan (and inverse functions)
  • Angle calculations in degrees
  • Precise floating-point results

๐Ÿš€ Installation

Prerequisites

  • Node.js >= 18.0.0
  • npm or yarn

Clone and Install

git clone https://github.com/Ankluna72/Math-Calculator-MCP-Server-.git
cd Math-Calculator-MCP-Server-
npm install
npm run build

โš™๏ธ Configuration

For Claude Desktop

Add to your Claude Desktop config file (claude_desktop_config.json):

Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "math-calculator": {
      "command": "node",
      "args": [
        "C:\\path\\to\\Math-Calculator-MCP-Server-\\dist\\index.js"
      ]
    }
  }
}

For VSCode with Cline Extension

Add to VSCode settings (.vscode/settings.json or User Settings):

{
  "mcp.servers": {
    "math-calculator": {
      "command": "node",
      "args": [
        "C:\\path\\to\\Math-Calculator-MCP-Server-\\dist\\index.js"
      ]
    }
  }
}

๐Ÿ“š Usage Examples

Once configured, your AI assistant can use these tools automatically. Here are some example requests:

Basic Calculations

"Calculate 25 * 4"
"What is the square root of 144?"
"Divide 100 by 7"

Statistics

"Calculate the mean of [10, 20, 30, 40, 50]"
"Find median and mode for these numbers: [5, 3, 5, 2, 8, 5]"
"Give me all statistics for [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"

Unit Conversions

"Convert 100 kilometers to miles"
"How many pounds is 75 kilograms?"
"Convert 32 Fahrenheit to Celsius"

Solve Equations

"Solve xยฒ - 5x + 6 = 0"
"Find solutions for 2xยฒ + 3x - 2 = 0"

Percentages

"What is 15% of 200?"
"Increase 50 by 20%"
"What percentage is 25 of 200?"

Trigonometry

"Calculate sin(30ยฐ)"
"What is cos(45ยฐ)?"
"Find tan(60ยฐ)"

๐Ÿ› ๏ธ Available Tools

Tool Description
calculate Basic arithmetic operations
statistics Statistical analysis of number arrays
convert_units Convert between different units
solve_equation Solve quadratic equations
percentage Percentage calculations
trigonometry Trigonometric functions

๐Ÿ“ Project Structure

Math-Calculator-MCP-Server-/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ index.ts          # Main MCP server implementation
โ”œโ”€โ”€ dist/                 # Compiled JavaScript (after build)
โ”œโ”€โ”€ package.json          # Project dependencies
โ”œโ”€โ”€ tsconfig.json         # TypeScript configuration
โ”œโ”€โ”€ .gitignore
โ””โ”€โ”€ README.md

๐Ÿ”ง Development

# Install dependencies
npm install

# Build the project
npm run build

# Development mode (watch for changes)
npm run dev

# Start the server
npm start

๐Ÿงช Testing

You can test the server manually using stdio communication:

npm start

Then send MCP protocol messages via stdin to test tool execution.

๐Ÿ“ License

MIT License - see LICENSE file for details

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“ง Contact

Jefferson Rosas Chambilla

๐ŸŒŸ Acknowledgments

  • Built with the Model Context Protocol SDK
  • Inspired by the need for mathematical tools in AI assistants
  • Thanks to Anthropic for developing the MCP standard

โญ If you find this project useful, please consider giving it a star on GitHub!

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured