Skip to content

Repository files navigation

Weather Agent

A comprehensive weather MCP server with US alerts and global weather data.

Features

  • US Weather Alerts: Get active weather alerts for any US state using NWS API (free, no API key needed).
  • Global Current Weather & Alerts: Get current weather and alerts for any city worldwide using OpenWeatherMap API (free API key required).

Setup

After cloning, run the following commands:

git clone <repo-url>
cd mcp_server_weather_agent
uv sync

If uv is not installed, install it first:

python -m pip install uv

OpenWeatherMap API key

The global weather tool uses OpenWeatherMap and requires a free API key for detailed weather and alerts.

Create a .env file in the project root with:

OPENWEATHER_API_KEY=your_api_key_here

Alternatively, set the variable directly in your shell:

export OPENWEATHER_API_KEY=your_api_key_here

Get your free key at OpenWeatherMap API.

Running

Start the weather chat client:

uv run server/client.py

This launches the interactive MCP chat client and connects to the weather server.

Usage Examples

  • "Get weather alerts for CA" (US state alerts)
  • "What's the weather in Mumbai?" (global weather)
  • "Weather in London" (global weather)

Both tools work simultaneously!

Sample Output Screenshot

Weather Agent Example

INFO

About

This is MCP server that demonstrates the weather AI agents

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages