Mathematical Calculator MCP Server logo

Mathematical Calculator MCP Server

Community
huhabla

A Model Context Protocol (MCP) server that provides Claude with advanced mathematical calculation capabilities

Publisherhuhabla
Repositorycalculator-mcp-server
LanguagePython
Forks
34
Stars
63
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Mathematical Calculator MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    63 stars and 34 forks from the linked repository.

Mathematical Calculator MCP Server

This is a Model Context Protocol (MCP) server that provides Claude with advanced mathematical calculation capabilities, including symbolic math, statistical analysis, and matrix operations.

Features

The Mathematical Calculator MCP Server provides the following tools:

  • Basic Calculations: Evaluate mathematical expressions safely
  • Symbolic Mathematics:
    • Solve equations (linear, quadratic, polynomial, etc.)
    • Calculate derivatives of expressions
    • Compute integrals of expressions
  • Statistical Analysis:
    • Mean, median, mode
    • Variance, standard deviation
    • Correlation coefficient
    • Linear regression
    • Confidence intervals
  • Matrix Operations:
    • Matrix addition
    • Matrix multiplication
    • Matrix transposition

Installation

Prerequisites

  • Python 3.10+ (recommended: Python 3.11+)
  • uv (recommended) or pip
  • Claude Desktop app (to use the MCP server with Claude)

Installation Steps

  1. Clone the repository:

    bash
    git clone https://github.com/huhabla/calculator-mcp-server.git
    cd calculator-mcp-server
  2. (Option 1) Setup with the provided script:

    bash
    chmod +x setup_venv.sh
    ./setup_venv.sh

    (Option 2) Or manually set up the virtual environment:

    bash
    python3 -m venv venv
    source venv/bin/activate
    pip install -r requirements.txt
  3. Run doc-tests to verify everything works:

    bash
    bash run_doctests.sh

Integration with Claude Desktop

Method 1: Configure in Claude Desktop

Add the server to your Claude Desktop configuration file:

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

Add the following to the mcpServers section:

json
{
  "mcpServers": {
    "calculator": {
      "command": "uvx",
      "args": [
        "--from",
        "calculator-mcp-server@git+https://github.com/huhabla/calculator-mcp-server.git",
        "--",
        "calculator-mcp-server",
        "--stdio"
      ]
    }
  }
}

Note: The --stdio flag is required for proper integration with Claude Desktop. The -- separates uvx arguments from the calculator server arguments.

Method 2: Install with FastMCP

  1. Make sure you have uv installed (Installation Guide)

  2. Install the MCP server in Claude Desktop:

    bash
    fastmcp install calculator_server.py

    Or with a custom name:

    bash
    fastmcp install calculator_server.py --name "Math Calculator"
  3. Once installed, Claude will automatically have access to all the mathematical tools and functions.

Usage Examples

After integrating with Claude Desktop, you can ask Claude to perform various mathematical operations. Here are some examples:

Basic Calculations

Can you calculate 3.5^2 * sin(pi/4)?

Solving Equations

Solve the following equation: x^2 - 5x + 6 = 0

Calculating Derivatives

What's the derivative of sin(x^2) with respect to x?

Computing Integrals

Calculate the integral of x^2 * e^x

Statistical Analysis

Find the mean, median, mode, and standard deviation of this dataset: [23, 45, 12, 67, 34, 23, 18, 95, 41, 23]

Linear Regression

Perform a linear regression on these points: (1,2), (2,3.5), (3,5.1), (4,6.5), (5,8.2)

Matrix Operations

Multiply these two matrices:
[1, 2, 3]
[4, 5, 6]

and

[7, 8]
[9, 10]
[11, 12]

Development

Testing

Run the comprehensive doctest suite:

bash
bash run_doctests.sh

Interactive Development Mode

For development and debugging, you can use the FastMCP development mode:

bash
fastmcp dev calculator_server.py

This will start a local web interface where you can test all tools interactively.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

  • FastMCP for the Pythonic MCP server framework
  • SymPy for symbolic mathematics
  • NumPy and SciPy for numerical and statistical computations

Installation

TypingMind
{
  "mcpServers": {
    "calculator-mcp-server": {
      "command": "uvx",
      "args": [
        "--from",
        "calculator-mcp-server@git+https://github.com/huhabla/calculator-mcp-server.git",
        "--",
        "calculator-mcp-server",
        "--stdio"
      ]
    }
  }
}

Use Mathematical Calculator MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Mathematical Calculator MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Mathematical Calculator MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Mathematical Calculator MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "calculator-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Mathematical Calculator MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Mathematical Calculator MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Mathematical Calculator MCP Server to help me with this task?
Mathematical Calculator MCP Server
Sure. I read it.
Here is what I found using Mathematical Calculator MCP Server.

Frequently asked questions

What is the Mathematical Calculator MCP Server MCP server used for?

Mathematical Calculator MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Mathematical Calculator MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Mathematical Calculator MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Mathematical Calculator MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Mathematical Calculator MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Mathematical Calculator MCP Server MCP to TypingMind?

Mathematical Calculator MCP Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Mathematical Calculator MCP Server MCP provide in TypingMind?

Mathematical Calculator MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Mathematical Calculator MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Mathematical Calculator MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇