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-serveradd 5 and 3"
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.
Calculator MCP Server
A Model Context Protocol server exposing calculator operations, built as a learning project.
Tools
add(a, b)
subtract(a, b)
multiply(a, b)
divide(a, b)
power(base, exponent)
square_root(number)
modulus(a, b)
Related MCP server: Calculator MCP
Run
uv run mcp dev src/calculator_mcp/server.pyTest
uv run pytest tests/ -vArchitecture
operations.py— pure calculator logic, no MCP dependencyserver.py— FastMCP tool registration, thin wrappers over operations.pyexceptions.py— custom exception hierarchy (CalculatorError base)tests/— pytest unit tests, independent of the MCP layer
Connect to Claude Desktop
Add this to claude_desktop_config.json:
{
"mcpServers": {
"calculator": {
"command": "uv",
"args": ["run", "--directory", "/path/to/calculator-mcp-server", "mcp", "run", "src/calculator_mcp/server.py"]
}
}
}This structure generalizes to any MCP server: keep domain logic separate from protocol code, use typed exceptions per failure mode, annotate tools honestly (readOnly/idempotent/destructive/openWorld), and test the logic layer without needing a live server.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/Amankhan1009/calculator-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server