Skip to main content
Glama
anshika1109

Calculator MCP Server

by anshika1109

Calculator MCP Server

A simple calculator server implementing the Model Context Protocol (MCP).

Features

This MCP server provides the following calculator operations:

  • add: Add two numbers together

  • subtract: Subtract second number from first

  • multiply: Multiply two numbers

  • divide: Divide first number by second (with zero-check)

  • power: Raise a number to a power

  • sqrt: Calculate square root

  • percentage: Calculate percentage of a number

Related MCP server: Calculator MCP Server

Installation

The easiest way is to use uvx which was just installed:

# Test the server directly
export PATH="$HOME/.local/bin:$PATH"
uvx --from . --with mcp calculator-mcp-server

Manual Installation with pip

If you prefer pip, install in a virtual environment:

# Create virtual environment
python -m venv venv
source venv/bin/activate

# Install dependencies
pip install git+https://github.com/modelcontextprotocol/python-sdk.git

# Run the server
python calculator_mcp_server.py

Configuration

Add this to your Kiro MCP configuration file (.kiro/settings/mcp.json):

{
  "mcpServers": {
    "calculator": {
      "command": "/Users/anshikagupta/.local/bin/uvx",
      "args": ["--from", "/Users/anshikagupta/calculator", "--with", "mcp", "python", "calculator_mcp_server.py"],
      "disabled": false,
      "autoApprove": ["add", "subtract", "multiply", "divide", "power", "sqrt", "percentage"]
    }
  }
}

Usage Examples

Once configured, you can use the calculator through Kiro:

  • "Add 5 and 3"

  • "What's 10 divided by 2?"

  • "Calculate 2 to the power of 8"

  • "What's the square root of 144?"

  • "Calculate 20% of 500"

Tools Available

add

Add two numbers together.

  • Parameters: a (number), b (number)

  • Example: {"a": 5, "b": 3} → "5 + 3 = 8"

subtract

Subtract second number from first.

  • Parameters: a (number), b (number)

  • Example: {"a": 10, "b": 3} → "10 - 3 = 7"

multiply

Multiply two numbers.

  • Parameters: a (number), b (number)

  • Example: {"a": 4, "b": 5} → "4 × 5 = 20"

divide

Divide first number by second.

  • Parameters: a (number), b (number)

  • Example: {"a": 20, "b": 4} → "20 ÷ 4 = 5"

power

Raise base to exponent.

  • Parameters: base (number), exponent (number)

  • Example: {"base": 2, "exponent": 8} → "2^8 = 256"

sqrt

Calculate square root.

  • Parameters: number (number, non-negative)

  • Example: {"number": 144} → "√144 = 12"

percentage

Calculate percentage of a number.

  • Parameters: number (number), percent (number)

  • Example: {"number": 500, "percent": 20} → "20% of 500 = 100"

License

MIT

F
license - not found
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    A Model Context Protocol server that provides basic mathematical and statistical functions to LLMs, enabling them to perform accurate numerical calculations through a simple API.
    Last updated
    2
    13
    33
    167
    MIT
  • A
    license
    B
    quality
    C
    maintenance
    A Model Context Protocol server that provides basic calculator functionality for LLMs, enabling them to perform mathematical operations like addition, subtraction, multiplication, division, modulo, and square root.
    Last updated
    6
    228
    16
    MIT
  • F
    license
    -
    quality
    D
    maintenance
    Provides basic mathematical operations (addition, subtraction, multiplication, division) through a Model Context Protocol server. Enables MCP-compatible clients like chatbots to perform calculations by sending structured math requests.
    Last updated

View all related MCP servers

Related MCP Connectors

  • Precision math engine for AI agents. 203 exact methods. Zero hallucination.

  • This MCP server enables users to perform scientific computations regarding linear algebra and vect…

  • 500+ deterministic tools for AI agents: math, conversion, validation, hashing, encoding, date/time.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/anshika1109/calculator-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server