Chatbot-using-MCP-server-and-MCP-client

kotappa19/Chatbot-using-MCP-server-and-MCP-client

3.2

If you are the rightful owner of Chatbot-using-MCP-server-and-MCP-client and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The MCP Weather Server and Client project provides a server-client architecture for accessing and processing weather data using the Model Context Protocol.

Tools
2
Resources
0
Prompts
0

MCP Weather Server and Client

This project contains both an MCP (Model Context Protocol) server and client for weather data.

Server

The server (server.py) provides weather-related tools:

  • get_alerts(state): Get weather alerts for a US state
  • get_forecast(latitude, longitude): Get weather forecast for a location

Client

The client (client.py) connects to the MCP server and uses Claude AI to process queries and execute tools.

Setup

  1. Install dependencies:
uv sync
  1. Create a .env file with your Anthropic API key:
ANTHROPIC_API_KEY=your_key_here

Running

  1. Start the server first:
uv run server.py
  1. In a separate terminal, run the client:
uv run client.py

The client will automatically connect to server.py in the same directory.