Calculator MCP - Learning Project
This project, calculator-mcp, was built for learning purposes. It provides an MCP (Multi-Agent Communication Protocol) server that exposes basic calculator tools. These tools can be integrated with other systems, such as LangGraph agents.
The server gives you access to the following calculator tools:
add(a: float, b: float) -> floatsubtract(a: float, b: float) -> floatmultiply(a: float, b: float) -> floatdivide(a: float, b: float) -> float
Installation
You can install the calculator-mcp package directly using pip:
pip install calculator-mcp
Usage with LangGraph
You can use calculator-mcp as a tool within a LangGraph agent.
-
Create a Python script to run the MCP server (e.g.,
cal_mcp.py):# cal_mcp.py from calculator_mcp import serve if __name__ == "__main__": serve()
-
Configure the tool in your LangGraph agent:
# Example LangGraph tool configuration tools_config = { "calculator": { "command": "python", # Replace with the absolute path to your cal_mcp.py file "args": ["/path/to/your/cal_mcp.py"], "transport": "stdio", } }
Author: Azam Afridi (azamafridi.ai@gmail.com) Version: 0.1.4 Python: >=3.10
Metadata
Release files for calculator-mcp 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| calculator_mcp-0.1.4.tar.gz | 2.1 kB | Without provenance | Details for calculator_mcp-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| calculator_mcp-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for calculator_mcp-0.1.4-py3-none-any.whl |
Total release size: 5.4 kB
Release files / calculator_mcp-0.1.4.tar.gz
| Download URL | calculator_mcp-0.1.4.tar.gz |
|---|---|
| Size | 2.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52f62e2b39ebf9bc2097d965994f7dd00365fd1f20e889aaff03ed31dcaa4705
|
|
BLAKE2b-256 checksum How to use checksums |
a25d1583124d299d904a4d2d413a393711518374df827a326bb28b6fc93b745a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.2 CPython/3.10.12 Linux/6.8.0-58-generic
|
Release files / calculator_mcp-0.1.4-py3-none-any.whl
| Download URL | calculator_mcp-0.1.4-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cf13f0b1af2ab15e3fd500ec9a2ee895b996b673e482c0c9b1066df71573f22d
|
|
BLAKE2b-256 checksum How to use checksums |
c0297962cff18f33307621040a547ef63fa1583cf36f92bb5110b7c6ab735276
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.2 CPython/3.10.12 Linux/6.8.0-58-generic
|
Security for calculator-mcp 0.1.4
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.