- Explore MCP Servers
- hk-weather-mcp-server
Hk Weather Mcp Server
What is Hk Weather Mcp Server
hk-weather-mcp-server is an MCP server that provides access to weather data from the Hong Kong Observatory through a FastMCP interface.
Use cases
Use cases include integrating with Cline for weather data processing, developing weather-related applications, and conducting environmental research.
How to use
To use hk-weather-mcp-server, clone the repository, install the required Python dependencies, and run the server using the command ‘python app.py’. Optionally, you can run it in SSE mode with ‘python app.py --sse’.
Key features
Key features include the ability to retrieve current weather observations from the Hong Kong Observatory, with support for an optional region parameter.
Where to use
hk-weather-mcp-server can be used in applications requiring real-time weather data, such as weather forecasting tools, mobile applications, and research projects.
Overview
What is Hk Weather Mcp Server
hk-weather-mcp-server is an MCP server that provides access to weather data from the Hong Kong Observatory through a FastMCP interface.
Use cases
Use cases include integrating with Cline for weather data processing, developing weather-related applications, and conducting environmental research.
How to use
To use hk-weather-mcp-server, clone the repository, install the required Python dependencies, and run the server using the command ‘python app.py’. Optionally, you can run it in SSE mode with ‘python app.py --sse’.
Key features
Key features include the ability to retrieve current weather observations from the Hong Kong Observatory, with support for an optional region parameter.
Where to use
hk-weather-mcp-server can be used in applications requiring real-time weather data, such as weather forecasting tools, mobile applications, and research projects.
Content
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