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 服务器
Servers
modelcontextprotocolModel Context Protocol Servers
Mcp
browsermcpBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
Activepieces
activepiecesAI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
ICSS
chokcoco不止于 CSS

Sequential Thinking
modelcontextprotocolModel Context Protocol Servers
评论