mcp_server_client_example
If you are the rightful owner of mcp_server_client_example and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This document provides an example of setting up a Model Context Protocol (MCP) client and server using Python.
The Model Context Protocol (MCP) server is designed to facilitate communication between clients and servers using a structured protocol. It is particularly useful for applications that require interaction with AI models, such as those provided by Anthropic's Claude AI. The example provided includes a simple weather service implementation, demonstrating how to set up both a client and server using Python. The server is implemented in `weather_server.py`, while the client example is in `client_example.py`. The setup requires Python 3.12 or higher and uses the 'uv' package manager for environment management and dependency installation. The project also requires an Anthropic API key, which should be configured in a `.env` file.
Features
- Python 3.12 compatibility
- Environment management with 'uv'
- Weather service endpoints
- Integration with Claude AI
- Structured protocol communication