
huhabla/calculator-mcp-server
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
haabla/calculator-mcp-server - кандидат на сервер MCP, импортированный из https://github.com/huhabla/calculator-mcp-server.
Обзор
haabla/calculator-mcp-server - кандидат на сервер MCP, импортированный из https://github.com/huhabla/calculator-mcp-server.
Обзор (машинный перевод)
Это сервер Model Context Protocol (MCP), который предоставляет Клоду расширенные возможности математического расчета, включая символическую математику, статистический анализ и матричные операции.
Особенности
Математический калькулятор MCP Сервер предоставляет следующие инструменты:
** Основные расчеты**: Безопасно оценивать математические выражения Символическая математика:
- Решать уравнения (линейные, квадратичные, многочленные и т.д.)
- Вычислить производные выражений
- Вычислительные интегралы выражений Статистический анализ:
- Средний, средний, режим
- Разница, стандартное отклонение
- коэффициент корреляции
- Линейная регрессия
- Доверительные интервалы Матричные операции: Добавление матрицы Умножение матрицы Переложение матрицы
##Установка
Предпосылки
Python 3.10+ (рекомендуется: Python 3.11+)
- uv (рекомендуется) или pip Приложение Claude Desktop (для использования сервера MCP с Claude)
Шаги установки
-
Клонировать хранилище:
-
(Вариант 1) Настройка с предоставленным сценарием:
(Вариант 2) Или вручную настроить виртуальную среду:
- Запускайте док-тесты, чтобы убедиться, что все работает:
Интеграция с Claude Desktop
Метод 1: Настройка в Claude Desktop
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
Mathematical Calculator MCP Server
This is a Model Context Protocol (MCP) server that provides Claude with advanced mathematical calculation capabilities, including symbolic math, statistical analysis, and matrix operations.
Features
The Mathematical Calculator MCP Server provides the following tools:
- Basic Calculations: Evaluate mathematical expressions safely
- Symbolic Mathematics:
- Solve equations (linear, quadratic, polynomial, etc.)
- Calculate derivatives of expressions
- Compute integrals of expressions
- Statistical Analysis:
- Mean, median, mode
- Variance, standard deviation
- Correlation coefficient
- Linear regression
- Confidence intervals
- Matrix Operations:
- Matrix addition
- Matrix multiplication
- Matrix transposition
Installation
Prerequisites
- Python 3.10+ (recommended: Python 3.11+)
- uv (recommended) or pip
- Claude Desktop app (to use the MCP server with Claude)
Installation Steps
-
Clone the repository:
git clone https://github.com/huhabla/calculator-mcp-server.git cd calculator-mcp-server -
(Option 1) Setup with the provided script:
chmod +x setup_venv.sh ./setup_venv.sh(Option 2) Or manually set up the virtual environment:
python3 -m venv venv source venv/bin/activate pip install -r requirements.txt -
Run doc-tests to verify everything works:
bash run_doctests.sh
Integration with Claude Desktop
Method 1: Configure in Claude Desktop
Add the server to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Add the following to the mcpServers section:
{
"mcpServers": {
"calculator": {
"command": "uvx",
"args": [
"--from",
"calculator-mcp-server@git+https://github.com/huhabla/calculator-mcp-server.git",
"--",
"calculator-mcp-server",
"--stdio"
]
}
}
}
Note: The --stdio flag is required for proper integration with Claude Desktop. The -- separates uvx arguments from the calculator server arguments.
Method 2: Install with FastMCP
-
Make sure you have uv installed (Installation Guide)
-
Install the MCP server in Claude Desktop:
fastmcp install calculator_server.pyOr with a custom name:
fastmcp install calculator_server.py --name "Math Calculator" -
Once installed, Claude will automatically have access to all the mathematical tools and functions.
Usage Examples
After integrating with Claude Desktop, you can ask Claude to perform various mathematical operations. Here are some examples:
Basic Calculations
Can you calculate 3.5^2 * sin(pi/4)?
Solving Equations
Установка
uvx --from calculator-mcp-server@git+https://github.com/huhabla/calculator-mcp-server.git -- calculator-mcp-server --stdioКонфигурация
{
"mcpServers": {
"calculator": {
"command": "uvx",
"args": [
"--from",
"calculator-mcp-server@git+https://github.com/huhabla/calculator-mcp-server.git",
"--",
"calculator-mcp-server",
"--stdio"
]
}
}
}