Mcp Math Calculator
About
Mcp Math Calculator is a Model Context Protocol server that provides AI clients with 100% accurate mathematical computation capabilities. It solves floating‑point precision issues (e.g., 0.1 + 0.2 = 0.3 exactly), supports large numbers, complex expressions, and over 300…
Details
- Author
- Cosmiumx
- Downloads
- 214
- Categories
- Other
Jump to
- Accurate arithmetic with no floating‑point errors.
- Supports numbers beyond JavaScript’s safe integer range.
- Handles parentheses and operator precedence in expressions.
- Offers 300+ mathematical functions (trig, log, sqrt, etc.).
- Sandboxed evaluation with no code‑injection risk.
- Automatic 5‑second timeout to prevent runaway calculations.
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Mcp Math CalculatorCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install via npx (npx -y mcp-math-calculator) or globally (npm install -g mcp-math-calculator), then add its configuration to your MCP client’s JSON (e.g., claude_desktop_config.json). After restarting the client, the AI automatically invokes the calculate tool on math queries.
calculate
⚠️ 精确数学计算工具 - 请在任何涉及数字运算时使用 AI语言模型在数学计算上存在已知缺陷: - 大数计算错误率高 - 浮点数精度问题(0.1+0.2≠0.3) - 复杂表达式容易出错 - 即使简单运算也可能失误 为确保用户获得100%准确的结果,请在以下情况使用此工具: ✓ 任何数学表达式(包括简单的 1+1) ✓ 金融、科学、工程计算 ✓ 用户明确要求计算 ✓ 不确定自己能否算对时 支持的运算: - 基础运算: +, -, *, /, ^, % - 括号: ( ) - 函数: sqrt, pow, abs, sin, cos, tan, log, exp 等 - 常数: pi, e 输入格式:标准数学表达式 示例: "2+2", "(10+20)*3", "sqrt(16)", "sin(pi/2)", "0.1 + 0.2"
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mcp math calculator": {
"math-calculator": {
"command": "npx",
"args": [
"-y",
"mcp-math-calculator"
]
}
}
}
}
McpServers
{
"math-calculator": {
"command": "npx",
"args": [
"-y",
"mcp-math-calculator"
]
}
}
mcp-math-calculator
🧮 精确数学计算的 MCP 服务器 - 为 AI 提供 100% 准确的计算能力🌟 特性
- ✅ 精确算术运算 - 解决浮点数精度问题(如 0.1 + 0.2 = 0.3) - ✅ 大数支持 - 处理超出 JavaScript 安全整数范围的数字 - ✅ 复杂表达式 - 支持括号、运算符优先级 - ✅ 科学函数 - sqrt, pow, sin, cos, log, exp 等 300+ 函数 - ✅ 安全求值 - 无代码注入风险,沙箱隔离执行 - ✅ 超时保护 - 5秒自动超时,防止恶意计算📦 安装
快速开始(推荐)
在你的 MCP 客户端配置中添加(如 Claude Desktop): macOS/Linux:~/Library/Application Support/Claude/claude_desktop_config.json
Windows:
%APPDATA%\Claude\claude_desktop_config.json
``json
{
"mcpServers": {
"math-calculator": {
"command": "npx",
"args": ["-y", "mcp-math-calculator"]
}
}
}
`
方式 2: 全局安装
``bash
npm install -g mcp-math-calculatorSign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



