mcp -calculator
A Model Context Protocol server for calculating.
claude mcp add --transport stdio githejie-mcp-server-calculator uvx mcp-server-calculator
How to use
The Calculator MCP Server exposes a single tool named calculate, which lets your language models perform precise numerical calculations by evaluating expressions. This enables LLMs to offload arithmetic and complex expressions to a dedicated calculator service, reducing drift and improving numerical accuracy in responses. You interact with it by routing a calculator request through the MCP client using the server name calculator.
To use the tool, send a request containing an expression string under the expression parameter. The server will evaluate the expression and return the result. This is useful for computing sums, products, powers, parentheses expressions, and other mathematical operations within the model's context. Use it wherever you need deterministic numeric results during a chat session or a multi-step reasoning task.
How to install
Prerequisites:
- Python (3.8+)
- Optional: uv (for uvx usage) or pipx/virtual environments
Installation options:
- Using uv (recommended)
- Install uv as described by the project: curl -LsSf https://astral.sh/uv/install.sh | sh
- Run the server using uvx (no extra installation beyond uv): uvx mcp-server-calculator
- Using PIP
- Install the package via pip: pip install mcp-server-calculator
- Run the server as a module: python -m mcp_server_calculator
- Quick verification
- After installation, you should be able to access the calculator tool by configuring an MCP client to connect to the server with the provided commands below.
Additional notes
- The primary tool is calculate with a single required parameter: expression (string).
- If you deploy via uvx, the recommended configuration in MCP client should be: { "command": "uvx", "args": ["mcp-server-calculator"] }.
- If you deploy via Python, configuration should be: { "command": "python", "args": ["-m", "mcp_server_calculator"] }.
- Ensure the environment allows network access if you are integrating with remote LLM services.
- For debugging, check server logs for syntax errors in expressions or invalid inputs. Expressions follow standard arithmetic rules (parentheses, operators, etc.).
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP