MCP Add Server
MCP Добавить сервер
Минимальный сервер Model Context Protocol (MCP), который предоставляет простой инструмент add(a, b) . Этот проект служит базовым примером реализации сервера MCP.
Функции
Реализует сервер, совместимый с протоколом контекста модели.
Предоставляет один инструмент:
add(a, b), который возвращает сумму двух чисел.
Related MCP server: Basic Math MCP Server
Предпосылки
Node.js (рекомендуется версия 18.xx или выше)
npm (входит в состав Node.js)
Установка
Клонируйте репозиторий:
git clone <你的仓库URL> # 当你推送到 GitHub 后,替换这里的 URL cd mcp-add-serverУстановите зависимости:
npm install
Использование
Существует несколько способов запуска mcp-add-server :
1. Использование npx (рекомендуется для большинства пользователей):
Если у вас установлены Node.js и npm, вы можете запустить сервер напрямую, без клонирования или глобальной установки:
npx mcp-add-serverЭта команда загрузит последнюю версию mcp-add-server (если она еще не кэширована) и выполнит ее.
2. Запуск из клонированного репозитория:
После клонирования репозитория и установки зависимостей (см. Установка ):
npm startПри этом используется start скрипт, определенный в package.json .
3. Глобальная установка (для частого использования или разработки):
Вы можете установить пакет глобально:
npm install -g . # From the cloned repository directory
# or once published to npm:
# npm install -g mcp-add-serverЗатем вы можете запустить его из любого каталога:
mcp-add-server4. Локальное связывание для разработки: В корневом каталоге проекта запустите npm link . Это сделает команду mcp-add-server доступной глобально, указав на ваши локальные файлы проекта.
# In project directory
npm link
# Then, in any directory:
mcp-add-serverПосле запуска сервера (независимо от используемого метода) он будет доступен клиентам MCP.
Пример вызова инструмента (концептуальный)
Клиент MCP может вызвать инструмент add следующим образом (конкретика зависит от реализации клиента):
{
"tool_name": "add",
"arguments": {
"a": 5,
"b": 3
}
}Сервер ответит:
{
"result": 8
}Проведение тестов
(Когда тесты будут добавлены, опишите здесь, как их запускать)
npm test(В настоящее время npm test выводит сообщение «Ошибка: тест не указан». Обновите test скрипт в package.json при добавлении тестов.)
Структура проекта
mcp-add-server/
├── .git/ # Git directory
├── .gitignore # Specifies intentionally untracked files that Git should ignore
├── .cursor/ # Cursor specific files (if any)
├── node_modules/ # Project dependencies
├── src/ # Source code
│ └── server.js # Main server logic
├── bin.js # Executable for the server
├── LICENSE # Project license
├── package-lock.json # Records exact versions of dependencies
├── package.json # Project metadata and dependencies
└── README.md # This fileВнося вклад
Вклады приветствуются! Не стесняйтесь отправлять запрос на включение или открывать проблему.
Лицензия
Данный проект лицензирован в соответствии с лицензией MIT .
Maintenance
Tools
- addD
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceA minimal example server implementing the Model Context Protocol, providing addition and multiplication tools for learning and experimentation with MCP clients.1
- FlicenseBqualityDmaintenanceA simple server that provides basic mathematical operations (sum and subtraction) through the Model Context Protocol.21
- AlicenseNot gradedqualityDmaintenanceA minimal, production-ready MCP server with a simple addition calculator tool that demonstrates integration with the Model Context Protocol.101MIT
- FlicenseBqualityNot gradedmaintenanceA minimal Model Context Protocol server that provides a simple tool for adding two integers. It serves as a demonstration of the official Python MCP SDK and is designed for local execution via stdio.1
Related MCP Connectors
A Model Context Protocol server for Wix AI tools
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server exposing the Backtest360 engine API as tools for AI agents.
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/zhangzhefang-github/mcp-add-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server