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-mcp-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
Non-Supported Features
Non-supported JSON-RPC methods:
- Logging & Progress Utilities (e.g.
notifications/progress) - Server-to-Client calls are not supported (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 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
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 CALCULATORMCP_CONFIG="${HOME}/cfg/calculator-mcp/config.yaml"
Usage
- Simply 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.
Links
- GitHub Project
- Azure CLI Commands
- Azure Container App Provisioning
- Development Setup
- Docker
- Integration Test
- MCP
- Miscellaneous
- OAuth Diagram
- PyCharm
- Release Process
Author: Rubens Gomes
Metadata
Release files for calculator-mcp-rubens 0.0.35
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.35.tar.gz | 12.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| calculator_mcp_rubens-0.0.35-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.9 kB
Release files / calculator_mcp_rubens-0.0.35.tar.gz
| Download URL | calculator_mcp_rubens-0.0.35.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1d1fe3a64274da09b6f333492124165ee76a76cb1e6d64c000bcc987587ed134
|
|
BLAKE2b-256 checksum How to use checksums |
a4088fa72dbc886e46358105a0610c63d4b6102efbad62e997658058bb5873ef
|
| 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.35-py3-none-any.whl
| Download URL | calculator_mcp_rubens-0.0.35-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
088f4e31a067741b92b261c6637bbf7c3d230b73ba65f9b46d7924dcb8cdc798
|
|
BLAKE2b-256 checksum How to use checksums |
454526b56f07ca5632c9c0eba3d121fb0cb97fe6ba5cec4e8f883016b313c036
|
| 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
|