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-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
- Install in
pipdefault installation folder
pip install calculator-mcp-rubens
- Install in the Python user install directory
pip --no-cache-dir install -U --user calculator-mcp-rubens
- Confirm the installed version matches the latest GitHub release at calculator-mcp/releases
pip show calculator-mcp-rubens
Configuration
The server ships with a
default config.yaml
bundled inside the PyPI package. To override it, make a copy and paste in
your "${HOME}" folder, and set the CALCULATOR_MCP_CONFIG environment
variable to the path of your custom configuration file:
# assuming config.yaml placed in my home folder
export CALCULATOR_MCP_CONFIG="${HOME}/cfg/calculator-mcp/config.yaml"
Usage
- Ensure
CALCULATOR_MCP_CONFIGis properly setup, and run:
calculator-mcp
- Health check
curl -v http://localhost:8080/health
# Expect: OK
- 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.27
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.27.tar.gz | 10.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| calculator_mcp_rubens-0.0.27-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.9 kB
Release files / calculator_mcp_rubens-0.0.27.tar.gz
| Download URL | calculator_mcp_rubens-0.0.27.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
909b5d312675a2be6f8dc11316c12bd06e25d931ad2355910b1b413f65d0f807
|
|
BLAKE2b-256 checksum How to use checksums |
4096c86bf48c29560e92a7aa8291d4c27e2e5a9ff2b6551a8f7b036687f3bdda
|
| 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.27-py3-none-any.whl
| Download URL | calculator_mcp_rubens-0.0.27-py3-none-any.whl |
|---|---|
| Size | 14.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ba16c63e2cc09d2ef3a5d220a1a09ac3ae8daffc25dc8b566becf907f6a2d46b
|
|
BLAKE2b-256 checksum How to use checksums |
dc6955f6135b9d99c64ea6a3fbf220a0ab626b602a7c23a0bca5085be0993150
|
| 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
|