Skip to main content
Glama
Amankhan1009

calculator-mcp-server

by Amankhan1009

Calculator MCP Server

A Model Context Protocol server exposing calculator operations, built as a learning project.

Tools

  • add(a, b)

  • subtract(a, b)

  • multiply(a, b)

  • divide(a, b)

  • power(base, exponent)

  • square_root(number)

  • modulus(a, b)

Related MCP server: Calculator MCP

Run

uv run mcp dev src/calculator_mcp/server.py

Test

uv run pytest tests/ -v

Architecture

  • operations.py — pure calculator logic, no MCP dependency

  • server.py — FastMCP tool registration, thin wrappers over operations.py

  • exceptions.py — custom exception hierarchy (CalculatorError base)

  • tests/ — pytest unit tests, independent of the MCP layer

Connect to Claude Desktop

Add this to claude_desktop_config.json:

{
  "mcpServers": {
    "calculator": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/calculator-mcp-server", "mcp", "run", "src/calculator_mcp/server.py"]
    }
  }
}

This structure generalizes to any MCP server: keep domain logic separate from protocol code, use typed exceptions per failure mode, annotate tools honestly (readOnly/idempotent/destructive/openWorld), and test the logic layer without needing a live server.

F
license - not found
A
quality
C
maintenance

Maintenance

UpdatingMaintainers
UpdatingResponse time
Release cycle
0Releases (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

  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides basic arithmetic operations and advanced mathematical functions through the Model Context Protocol (MCP), with features like calculation history tracking and expression evaluation.
    1
  • A
    license
    B
    quality
    D
    maintenance
    Provides mathematical computation capabilities including basic arithmetic operations (add, subtract, multiply, divide), advanced functions (square root, factorial, logarithm), and trigonometric functions (sin, cos, tan) through the Model Context Protocol.
    5
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    Provides basic mathematical operations including addition, subtraction, multiplication, division, and power calculations through a Model Context Protocol interface.
    5
    1
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides basic arithmetic operations (add, multiply, divide) for AI assistants through the Model Context Protocol.

View all related MCP servers

Related MCP Connectors

  • Math.js MCP — wraps the mathjs.org API (free, no auth)

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

  • Evaluate, simplify, and differentiate mathematical expressions.

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/Amankhan1009/calculator-mcp-server'

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