KnowAir Weather MCP

KnowAir Weather MCP

MCP server delivering real-time weather, air quality, forecasts, and astronomy data via Caiyun Weather API.

2
Stars
0
Forks
0
Releases

Overview

KnowAir Weather MCP Server is a modular MCP implementation that sources data from Caiyun Weather API to deliver real-time weather, air quality, forecasts, and astronomical information via the Model Context Protocol. In the v2.0 architecture, the codebase is decomposed into dedicated modules: utils.py for data processing, config.py for centralized configuration, models.py for Pydantic validation, and server.py containing the MCP server core logic, enabling easier maintenance and extension. The server exposes a comprehensive API surface, including: real-time data (temperature, humidity, wind, visibility, pressure), minute-level precipitation forecasts, hourly forecasts up to 360 hours, daily forecasts up to 15 days, and historical weather data for the past 72 hours; extended ranges support 1-360 hours and 1-15 days. It also provides weather alerts, an integrated comprehensive interface get_comprehensive_weather, and astronomy data (sunrise/sunset, moon phase, moonrise/moonset). The platform emphasizes Chinese localization, intelligent formatting (emojis, friendly displays), and a unified API management layer that centralizes all Caiyun API calls. It is designed for developers integrating weather and air quality into MCP-enabled assistants and applications, with easy setup via environment variables and a quick start.

Details

Owner
shuowang-ai
Language
Python
License
MIT License
Updated
2025-12-07

Features

Real-time weather data

Provides current temperature, apparent temperature, humidity, wind, visibility, pressure, and overall weather conditions.

Comprehensive air quality monitoring

Includes PM2.5/PM10/O3/SO2/NO2/CO and both US and China AQI standards.

Hourly forecast with air quality trends

Hourly forecasts (up to 360 hours) with AQI/PM2.5/PM10 trends and visual color-coding.

Minutely precipitation forecast

Next 2 hours of precipitation intensity and probability on a per-minute basis.

Extended forecast range

Supports 1-360 hours and 1-15 days forecasts for long-range planning.

Weather alert system

Realtime weather warnings and alerts delivery.

Astronomy information

Sunrise/sunset, moon phases, moonrise/moonset times.

Historical weather data

Query historical weather data for the past 72 hours.

Audience

DevelopersIntegrate real-time weather, air quality, forecasts into MCP-powered assistants across applications.
Product teamsEmbed weather intelligence into consumer apps and services for localization and planning.
ResearchersAnalyze long-term weather and air quality trends for research purposes.

Tags

weatherair qualityMCPCaiyun Weather APIreal-timehourly forecastdaily forecastminutely precipitationhistorical weatherastronomyChinese localizationmodular architecture