Calculator MCP Server
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):
initializehandshake andMcp-Session-Idsession - 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
- Install using
pip
pip install calculator-mcp-rubens
- 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
- Run
calculator-mcp
- Health check
curl -v http://localhost:8080/health
# Expect: OK
- To stop, press
Ctrl+Cin 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.
Note: Public availability and the use of an OSI-approved license are requirements for eligibility to use SonarQube Cloud under its free plan for open-source projects.
License
The project is licensed under the MIT License.
Links
- GitHub Project
- Azure CLI Commands
- Azure Container App Provisioning
- Demo
- Development Setup
- Docker
- Integration Test
- MCP
- Miscellaneous
- OAuth Diagram
- PyCharm
- Release Process
Author: Rubens Gomes
Metadata
Release files for calculator-mcp-rubens 0.0.44
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| calculator_mcp_rubens-0.0.44.tar.gz | 12.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| calculator_mcp_rubens-0.0.44-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.3 kB
Release files / calculator_mcp_rubens-0.0.44.tar.gz
| Download URL | calculator_mcp_rubens-0.0.44.tar.gz |
|---|---|
| Size | 12.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
70dc520c57fd8b05be72023ff9b48bc3169413fc31f6cac07f371321551159dc
|
|
BLAKE2b-256 checksum How to use checksums |
95f3dbc8545b63293f013017fd2903d7e3c56daa5a6620bee92b491b7d8ae159
|
| 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.44-py3-none-any.whl
| Download URL | calculator_mcp_rubens-0.0.44-py3-none-any.whl |
|---|---|
| Size | 19.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d7ea908d72c0cd63888bce053f4718d1ca1dd022b9914079d96f2ecd43680889
|
|
BLAKE2b-256 checksum How to use checksums |
843b6d9d7d0100246b7cd8474133fdba95dc19e28fcfbb86db41e5f5f68e7de0
|
| 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
|