Skip to main content

Calculator MCP Server

python poetry FastMCP GitHub Microsoft AI license

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 package published on PyPI as calculator-lib-rubens.


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
  • Resources Methods: resources/list, resources/templates/list, resources/read
  • Prompts Methods: prompts/list, prompts/get

The following MCP protocols are supported, selected by the client per request:

  • Legacy MCP (Version: 2025-06-18): initialize handshake and Mcp-Session-Id session
  • Modern MCP (Version: 2026-07-28): no handshake or session

Unsupported Features

Unsupported JSON-RPC methods:

  • Logging & Progress Utilities (e.g. notifications/progress)
  • Server-to-Client calls (e.g. sampling/createMessage, elicitation/create, roots/list)

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 using pip
pip install 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

pip uninstall calculator-mcp-rubens
pip cache purge

Configuration

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

Usage

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

Open Source Project Information

This project is open source and publicly hosted on GitHub at rubensgomes-org. It is published under an OSI-approved open-source license.

License

The project is licensed under the MIT License.


Author: Rubens Gomes

Metadata

Release files for calculator-mcp-rubens 0.0.56

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.56
File Size Uploaded Provenance Actions
calculator_mcp_rubens-0.0.56.tar.gz 12.2 kB Without provenance Details for calculator_mcp_rubens-0.0.56.tar.gz

Built distribution (wheel)

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

Total release size: 25.4 kB

Release files / calculator_mcp_rubens-0.0.56.tar.gz

Download URL calculator_mcp_rubens-0.0.56.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7029f3352c1f007e32176480e85bf14e9517a1fbf8a9136122a7eca0adb1797b
BLAKE2b-256 checksum
How to use checksums
d85771991f4a48ca46f10fa7d7f1f4e93539aae13bd4c23289ddb2a3c2ef64ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.3 CPython/3.14.8 Linux/6.17.0-1022-azure

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

Download URL calculator_mcp_rubens-0.0.56-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5092ff5d289d8569751631122a6d1cd7e3111b186faf251a143563f3a1aa3c8c
BLAKE2b-256 checksum
How to use checksums
341797115abe416d20b8d76338f50815aba757c9afd86f52e9068eea724e9cc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.3 CPython/3.14.8 Linux/6.17.0-1022-azure

Security for calculator-mcp-rubens 0.0.56

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.56 This release

2 release files No provenance

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