JUHE API Marketplace
Rafaysherwani avatar
MCP Server

Weather Alert & Forecast MCP Tool

A lightweight microservice that fetches weather alerts and forecasts from the National Weather Service API, providing U.S. state-level alerts and location-based forecasts.

0
GitHub Stars
11/17/2025
Last Updated
No Configuration
Please check the documentation below.
  1. Home
  2. MCP Servers
  3. MCP

README Documentation

mcp_AI

🌤️ Weather Alert & Forecast MCP Tool

A lightweight microservice using FastMCP that fetches weather alerts and forecasts from the National Weather Service API. This tool provides U.S. state-level alerts and location-based forecasts.


🚀 Features

  • Get Active Alerts: Fetch active weather alerts for any U.S. state using its two-letter abbreviation.
  • Get Forecast: Retrieve the upcoming weather forecast for a specific latitude and longitude.
  • Asynchronous Requests: Efficient use of httpx for non-blocking API calls.
  • Formatted Output: Readable string output ideal for chatbot integration or quick CLI access.

👷️ Installation

pip install httpx
pip install mcp  # Or your local FastMCP package

📦 Usage

Make sure you have Python 3.9+ and mcp installed.

python weather.py

The MCP server will start and listen for commands using the stdio transport.


🧰 Available Tools

get_alerts(state: str)

Fetch active weather alerts for a U.S. state.

Arguments:

  • state: Two-letter state code (e.g., CA, TX, NY)

Returns:
A formatted string of current alerts or a message if none are available.


get_forecast(latitude: float, longitude: float)

Fetch a detailed forecast for a specific location.

Arguments:

  • latitude: Latitude of the location (e.g., 37.7749)
  • longitude: Longitude of the location (e.g., -122.4194)

Returns:
Up to 5 periods of detailed forecast data (e.g., "Tonight", "Monday").


🧪 Example Output

Alert Example:

Event: Flood Warning  
Area: San Joaquin County  
Severity: Moderate  
Description: Flooding is expected in low-lying areas...  
Instructions: Turn around, don’t drown...

Forecast Example:

Tonight:
Temperature: 54°F
Wind: 10 mph NW
Forecast: Clear skies with calm wind.

---
Monday:
Temperature: 68°F
Wind: 5 to 10 mph W
Forecast: Sunny and warm.

📟 License

This project is licensed under the MIT License.

Quick Actions

View on GitHubView All Servers

Key Features

Model Context Protocol
Secure Communication
Real-time Updates
Open Source

Boost your projects with Wisdom Gate LLM API

Supporting GPT-5, Claude-4, DeepSeek v3, Gemini and more.

Enjoy a free trial and save 20%+ compared to official pricing.

Learn More
JUHE API Marketplace

Accelerate development, innovate faster, and transform your business with our comprehensive API ecosystem.

JUHE API VS

  • vs. RapidAPI
  • vs. API Layer
  • API Platforms 2025
  • API Marketplaces 2025
  • Best Alternatives to RapidAPI

For Developers

  • Console
  • Collections
  • Documentation
  • MCP Servers
  • Free APIs
  • Temp Mail Demo

Product

  • Browse APIs
  • Suggest an API
  • Wisdom Gate LLM
  • Global SMS Messaging
  • Temp Mail API

Company

  • What's New
  • Welcome
  • About Us
  • Contact Support
  • Terms of Service
  • Privacy Policy
Featured on Startup FameFeatured on Twelve ToolsFazier badgeJuheAPI Marketplace - Connect smarter, beyond APIs | Product Huntai tools code.marketDang.ai
Copyright © 2025 - All rights reserved