MCP サーバー/クライアント サンプル
@ykitaza
MCP サーバー/クライアント サンプル について
概要はまだありません
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"mcp-server-client-example": {
"command": "bun",
"args": [
"run",
"chat"
]
}
}
}ツール
ツールは検出されませんでした
ツールは 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
FAQ from MCP サーバー/クライアント サンプル
What runtime is required?
Bun v1.0.0 or higher.
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.
What do I need to run the chat CLI?
A Gemini API key from Google Cloud Console, set in the .env file.
Where are server settings stored?
In server-config.json (command, args, timeout, etc.) and .env for the API key.
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).
「その他」の他のコンテンツ
Mcp
browsermcpBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser

Sequential Thinking
modelcontextprotocolModel Context Protocol Servers
MCP Toolbox for Databases
googleapisMCP Toolbox for Databases is an open source MCP server for databases.
Awesome-MCP-ZH
yzflyMCP 资源精选, MCP指南,Claude MCP,MCP Servers, MCP Clients
Servers
modelcontextprotocolModel Context Protocol Servers
コメント