
MCP Weather Alert Agent
A lightweight AI agent that fetches real-time weather alerts for any U.S. state using the National Weather Service API.
README
🌦️ MCP Weather Alert Agent
A lightweight AI agent powered by MCP (Modular Connector Protocol) that fetches real-time weather alerts for any U.S. state using the National Weather Service API.
✨ Features
- 🤖 AI Chat Interface - Interactive conversation with memory
- 🌪️ Real-time Weather Alerts - Live data from National Weather Service
- ⚡ Fast Inference - Powered by Groq LLM via LangChain
- 🔧 MCP Integration - Built with
mcp
,mcp-use
, andFastMCP
- 🛠️ Tool-based Architecture - Structured function calling
🎯 Quick Example
💬 User: "Provide me weather alerts for California"
🤖 Agent: Calling get_alerts("CA")...
🌦️ Result: "FLOOD WARNING for Central Valley until 6 PM PST..."
🚀 Getting Started
Prerequisites
- Python 3.8+
- Groq API key (Get one here)
Installation
-
Clone the repository
git clone https://github.com/MokshadaRaibagkar/mcp-weather-alert-agent.git cd mcp-weather-alert-agent
-
Create virtual environment
python -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables
cp .env # Edit .env and add your GROQ_API_KEY
🛠️ Usage
Option 1: Interactive Chat Agent
uv run server/client.py
Option 2: MCP Dev Server (for testing)
uv run mcp dev server/weather.py
Opens MCP Inspector for tool testing and debugging.
Option 3: MCP Inspector (Visual Interface)
uv run mcp dev server/weather.py
🔧 API Reference
get_alerts(state: str) -> str
Fetches active weather alerts for a U.S. state.
Parameters:
state
(str): Two-letter state code (e.g., "CA", "TX", "NY")
Returns:
- Formatted string with current weather alerts or "No active alerts"
Example:
result = get_alerts("FL")
# Returns: "HURRICANE WARNING for Miami-Dade County..."
🧪 Example Interactions
Weather Alert Agent initialized! Ask me about weather alerts.
💬 You: What are the current weather alerts for Texas?
🛠️ Calling get_alerts with state: TX
🌦️ Current alerts for Texas:
- TORNADO WATCH for East Texas until 10 PM CDT
- FLASH FLOOD WARNING for Austin area until midnight
💬 You: Any alerts in California?
🛠️ Calling get_alerts with state: CA
✅ No active weather alerts for California at this time.
🌐 Tech Stack
Component | Technology |
---|---|
MCP Framework | MCP Protocol |
LLM | Groq |
Agent Framework | LangChain |
Weather API | National Weather Service |
Development | FastMCP |
🤝 Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
👩💻 Author
Mokshada Raibagkar
<div align="center">
⭐ Star this repo if it helped you!
Made with ❤️ and ☕
</div>
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.