Calculator MCP Server
Calculator MCP Server
Небольшой сервер Model Context Protocol (MCP), который предоставляет базовые операции калькулятора через stdio.

Возможности
Сервер предоставляет следующие инструменты:
Инструмент | Описание | Аргументы |
| Складывает два числа |
|
| Вычитает второе число из первого |
|
| Умножает два числа |
|
| Делит первое число на второе |
|
Все аргументы должны быть числами. div возвращает ошибку, когда op2 равен 0.
Related MCP server: My Tools MCP Server
Требования
Node.js 18 или новее
npm
Установка
Установите зависимости из этого каталога:
npm installЗапуск сервера
Запустите MCP-сервер через stdio:
npm startСервер ожидает подключения MCP-клиента, поэтому он не выводит обычные результаты работы приложения в терминал.
Тестирование с примером клиента
Пример клиента запускает сервер, выводит список его инструментов и вызывает div с числами 10 и 0, чтобы продемонстрировать ошибку деления на ноль:
npm run test-clientЧтобы проверить успешную операцию, измените аргументы callTool в файле mcp-client-test.ts, например:
arguments: { op1: 10, op2: 2 },Использование MCP Inspector
Запустите интерактивный MCP Inspector командой:
npm run mcp-inspectОткройте URL, выведенный командой, затем выберите инструмент калькулятора и укажите значения для op1 и op2.
Файлы проекта
mcp-server.ts— определения MCP-сервера и инструментов калькулятораmcp-client-test.ts— пример MCP-клиентаmcp-calculator.gif— видеопрохождение учебного пособияpackage.json— сценарии и зависимости
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Model Context Protocol server for Studex tools, notifications, and profile integrations
Deterministic liquidity and leverage ratio tools for AI agents — current, quick and cash ratios, defensive interval, debt-to-equity, debt-to-assets, equity multiplier and interest coverage via Model Context Protocol. Useful for corporate finance, credit analysis, financial analysis, financial formulas and financial modeling.
A Model Context Protocol server for Wix AI tools
AI-callable calculators and engineering models with real formulas. No hallucinated math.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides basic mathematical operations including addition, subtraction, multiplication, division, and power calculations through a Model Context Protocol interface.51MIT
- AlicenseNot gradedqualityDmaintenanceProvides file reading and mathematical calculation tools through the Model Context Protocol. Enables reading file contents and evaluating mathematical expressions via stdio transport.ISC
- AlicenseNot gradedqualityDmaintenanceProvides basic arithmetic operations (add, multiply, divide) for AI assistants through the Model Context Protocol.ISC
- FlicenseAqualityDmaintenanceExposes basic calculator operations (add, subtract, multiply, divide, power, square root, modulus) through the Model Context Protocol.7-