A Model Context Protocol (MCP) server designed to enable precise numerical calculations for Large Language Models (LLMs). This server provides a calculate
tool that evaluates mathematical expressions, making it a valuable addition for applications requiring accurate computations.
The Calculator MCP Server is a lightweight Python-based server that integrates with MCP clients to perform mathematical calculations. It is particularly useful for LLMs that need to handle complex numerical tasks with precision.
calculate
expression
(string, required): The mathematical expression to be calculated.To install and run the Calculator MCP Server using uv
, follow these steps:
curl -LsSf https://astral.sh/uv/install.sh | sh
Alternatively, you can install the server via pip:
pip install mcp-server-calculator
After installation, run the server using:
python -m mcp_server_calculator
Add the following configuration to your MCP client settings:
"mcpServers": {
"calculator": {
"command": "uvx",
"args": ["mcp-server-calculator"]
}
}
For pip installations, use this configuration:
"mcpServers": {
"calculator": {
"command": "python",
"args": ["-m", "mcp_server_calculator"]
}
}
The Calculator MCP Server is licensed under the MIT License. This allows you to freely use, modify, and distribute the software, provided you comply with the terms of the license. For more details, refer to the LICENSE file in the repository.
This project is a Model Context Protocol server specifically designed for performing calculations. It is maintained by githejie and is open-source under the MIT License.