MCP Client & Server Example
by xiaoye-hua
This project provides a simple client and server example using the Model Context Protocol (MCP). It includes a weather service implementation and an interactive client with Claude AI integration.
Last updated: N/A
What is MCP Client & Server Example?
This is an example implementation of a client and server using the Model Context Protocol (MCP). It showcases a weather service with endpoints and an interactive client that integrates with Claude AI.
How to use MCP Client & Server Example?
To use this example, clone the repository, install uv, create and activate a virtual environment, install dependencies using uv, configure the .env file with your Anthropic API key, and then run the server (weather_server.py) and client (client_example.py).
Key features of MCP Client & Server Example
Simple client and server implementation
Weather service endpoints
Interactive client with Claude AI integration
Uses Model Context Protocol (MCP)
Example implementation using National Weather Service API
Use cases of MCP Client & Server Example
Demonstrating MCP client-server communication
Building a weather service application
Integrating with Claude AI
Learning about Python virtual environments with uv
Creating interactive AI applications
FAQ from MCP Client & Server Example
What is MCP?
What is MCP?
The Model Context Protocol (MCP) is a protocol for communication between clients and servers.
What is uv?
What is uv?
uv is a Python package installer and environment manager.
How do I set up the .env file?
How do I set up the .env file?
Copy the .env.example file to .env and fill in your Anthropic API key.
What is the weather_server.py file?
What is the weather_server.py file?
It is the MCP server implementation with weather service endpoints.
What is the client_example.py file?
What is the client_example.py file?
It is an interactive client with Claude AI integration.