mcp-calculator-server

abdulrehmankhalid786/mcp-calculator-server

3.1

If you are the rightful owner of mcp-calculator-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A simple calculator server built using the MCP framework, providing basic mathematical operations as callable tools.

MCP Calculator Server

A simple calculator server built using the MCP (Machine Communication Protocol) framework. This server exposes basic mathematical operations as callable tools via MCP, making it easy to integrate with MCP-compatible clients.

Features

  • Addition, subtraction, multiplication, division
  • Power, square root, cube root, factorial
  • Natural logarithm, remainder
  • Trigonometric functions: sine, cosine, tangent

Requirements

  • Python 3.8+
  • mcp package (and its dependencies)

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/mcp-calculator-server.git
    cd mcp-calculator-server
    
  2. Install dependencies:

    pip install -r requirements.txt
    

Usage

Run the server:

python server.py

The server will start and listen for MCP requests via standard input/output.

Exposed Tools

  • add(a, b)
  • subtract(a, b)
  • multiply(a, b)
  • divide(a, b)
  • power(a, b)
  • sqrt(a)
  • cbrt(a)
  • factorial(a)
  • log(a)
  • remainder(a, b)
  • sin(a)
  • cos(a)
  • tan(a)

License

MIT License