MCP Calculator - AI SDKs & Libraries Tool
Overview
MCP Calculator is an open-source sample project that demonstrates the Model Context Protocol (MCP) by exposing small, callable tools (the included calculator) that language models can invoke. The repository provides a working calculator implementation (calculator.py) and a communication pipe (mcp_pipe.py) that handle secure WebSocket transport, real-time streaming of tool output back to the model, and automatic reconnection with exponential backoff. The project is configuration-driven via mcp_config.json so you can declare multiple local or remote MCP servers and choose transports (stdio, SSE/HTTP, or HTTP proxy) to wire a local tool into an MCP-enabled model stack. ([github.com](https://github.com/78/mcp-calculator)) Written as a developer-focused example (uses the FastMCP helper and a @mcp.tool() decorator to define typed tool functions), MCP Calculator is intended for experimentation and quick integration rather than as a production-grade service. The README lists concrete run commands and a requirements.txt for dependencies (Python 3.7+, websockets, python-dotenv, mcp, pydantic, mcp-proxy), making it easy to clone, install, and run the calculator example locally. The project is MIT-licensed and designed to be extended into other tools (email, knowledge search, device control, etc.) using the same pattern. ([github.com](https://github.com/78/mcp-calculator))
GitHub Statistics
- Stars: 335
- Forks: 141
- Contributors: 5
- Primary Language: Python
- Last Updated: 2025-11-07T23:13:08Z
The repository shows moderate community interest: the GitHub project has 335 stars and 141 forks, with five listed contributors and no formal releases. The README and example scripts are concise and the project contains ~21 commits in the default branch, indicating a small but active codebase. There are roughly 20 open issues (user questions, environment/compatibility reports, and feature requests) which suggest active usage and community troubleshooting. The project’s documentation and examples make it straightforward to run from source, but the smaller contributor base and lack of releases means users should expect to run the code from the repository rather than rely on published packages. ([github.com](https://github.com/78/mcp-calculator))
Installation
Install via pip:
git clone https://github.com/78/mcp-calculator.gitcd mcp-calculatorpython3 -m venv .venv && source .venv/bin/activate # (Windows: .venv\Scripts\activate)pip install -r requirements.txtexport MCP_ENDPOINT=<your_mcp_endpoint> # set MCP endpoint if requiredpython mcp_pipe.py calculator.py # run the calculator examplepython mcp_pipe.py # run all configured servers from mcp_config.json Key Features
- Example calculator tool demonstrating safe expression evaluation and structured results.
- Secure WebSocket transport for bidirectional communication between models and tools.
- Automatic reconnection with exponential backoff for robust long‑lived connections.
- Real-time streaming of tool output back to the calling model for interactive flows.
- Config-driven servers (mcp_config.json) supporting stdio, SSE/HTTP, and proxy transports.
Community
Small, engaged developer community: ~335 stars and 141 forks with five contributors. Around 20 open issues indicate active usage and troubleshooting; a few issues filed in mid-to-late 2025 cover environment, dependency, and usage questions. No formal GitHub releases exist, so users typically clone and run from source. Contributions are welcome under an MIT license. ([github.com](https://github.com/78/mcp-calculator))
Key Information
- Category: SDKs & Libraries
- Type: AI SDKs & Libraries Tool