This MCP calculator provides a simple server and client implementation for performing basic arithmetic operations using MCP protocol, ensuring compliance and error handling within a lightweight setup.
This MCP calculator provides a simple server and client implementation for performing basic arithmetic operations using MCP protocol, ensuring compliance and error handling within a lightweight setup.
The MCP calculator is a basic application utilizing MCP (Model Context Protocol) to perform arithmetic calculations like add, subtract, multiply, divide, and modulo. It includes an MCP-compliant server, built with FastMCP, which handles computation requests and returns results, and a client that connects to this server, sending queries and receiving answers. The focus is on exploring fundamental MCP concepts, tool calling, and protocol adherence, without complex features or extensive validation, making it ideal for understanding MCP's core functionalities through a simple calculator example.
Who will use Simple MCP Calculator?
Developers exploring MCP technology
Researchers studying protocol compliance
Educational users learning about MCP
LLM and AI developers implementing MCP integrations
How to use the Simple MCP Calculator?
Step 1: Clone the repository from GitHub
Step 2: Set up the environment with 'uv sync' and activate via 'source .venv/bin/activate'
Step 3: Run the server with 'mcp dev server.py' in the server directory
Step 4: Run the client script from the client directory using 'python client.py '
Step 5: Send calculation requests through the client and view responses