mcp-hko (Hong Kong Observatory MCP Server)
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
This MCP server provides access to Hong Kong Observatory weather data APIs.
It implements various tools that allow clients to retrieve weather forecasts, earthquake information, tide data, and other meteorological information through the Model Context Protocol.
Available Weather Data Tools
- 9-day Weather Forecast (**fnd**)
- Current Weather Report (**rhrread**)
- Local Weather Forecast (**flw**)
- Weather Warning Information (**warningInfo**)
- Weather Warning Summary (**warnsum**)
- Special Weather Tips (**swt**)
- Quick Earthquake Messages (**qem**)
- Locally Felt Earth Tremor Report (**feltearthquake**)
- Tide Information (**HHOT, HLT**)
- Astronomical Data (**SRS, lunardate**)
- Lightning and Visibility Data (**LHL, LTMV**)
- Temperature Records (**CLMTEMP, CLMMAXT, CLMMINT**)
- Radiation Level Reports (**RYES**)
- Rainfall Data (**hourlyrainfall**)
Usage Examples
Get 9-day weather forecast
> **prompt:**
>
> what is the weather in next Wed ?
Get current weather report
> **prompt:**
>
> what is the weather now ?
Development Setup
1. Install dependencies:
2. Start the MCP development server:
3. Build the MCP server:
4. Run tests:
5. Run tests in watch mode:
Comprehensive tests have been created for all API functions. See docs/TESTING.md for details.
Configuration (Claude Desktop)
Configuration (docker)
Project Structure
- src/ - Server source code
- src/lib/ - API implementation modules
- documentation/ - API documentation and test cases
- scripts/ - Development utilities
- src/tests/ - Test files
Server Architecture
The MCP server is built on the FastMCP framework and implements various tools that correspond to Hong Kong Observatory APIs.
The architecture is shown in two diagrams for better readability:
Server Overview
Detailed Tool Structure
REQ01xx: Weather Forecasts & Warnings
REQ02xx: Earthquake Information
REQ03xx: Tides, Astronomy & Climate