Wraps basic mathematical expression evaluation in an MCP server with a single calculate tool that takes string expressions and returns computed results. You'd reach for this when you need Claude to handle precise numerical calculations beyond its built-in math capabilities, like complex formulas, financial calculations, or scientific computations where accuracy matters. The server evaluates standard mathematical expressions including arithmetic operations, parentheses, and common functions. Simple to set up with either uv or pip, and integrates cleanly into any MCP-compatible client through standard JSON configuration.
A Model Context Protocol server for calculating. This server enables LLMs to use calculator for precise numerical calculations.
calculate - Calculates/evaluates the given expression.
expression (string, required): Expression to be calculatedWhen using uv no specific installation is needed. We will
use uvx to directly run mcp-server-calculator.
curl -LsSf https://astral.sh/uv/install.sh | sh
Alternatively you can install mcp-server-calculator via pip:
pip install mcp-server-calculator
After installation, you can run it as a script using:
python -m mcp_server_calculator
Add this to your MCP client settings:
"mcpServers": {
"calculator": {
"command": "uvx",
"args": ["mcp-server-calculator"]
}
}
Alternatively add this to your MCP client settings:
"mcpServers": {
"calculator": {
"command": "python",
"args": ["-m", "mcp_server_calculator"]
}
}
mcp-server-calculator is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.