MCP.so
ログイン

MCP サーバー/クライアント サンプル

@ykitaza

基本情報

カテゴリ

その他

トランスポート

stdio

作者

ykitaza

MCP サーバー/クライアント サンプル について

概要はまだありません

MCP サーバー/クライアント サンプル の設定

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

{
  "mcpServers": {
    "mcp-server-client-example": {
      "command": "bun",
      "args": [
        "run",
        "chat"
      ]
    }
  }
}

MCP サーバー/クライアント サンプル のツール

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

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

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

概要

What is MCP サーバー/クライアント サンプル?

MCP サーバー/クライアント サンプル is a minimal sample project that implements a Model Context Protocol (MCP) server and client. It provides a numeric comparison tool, a chat interface powered by Google Gemini, and demonstrates how to build and test MCP servers independently of specific hosted clients.

How to use MCP サーバー/クライアント サンプル?

Set up the project with Bun (v1.0.0+), run bun install, copy .env.example to .env, and add your Gemini API key. Create a server-config.json file with the absolute path to the server script, then start the chat CLI with bun run chat.

Key features of MCP サーバー/クライアント サンプル

  • Numeric comparison tool (e.g., 9.11 vs 9.9)
  • MCP server with tool registration and execution
  • MCP client with bidirectional communication
  • Config-based connection management (server-config.json)
  • Chat CLI using Google Gemini API
  • Error handling and retry logic

Use cases of MCP サーバー/クライアント サンプル

  • Learning MCP fundamentals through a minimal implementation
  • Testing MCP tool integration without paid APIs (free Gemini tier)
  • Demonstrating how to build a custom MCP server
  • Solving common AI comparison errors with a dedicated tool

よくある質問

1

What runtime is required?

Bun v1.0.0 or higher.

2

Does this sample depend on a specific MCP client?

No. It includes its own MCP client and can also work with clients like Claude Desktop App, Cline, or Cursor via the server config.

3

What do I need to run the chat CLI?

A Gemini API key from Google Cloud Console, set in the `.env` file.

4

Where are server settings stored?

In `server-config.json` (command, args, timeout, etc.) and `.env` for the API key.

5

What transport does the MCP server use?

The server is launched as a child process using the command and arguments defined in `server-config.json` (local stdio-based communication).

コメント

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