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
📦 Usage
Make sure you have Python 3.9+ and mcp
installed.
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:
Forecast Example:
📟 License
This project is licensed under the MIT License.
This server cannot be installed
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.
Related MCP Servers
- -securityFlicense-qualityThis SSE-based MCP server allows users to connect and interact with National Weather Service APIs to retrieve weather alerts and forecasts.Last updated -90Python
- -securityFlicense-qualityThis is a Model Context Protocol (MCP) server that provides weather information using the National Weather Service (NWS) API. Features Get weather alerts for a US state Get weather forecast for a specific location (using latitude and longitude)Last updated -Python
- AsecurityFlicenseAqualityA Model Context Protocol server that provides AI agents with tools to retrieve weather alerts and detailed forecasts for US locations using the National Weather Service API.Last updated -2115TypeScript
- -security-license-qualityA collection of lightweight servers that expose weather and financial capabilities through the Model Context Protocol, allowing users to access weather alerts, forecasts, and financial market data with technical analysis.Last updated -1Python