MCP Add Server
MCP サーバーの追加
シンプルなadd(a, b)ツールを提供する、最小限のモデルコンテキストプロトコル(MCP)サーバー。このプロジェクトは、MCPサーバーの実装の基本的な例として機能します。
特徴
モデルコンテキストプロトコルに準拠したサーバーを実装します。
2 つの数値の合計を返す単一のツール
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これは、 package.jsonで定義されたstartスクリプトを使用します。
3. グローバルインストール(頻繁な使用または開発用):
パッケージをグローバルにインストールできます。
npm install -g . # From the cloned repository directory
# or once published to npm:
# npm install -g mcp-add-serverその後、任意のディレクトリから実行できます。
mcp-add-server**4. 開発のためのローカルリンク:**プロジェクトのルートディレクトリで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 「エラー: テストが指定されていません」を出力します。テストが追加されたら、 package.jsonのtestスクリプトを更新してください。)
プロジェクト構造
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