JunyiYe/weather-mcp-server
If you are the rightful owner of weather-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Weather MCP Server is a modular, async-enabled server that provides weather alerts and forecast data using the National Weather Service API and FastMCP.
š¦ļø Weather MCP Server
A modular, async-enabled weather server powered by the National Weather Service API and FastMCP. Built using the uv
Python toolchain for fast and modern development.
š¦ Project Overview
This project provides:
- š Weather alerts by U.S. state.
- š¤ļø Forecast data by latitude/longitude.
Built on httpx
for async HTTP requests and FastMCP
for exposing modular tools via CLI or agent interfaces.
š ļø Getting Started
š§° Prerequisites
- Python ā„ 3.13
uv
installed (pip install uv
)
š§āš» Setup
# Create and enter the project directory
uv init weather
mv weather weather-mcp-server
cd weather-mcp-server
# Create virtual environment and activate it
uv venv
.venv\Scripts\activate # On Windows
# or
source .venv/bin/activate # On Unix
# Add dependencies
uv add mcp[cli] httpx
# Create your server file
touch weather.py # or use new-item on PowerShell
š Usage
Run the MCP server
python weather.py
Available Tools
š¹ Get Active Weather Alerts
mcp run weather get_alerts --state TX
š¹ Get Forecast for Coordinates
mcp run weather get_forecast --latitude 34.05 --longitude -118.25
Returns next 5 periods of weather forecast for Los Angeles, CA.
š Project Structure
weather-mcp-server/
āāā .venv/ # Virtual environment (created by uv venv)
āāā pyproject.toml # Project config and dependencies
āāā weather.py # MCP server with tools
āāā README.md # Project documentation
āļø Tools Used
- FastMCP ā Modular Command Platform framework
- httpx ā Async HTTP client
- uv ā Fast, modern Python packaging and workflow
š License
This project is licensed under the MIT License. See for details.