Back to MCP Catalog

Calculator MCP Server

Developer ToolsPython
A calculator server for precise numerical calculations
Available Tools

calculate

Calculates/evaluates the given mathematical expression

expression

The Calculator MCP server enables large language models to perform precise numerical calculations. It provides a simple yet powerful interface for evaluating mathematical expressions, ensuring accurate results for arithmetic operations, complex formulas, and mathematical functions. With support for Python's math library, this tool extends beyond basic arithmetic to include advanced mathematical operations. It's designed to be lightweight, reliable, and easy to integrate into any MCP-compatible client.

Overview

The Calculator MCP server provides a reliable way for language models to perform precise numerical calculations. Instead of approximating math results, models can delegate calculations to this dedicated server for accurate answers.

Installation

There are two recommended ways to install the Calculator MCP server:

Using uv (Recommended)

  1. Install uv if you don't have it already:

    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  2. No additional installation is needed as we'll use uvx to run the server directly.

Using pip

Alternatively, you can install the package via pip:

pip install mcp-server-calculator

Configuration

To configure your MCP client to use the Calculator server, add the appropriate configuration to your client settings.

When using uv (Recommended)

"mcpServers": {
  "calculator": {
    "command": "uvx",
    "args": ["mcp-server-calculator"]
  }
}

When using pip

"mcpServers": {
  "calculator": {
    "command": "python",
    "args": ["-m", "mcp_server_calculator"]
  }
}

Usage

Once configured, you can use the calculator in your conversations with the language model. The model will automatically use the calculator when it needs to perform precise calculations.

Example prompts that would trigger calculator usage:

  • "What is 3456 × 9872?"
  • "Calculate the compound interest on $10,000 at 5% for 10 years, compounded annually"
  • "What's the square root of 1369?"

The calculator supports a wide range of operations from basic arithmetic to more complex mathematical functions through the Python math library.

Related MCPs

Apple Shortcuts
Developer ToolsJavaScript

Control Apple Shortcuts automations from AI assistants

Clojars Dependency Lookup
Developer ToolsJavaScript

Fetch dependency information from Clojars, the Clojure community's artifact repository

Simple Timeserver
Developer ToolsPython

Provides Claude with current time and timezone information

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.