MCP.so
ログイン

MCP サーバーサンプル

@ykitaza

基本情報

カテゴリ

その他

トランスポート

stdio

作者

ykitaza

MCP サーバーサンプル について

概要はまだありません

#mcp#server#number-comparison

MCP サーバーサンプル の設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "mcp-server-example-ykitaza": {
      "command": "bun",
      "args": [
        "build"
      ]
    }
  }
}

MCP サーバーサンプル のツール

ツール一覧はまだありません

この掲載には表示できるツール一覧がまだありません。サーバーにツールがないという意味ではありません。対応機能はプロジェクトのドキュメントをご確認ください。

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

What is MCP サーバーサンプル?

MCP サーバーサンプル is a sample implementation of a Model Context Protocol (MCP) server that provides a number comparison tool. It is designed for developers and users of MCP‑compatible clients (such as Claude Desktop App, Cline, or Cursor) who need a reference for building or using MCP servers.

How to use MCP サーバーサンプル?

Install dependencies with bun install, build the project with bun build, then configure your MCP client to point to the server using an absolute path to src/index.ts. Once configured, invoke the compare-numbers tool via the client to compare two numbers.

Key features of MCP サーバーサンプル

  • Provides a compare-numbers tool that returns the larger of two numbers.
  • Runs on the Bun runtime (v1.0.0+).
  • Fully compatible with MCP clients like Claude Desktop, Cline, and Cursor.
  • Configuration uses absolute paths and supports auto‑approve settings.
  • Easily extensible: custom tools can be added by creating new files and registering them.
  • Serves as a reusable sample for developers building their own MCP servers.

Use cases of MCP サーバーサンプル

  • Learning how to implement a basic MCP server step by step.
  • Verifying AI‑generated calculations by comparing numbers with a reliable tool.
  • Prototyping new MCP tools by extending the sample server with custom logic.
  • Testing MCP client configurations and auto‑approve workflows.

よくある質問

1

What runtime does MCP サーバーサンプル require?

The server requires Bun runtime version 1.0.0 or higher.

2

Which clients can connect to MCP サーバーサンプル?

It works with any MCP‑compatible client, including Claude Desktop App, Cline, and Cursor.

3

How do I add a custom tool to MCP サーバーサンプル?

Create a new tool implementation file in `server/src/tools/`, then register it in `server/src/index.ts` using the `server.tool()` method with Zod parameters and a handler function.

4

How do I configure the server for my MCP client?

Edit the client’s MCP configuration to include a server entry with `command` set to `"bun"`, `args` set to `["run", "/absolute/path/to/server/src/index.ts"]`, and optional settings like `disabled` and `autoApprove`.

5

Where does the server store data or logs?

The README does not mention any persistent data storage or logging; the server appears stateless with no external database.

コメント

「その他」の他のコンテンツ