Skip to main content

Calculator MCP Server

python License AI--Assisted

calculator-mcp is an MCP (Model Context Protocol) server that exposes 16 arithmetic operations as callable tools for use by LLMs within agentic applications. It contains no mathematical logic of its own. Instead, each tool is a thin synchronous wrapper that logs its arguments and delegates execution to the open-source calculator-lib-rubens package published on PyPI.


Features

16 calculator functions exposed through an MCP server for consumption by AI agentic programs:

  • Two-operand operations: add, subtract, multiply, divide, power, nth_root, modulo, floor_divide
  • Single-operand operations: sqrt, absolute, floor, ceil, log10, ln, exp
  • Rounding: round_number (with configurable decimal places)

The following are the supported MCP JSON-RPC 2.0 methods:

  • Lifecycle Methods: initialize, notifications/initialized
  • Tools Methods: tools/list, tools/call

The following MCP protocols are supported:

  • Legacy MCP (Version: 2025-06-18) when stateless is true in config.yaml
  • Modern MCP (Version: 2026-07-28) when stateless is false in config.yaml

Non-Supported Features

  • Server-sent events (SSE) are not supported for the MCP communication.
  • Streaming communication channels, such as HTTP Streamable, are not supported. In other words, the MCP server is expected to generate the entire output before sending it.

Non-supported JSON-RPC methods:

  • Resources Methods: resources/list, resources/read
  • Prompts Methods: prompts/list, prompts/get
  • Logging & Progress Utilities
  • Server-to-Client calls are not supported

AI Disclaimer

This project includes code and documentation created with the assistance of AI tools. For details on usage, limits, and review practices, please see the AI Disclaimer.

Prerequisites

  • python 3.14+
  • pip

Installation

  1. Install in pip default installation folder
pip install calculator-mcp-rubens
  1. Install in the Python user install directory
pip --no-cache-dir install -U --user calculator-mcp-rubens
  1. Confirm the installed version matches the latest GitHub release at calculator-mcp/releases
calculator-mcp --version
pip show calculator-mcp-rubens

Uninstall

  • Uninstall as follows
pip uninstall calculator-mcp-rubens
pip cache purge

Configuration

  • Copy the file config.yaml to ${HOME}/cfg/calculator-mcp/config.yaml.
export CALCULATOR_MCP_CONFIG="${HOME}/cfg/calculator-mcp/config.yaml"

Usage

  1. Simply run
calculator-mcp
  1. Health check
curl -v http://localhost:8080/health
# Expect: OK
  1. To stop, go to the running terminal and press Ctrl+C

License

The project is licensed under MIT License.


Author: Rubens Gomes

Metadata

Release files for calculator-mcp-rubens 0.0.29

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for calculator-mcp-rubens 0.0.29
File Size Uploaded
calculator_mcp_rubens-0.0.29.tar.gz 10.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for calculator-mcp-rubens 0.0.29
File Interpreter ABI Platform
calculator_mcp_rubens-0.0.29-py3-none-any.whl Python 3 none any Details

Total release size: 24.7 kB

Release files / calculator_mcp_rubens-0.0.29.tar.gz

Download URL calculator_mcp_rubens-0.0.29.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
82655f3139109cf155ba8dce125106190e94f4f7b17dd3d2ae0262cba1b73610
BLAKE2b-256 checksum
How to use checksums
1f82129aaf61138ff609bcf52fa54ee1dd3cd955de1e0572a4fc66b8dec0c11b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.3 CPython/3.14.7 Linux/6.17.0-1022-azure

Release files / calculator_mcp_rubens-0.0.29-py3-none-any.whl

Download URL calculator_mcp_rubens-0.0.29-py3-none-any.whl
Size 14.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e4673546c729753cae2c7d52c0e10b561ff64dc9711dc7923843bb1942798c2
BLAKE2b-256 checksum
How to use checksums
70e3029b8df0d70d299d0a90481ce6b88eca225d852119596dd6250f2b23c0ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.3 CPython/3.14.7 Linux/6.17.0-1022-azure

Release history Release notifications | RSS feed

0.0.55

2 release files

0.0.54

2 release files

0.0.53

2 release files

0.0.52

2 release files

0.0.51

2 release files

0.0.50

2 release files

0.0.49

2 release files

0.0.32

2 release files

0.0.31

2 release files

0.0.30

2 release files

This release

0.0.29 This release

2 release files

0.0.28

2 release files

0.0.27

2 release files

0.0.26

2 release files

0.0.25

2 release files

0.0.24

2 release files

0.0.23

2 release files

0.0.22

2 release files

0.0.21

2 release files

0.0.20

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page