MCP Client Example ☀️
@RGGH
MCP Client Example ☀️ について
Python MCP client + server example
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"mcp-client-x": {
"command": "uv",
"args": [
"run",
"src/client/mcp_client.py"
]
}
}
}ツール
ツールは検出されませんでした
ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。
概要
What is MCP Client Example ☀️?
MCP Client Example ☀️ is a demonstrative client-server implementation using the Model Context Protocol (MCP). It shows how to connect a large language model with custom tools and data, intended for developers learning MCP.
How to use MCP Client Example ☀️?
Install dependencies with uv install -e ., then run the client with uv run src/client/mcp_client.py. The client automatically starts the server over stdio, lists available tools, and calls them with sample data.
Key features of MCP Client Example ☀️
- Exposes two tools:
calculate_bmiandfetch_weather - Client connects to server via stdio transport
- Demonstrates synchronous and asynchronous tool calls
- Can be tested with the MCP Inspector
- Built with Python 3.9+ and the MCP Python SDK
Use cases of MCP Client Example ☀️
- Learning how to implement MCP servers and clients
- Prototyping custom tools for LLM integration
- Testing MCP tool definitions and responses
- Building a reference for async tool patterns
FAQ from MCP Client Example ☀️
What is MCP?
Model Context Protocol is a standardized way to connect large language models with tools and data.
What are the prerequisites to run the example?
Python 3.9+ and the uv Python package manager are required.
How do I start the client and server?
Run uv run src/client/mcp_client.py from the project root; the client launches the server automatically.
What tools does the server provide?
The server exposes calculate_bmi (computes Body Mass Index) and fetch_weather (retrieves weather data from an external API).
How can I test the server with MCP Inspector?
Run mcp dev src/server/example_server.py and visit http://localhost:5173 in a browser.
「その他」の他のコンテンツ
MaxKB
1Panel-dev🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。
🚀 Model Context Protocol (MCP) Curriculum for Beginners
microsoftThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable,
ICSS
chokcoco不止于 CSS
Inbox Zero AI
elie222The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
XcodeBuildMCP
cameroncookeA Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
コメント