hefeng mcp weather

Local 2025-08-31 23:54:55 0

Provides weather forecast data for locations in China using the HeFeng Weather API, with real-time, hourly, or daily forecasts and location-based queries.


A Model Context Protocol server that provides weather forecast data for locations in China through HeFeng Weather API.

Features

  • Get real-time weather data
  • Get hourly weather forecast (24h/72h/168h)
  • Get daily weather forecast (3d/7d/10d/15d/30d)
  • Support location query by longitude and latitude coordinates
  • Full Chinese weather description

API

This MCP server provides the following tool:

get-weather

Get weather forecast data for a specific location.

Usage with MCP Host(eg. Claude Desktop)

Add this to your claude_desktop_config.json

NPX

{
  "mcpServers": {
    "hefeng-weather": {
      "command": "npx",
      "args": ["hefeng-mcp-weather@latest", "--apiKey=${API_KEY}"]
    }
  }
}

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

[
  {
    "description": "获取中国国内的天气预报",
    "inputSchema": {
      "properties": {
        "days": {
          "default": "now",
          "description": "预报天数,now为实时天气,24h为24小时预报,72h为72小时预报,168h为168小时预报,3d为3天预报,以此类推",
          "enum": [
            "now",
            "24h",
            "72h",
            "168h",
            "3d",
            "7d",
            "10d",
            "15d",
            "30d"
          ],
          "type": "string"
        },
        "location": {
          "description": "逗号分隔的经纬度信息 (e.g., 116.40,39.90)",
          "type": "string"
        }
      },
      "required": [
        "location"
      ],
      "type": "object"
    },
    "name": "get-weather"
  }
]