Calculator MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Calculator MCP ServerWhat is 1234 * 5678?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
My First MCP Server — Setup Journey
A step-by-step log of building and connecting my first Model Context Protocol server to Claude Desktop, using the official Python SDK. This README documents exactly what was done, in order, including the issues hit along the way.
Built on: macOS Monterey 12.7.6, Intel i5, 8GB RAM (2015 MacBook Pro).
What is MCP
MCP lets an app like Claude Desktop call out to a local program (a "server") for tools and live data, instead of relying only on the model's built-in knowledge. This project builds a simple calculator server and connects it to Claude Desktop as a working example.
SDK used: modelcontextprotocol/python-sdk
Related MCP server: Calculator MCP Server
Steps followed
1. Install uv (Python package/project manager)
uv wasn't installed, so:
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env
uv --version2. Create the project
mkdir mcp-test && cd mcp-test
uv init
uv add "mcp[cli]"Issue hit: uv init defaulted requires-python to >=3.14, a version with no prebuilt wheel for the cryptography dependency — uv add sat compiling it from source for a very long time.
Fix: pin the project to a more compatible Python version:
sed -i '' 's/requires-python = ">=3.14"/requires-python = ">=3.10"/' pyproject.toml
rm -rf .venv
uv venv --python 3.12
uv add "mcp[cli]"This installed cleanly using a prebuilt wheel.
3. Write the server
Created calculator_server.py using mcp.server.MCPServer, exposing calculator functions as tools (add, subtract, multiply, divide, power, square_root, percentage) and a small in-memory calculation log as a resource (history://recent), so tool calls and resource reads could both be demonstrated.
4. Test locally with the MCP Inspector
uv run mcp dev calculator_server.pyIssue hit: npx not found — the Inspector needs Node.js, which wasn't installed.
Fix: installed Node via nvm (chosen over Homebrew, since Homebrew's latest Node bottle isn't well supported on macOS Monterey and risked a slow/failing source build):
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.zshrc
nvm install 20
nvm use 20Reran uv run mcp dev calculator_server.py — it started the Inspector proxy and printed a local URL with an auth token. Opened that URL in the browser and confirmed:
Tools tab → called
multiply(6, 7)→ got42Resources tab → opened
history://recent→ saw the call logged
5. Connect the server to Claude Desktop
In Claude Desktop: Settings → Developer → Local MCP servers → Edit Config.
Issue hit: manually opening claude_desktop_config.json via terminal initially showed an unrelated app-preferences file, not the MCP config — resolved by using the in-app Edit Config button instead of guessing the file path, since it opens the correct file for the installed build.
Added:
{
"mcpServers": {
"calculator": {
"command": "/Users/<you>/.local/bin/uv",
"args": [
"--directory",
"/Users/<you>/Documents/mcp-test",
"run",
"calculator_server.py"
]
}
}
}Used the full path to uv (from which uv) since Claude Desktop's process doesn't inherit the terminal shell's PATH.
6. Verify it's actually working
In Settings → Developer, the calculator server showed status running.
In a chat, confirmed the calculator toggle was on under the "+" → connectors menu, then asked Claude a question it could only answer using the tool's live state:
"What's in my calculator history?"
First attempt returned no history — because the earlier questions asked ("what's 84 divided by 12") were simple enough that Claude just computed them mentally instead of calling the tool. Asking more explicitly:
"Use the calculator tool for 84 divided by 12, and 15% of 200."
produced a response tagged "used calculator integration" in the UI — confirming the tool call was real, not just model math.
Result
A working local MCP server with 7 tools and 1 resource, connected to Claude Desktop, verified end-to-end via real tool invocation (not just Claude's own arithmetic).
Project structure
mcp-test/
├── calculator_server.py # the MCP server
├── pyproject.toml # project + dependency config (Python >=3.10)
├── uv.lock # locked dependency versions
└── README.md # this fileReference
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- -license-quality-maintenanceA calculator server that exposes mathematical functions as tools (add, subtract, multiply, divide, square, power, square root), enabling language models to perform calculations through Model Context Protocol (MCP).
- Alicense-qualityDmaintenanceA Python-based MCP server that provides a suite of basic arithmetic tools, including addition, square roots, and percentage calculations, for AI assistants. It enables models to perform precise mathematical operations through the Model Context Protocol.MIT
- AlicenseBqualityDmaintenanceA simple Model Context Protocol (MCP) server that provides basic calculation functions to Claude. It enables users to perform mathematical operations like addition directly through natural language commands.1MIT
- Flicense-qualityDmaintenanceA sample MCP server that provides basic arithmetic tools like addition, subtraction, multiplication, and division. It serves as a demonstration for implementing the Model Context Protocol and connecting custom tools to clients like Claude Desktop.
Related MCP Connectors
This MCP server enables users to perform scientific computations regarding linear algebra and vect…
Educational MCP server with 17 math/stats tools, visualizations, and persistent workspace
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kirthi0071/MCP-First-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server