Hong Kong Weather MCP Server providing climate and weather data tools
Project description
HKO MCP Server
This is an MCP server that provides access to climate and weather data through a FastMCP interface.
Data Source
- Hong Kong Observatory
Features
- Current weather: Get current weather observations from HKO (supports optional region parameter)
- 9-day forecast: Get extended weather forecast including general situation, daily forecasts, sea and soil temperatures
- Local weather forecast: Get short-term weather forecast with outlook
- Weather warnings: Get summary and detailed information about active weather warnings
- Special weather tips: Get important weather-related safety tips
API Reference
Current Weather
get_current_weather(region: str = "Hong Kong Observatory") -> Dict
- Get current weather observations for a specific region in Hong Kong
- Parameters:
- region: The region to get weather for (default: "Hong Kong Observatory")
- Returns:
- Dict containing:
- warning: Current weather warnings
- temperature: Current temperature in Celsius
- humidity: Current humidity percentage
- rainfall: Current rainfall in mm
- Dict containing:
9-Day Weather Forecast
get_9_day_weather_forecast(lang: str = "en") -> Dict
- Get the 9-day weather forecast for Hong Kong
- Parameters:
- lang: Language code (en/tc/sc, default: en)
- Returns:
- Dict containing:
- generalSituation: General weather situation
- weatherForecast: List of daily forecast dicts
- updateTime: Last update time
- seaTemp: Sea temperature info
- soilTemp: List of soil temperature info
- Dict containing:
Local Weather Forecast
get_local_weather_forecast(lang: str = "en") -> Dict
- Get local weather forecast for Hong Kong
- Parameters:
- lang: Language code (en/tc/sc, default: en)
- Returns:
- Dict containing:
- forecastDesc: Forecast description
- outlook: Outlook forecast
- updateTime: Last update time
- forecastPeriod: Forecast period
- forecastDate: Forecast date
- Dict containing:
Weather Warning Summary
get_weather_warning_summary(lang: str = "en") -> Dict
- Get weather warning summary for Hong Kong
- Parameters:
- lang: Language code (en/tc/sc, default: en)
- Returns:
- Dict containing:
- warningMessage: List of warning messages
- updateTime: Last update time
- Dict containing:
Weather Warning Information
get_weather_warning_info(lang: str = "en") -> Dict
- Get detailed weather warning information
- Parameters:
- lang: Language code (en/tc/sc, default: en)
- Returns:
- Dict containing:
- warningStatement: Warning statement
- updateTime: Last update time
- Dict containing:
Special Weather Tips
get_special_weather_tips(lang: str = "en") -> Dict
- Get special weather tips for Hong Kong
- Parameters:
- lang: Language code (en/tc/sc, default: en)
- Returns:
- Dict containing:
- specialWeatherTips: List of special weather tips
- updateTime: Last update time
- Dict containing:
Setup
- Clone this repository
- Install Python dependencies:
pip install -r requirements.txt
- Run the server:
python app.py
Running Options
- Default stdio mode:
python app.py - SSE mode (port 8000):
python app.py --sse
Cline Integration
To connect this MCP server to Cline using stdio:
- Add this configuration to your Cline MCP settings (cline_mcp_settings.json):
{
"hko-server": {
"disabled": false,
"timeout": 3,
"type": "stdio",
"command": "python",
"args": [
"c:/Projects/hkopenai/hk-climate-mcp-server/app.py"
]
}
}
Testing
Tests are available in tests. Run with:
pytest
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hkopenai_hk_climate_mcp_server-0.2.0.tar.gz.
File metadata
- Download URL: hkopenai_hk_climate_mcp_server-0.2.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bbae098a25cecd3e9f019fa68ab75d92c061bccbe6263c1e4a34c0dfa7cb029
|
|
| MD5 |
1a329ecac2f16cd3e3cf02f2075925c0
|
|
| BLAKE2b-256 |
421cbca82b8466aafeaab97d4cb3fc7ce0ea302962f84ff5410609ca4e5f083d
|
File details
Details for the file hkopenai_hk_climate_mcp_server-0.2.0-py3-none-any.whl.
File metadata
- Download URL: hkopenai_hk_climate_mcp_server-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03540eca3c7d46275d4afb44860a88d3c68a2c362ff26883da547f74a5e6f526
|
|
| MD5 |
c87668d2f25f84cfc06d72b8edd69697
|
|
| BLAKE2b-256 |
08116e38bc1ce4cfd01c743aa2df7e9483e2dc68ceb6935dd0290f522a79f068
|