MCP Calculator Service
Служба калькулятора MCP
Реализация протокола «модель-контекст-протокол» (MCP) для службы калькулятора, которая использует Claude AI для обработки запросов на естественном языке и выполнения математических вычислений.
Архитектура
Услуга состоит из трех основных компонентов:
API калькулятора (
calculator-api.js): обрабатывает основные математические операции.MCP Server (
mcp-server.js): управляет интеграцией LLM и оркестровкой инструментовКлиент MCP (
mcp-client.js): предоставляет пользовательский интерфейс для взаимодействия со службой.
Related MCP server: Calculator MCP
Настраивать
Установить зависимости:
npm installСоздайте файл
.envв корневом каталоге со следующими переменными:
ANTHROPIC_API_KEY=your_api_key_here
PORT=3000
MCP_PORT=3001Запуск службы
Вы можете запустить все компоненты одновременно:
npm startИли запустите их по отдельности:
# Calculator API
npm run start:calculator
# MCP Server
npm run start:mcp
# MCP Client
npm run start:clientИспользование
После запуска сервиса вы можете взаимодействовать с ним через клиентский интерфейс. Вот несколько примеров команд:
«Сложи 5 и 3»
«Сколько будет 10 плюс 20?»
«Рассчитать 7,5 + 2,25»
«Умножь 4 на 6»
«Сколько будет 8 умножить на 3?»
Введите «help» для получения дополнительных примеров или «exit» для выхода.
Конечные точки API
API калькулятора (порт 3000)
POST /:operation- Выполнение математических операций (сложение, вычитание, умножение, деление, возведение в степень)GET /health— конечная точка проверки работоспособности
MCP-сервер (порт 3001)
GET /tools— список доступных инструментовPOST /execute/:toolId— Выполнить определенный инструментPOST /agent— Обработка запросов на естественном языкеGET /health— конечная точка проверки работоспособности
Обработка ошибок
Услуга включает в себя комплексную обработку ошибок для:
Недопустимые математические операции
Деление на ноль
Недопустимые типы параметров
Ошибки анализа ответа LLM
Ошибки сети
Зависимости
@anthropic-ai/sdk: ^0.51.0
аксиос: ^1.6.7
парсер тела: ^1.20.2
корс: ^2.8.5
dotenv: ^16.4.5
экспресс: ^4.18.3
одновременно: ^8.2.2 (зависимость от разработки)
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Connect Claude AI to UluP Spaces via MCP — create projects, nodes, and tasks with OAuth 2.0.
Claude makes real phone calls for you — in many languages, with transcript and outcome back in chat.
Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.
Related MCP Servers
- AlicenseAqualityCmaintenanceA Model Context Protocol server that provides basic mathematical and statistical functions to LLMs, enabling them to perform accurate numerical calculations through a simple API.1337174MIT
- AlicenseBqualityCmaintenanceA Model Context Protocol server that provides basic calculator functionality for LLMs, enabling them to perform mathematical operations like addition, subtraction, multiplication, division, modulo, and square root.630416MIT
- AlicenseNot gradedqualityDmaintenanceA backend service that provides accurate arithmetic calculation capabilities to AI models via the Model Context Protocol, allowing LLMs to offload mathematical computations for numerical queries.1MIT
- AlicenseBqualityDmaintenanceA simple Model Context Protocol (MCP) server that provides basic calculation functions to Claude. It enables users to perform mathematical operations like addition directly through natural language commands.1MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/amandhunna/mcpserver'
If you have feedback or need assistance with the MCP directory API, please join our Discord server