Get the FREE Ultimate OpenClaw Setup Guide →

hk-climate

This is an MCP server that provides access to climate and weather data through a FastMCP interface.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio hkopenai-hk-climate-mcp-server python server.py \
  --env HOST="Bind host when TRANSPORT_MODE is 'sse' (default: 127.0.0.1)" \
  --env PORT="Port to run the server on when TRANSPORT_MODE is 'sse' (default: 8000)" \
  --env TRANSPORT_MODE="Set to 'sse' to run in SSE mode or omit/set to 'stdio' for standard I/O mode"

How to use

This MCP server exposes climate and weather data from the Hong Kong Observatory via a FastMCP-like interface. It provides tools to fetch current weather, a 9-day forecast, local forecasts, weather warnings, special tips, visibility and lightning data, moon times, tide information, and weather/radiation reports. Clients can query these data sets through the standardized MCP endpoints exposed by the server and receive structured dictionaries containing data such as temperature, humidity, forecast details, warning messages, and update times. The server is designed to be run locally or in a containerized environment and can be connected to by MCP clients via standard input/output or SSE, depending on the chosen transport mode.

How to install

Prerequisites:

  • Python 3.8+ installed on your system
  • Internet access to install dependencies

Install and run locally:

  1. Clone the repository: git clone https://github.com/hkopenai/hk-climate-mcp-server.git cd hk-climate-mcp-server

  2. Install Python dependencies: python -m pip install --upgrade pip pip install -r requirements.txt

  3. Run the server (stdio mode): python server.py

  4. (Optional) Run in SSE mode on a specific host/port: TRANSPORT_MODE=sse HOST=0.0.0.0 PORT=8080 python server.py

  5. Connect via Cline or an MCP client using the provided configuration (see Cline Integration in the README).

Additional notes

  • The data source for this MCP server is the Hong Kong Observatory (HKO).
  • Available APIs include current weather, 9-day forecasts, local forecasts, weather warnings, special weather tips, visibility data, lightning data, moon times, hourly tides, high/low tides, and weather/radiation reports.
  • Environment variables control transport mode and binding: TRANSPORT_MODE (stdio or sse), HOST, and PORT. If TRANSPORT_MODE is not set, the server defaults to stdio mode.
  • For Cline integration, the example shows how to connect using stdio by running the module with -m hkopenai.hk_climate_mcp_server; ensure the module path matches your installation.
  • If you modify config or add additional endpoints, ensure your MCP client and documentation stay in sync with the exposed methods and their language defaults (en/tc/sc, etc.).

Related MCP Servers

Sponsor this space

Reach thousands of developers