Skip to main content
Glama
zhangzhefang-github

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 に付属)

インストール

  1. リポジトリをクローンします。

    git clone <你的仓库URL> # 当你推送到 GitHub 后,替换这里的 URL
    cd mcp-add-server
  2. 依存関係をインストールします:

    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.jsontestスクリプトを更新してください。)

プロジェクト構造

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 ライセンスに基づいてライセンスされています。

Install Server
A
license - permissive license
D
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Tools

Related MCP Servers

  • F
    license
    B
    quality
    D
    maintenance
    A simple server that provides basic mathematical operations (sum and subtraction) through the Model Context Protocol.
    2
    1
  • A
    license
    Not graded
    quality
    D
    maintenance
    A minimal, production-ready MCP server with a simple addition calculator tool that demonstrates integration with the Model Context Protocol.
    10
    1
    MIT
  • F
    license
    B
    quality
    Not graded
    maintenance
    A 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

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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