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

Возможности
Сервер предоставляет следующие инструменты:
Инструмент | Описание | Аргументы |
| Складывает два числа |
|
| Вычитает второе число из первого |
|
| Умножает два числа |
|
| Делит первое число на второе |
|
Все аргументы должны быть числами. div возвращает ошибку, когда op2 равен 0.
Related MCP server: Simple Calculator MCP
Требования
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— сценарии и зависимости
This server cannot be deployed
Maintenance
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.
Precision math engine for AI agents. 203 exact methods. Zero hallucination.
A Model Context Protocol server for Wix AI tools
Related MCP Servers
- FlicenseCqualityDmaintenanceA server that provides tools for performing basic arithmetic operations (addition, subtraction, multiplication, division) via the Model Context Protocol.4-
- FlicenseAqualityDmaintenanceProvides basic mathematical operations including addition, subtraction, multiplication, division, and power calculations through a Model Context Protocol interface.51-
- FlicenseNot gradedqualityDmaintenanceProvides file reading and mathematical calculation tools through the Model Context Protocol. Enables reading file contents and evaluating mathematical expressions via stdio transport.-
- FlicenseNot gradedqualityDmaintenanceProvides basic arithmetic operations (add, multiply, divide) for AI assistants through the Model Context Protocol.-