MCP Calculator Server
Exposes calculator operations (add, subtract, multiply, divide, power) as MCP tools, allowing users to perform arithmetic calculations through natural language in MCP-compatible clients like Cursor.
README
🧮 MCP Calculator Server
<p align="center"> <img src="https://img.shields.io/badge/MCP-Model%20Context%20Protocol-8A2BE2?style=for-the-badge" alt="MCP"> <img src="https://img.shields.io/badge/Python-3.12-3776AB?style=for-the-badge&logo=python&logoColor=white" alt="Python"> <img src="https://img.shields.io/badge/uv-Package%20Manager-DE5FE9?style=for-the-badge" alt="uv"> <img src="https://img.shields.io/badge/Cursor-MCP%20Client-000000?style=for-the-badge" alt="Cursor"> </p>
<p align="center"> <b>A simple MCP server that exposes calculator operations as tools and connects them to Cursor.</b> </p>
🌟 Project Overview
This project demonstrates how to build a simple Model Context Protocol (MCP) server using Python.
The MCP server exposes calculator operations as tools that can be called by an MCP-compatible client such as Cursor.
Instead of manually writing Python code for every calculation, Cursor can understand the user's request and call the appropriate MCP tool.
🔥 Available Calculator Tools
| 🔧 Tool | 📝 Description | 💡 Example |
|---|---|---|
➕ add |
Adds two numbers | add(10, 20) → 30 |
➖ subtract |
Subtracts two numbers | subtract(20, 10) → 10 |
✖️ multiply |
Multiplies two numbers | multiply(10, 5) → 50 |
➗ divide |
Divides two numbers | divide(100, 4) → 25 |
🔢 power |
Calculates power | power(2, 10) → 1024 |
🏗️ Architecture
👤 USER
│
│
▼
🤖 CURSOR AGENT
│
│ MCP Protocol
▼
🔌 MCP CLIENT
│
│ stdio
▼
🧮 CALCULATOR MCP SERVER
│
┌────────────┼────────────┐
│ │ │
▼ ▼ ▼
➕ add ➖ subtract ✖️ multiply
│ │ │
└────────────┼────────────┘
│
┌─────┴─────┐
▼ ▼
➗ divide 🔢 power
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.