Caiyun Weather MCP Server

Caiyun Weather MCP Server

By PsychArch GitHub

Model Context Protocol (MCP) server for the Caiyun Weather API

Overview

what is Caiyun Weather MCP Server?

Caiyun Weather MCP Server is a Model Context Protocol (MCP) server designed to provide access to the Caiyun Weather API, offering tools for retrieving weather data including real-time conditions, forecasts, and alerts.

how to use Caiyun Weather MCP Server?

To use the server, you need to have Node.js (v16 or above) and a Caiyun Weather API token. After setting up the configuration, you can access various weather tools through the server.

key features of Caiyun Weather MCP Server?

  • Real-time weather conditions
  • Hourly weather forecasts (up to 72 hours)
  • Daily weather forecasts (up to 7 days)
  • Historical weather data
  • Weather alerts
  • Multi-language support (Chinese, English, Japanese)
  • Token-efficient compact response format

use cases of Caiyun Weather MCP Server?

  1. Accessing current weather conditions for a specific location.
  2. Obtaining hourly and daily weather forecasts for planning activities.
  3. Retrieving historical weather data for research or analysis.
  4. Monitoring weather alerts for safety and preparedness.

FAQ from Caiyun Weather MCP Server?

  • What do I need to run the Caiyun Weather MCP Server?

You need Node.js (v16 or above) and a Caiyun Weather API token.

  • Can I get weather data for any location?

Yes, you can retrieve weather data by providing the longitude and latitude of the desired location.

  • Is the server free to use?

The server is free to use, but you need a valid Caiyun Weather API token.

Content

Caiyun Weather MCP Server

This is a Model Context Protocol (MCP) server for the Caiyun Weather API. It provides tools to access weather data including real-time conditions, forecasts, and weather alerts.

Features

  • Real-time weather conditions
  • Hourly weather forecasts (up to 72 hours)
  • Daily weather forecasts (up to 7 days)
  • Weather alerts
  • Support for multiple languages (Chinese, English, Japanese)
  • Token-efficient compact response format

Prerequisites

Configuration

{
  "mcpServers": {
    "caiyun-mcp-tools": {
      "command": "npx",
      "args": [
        "caiyun-mcp-tools"
      ],
      "env": {
        "CAIYUN_API_KEY": "your-caiyun-api-key"
      }
    }
  }
}

Available Tools

The server provides the following tools which can be accessed through Cursor:

  1. realtime-weather - Get current weather conditions

    • Parameters:
      • longitude (number): Longitude coordinate
      • latitude (number): Latitude coordinate
      • lang (optional string): Language for response ("zh_CN", "en_US", or "ja"), defaults to "zh_CN"
  2. hourly-forecast - Get hourly weather forecast

    • Parameters:
      • longitude (number): Longitude coordinate
      • latitude (number): Latitude coordinate
      • hourlysteps (optional number): Number of hourly forecasts to return (max: 72)
      • lang (optional string): Language for response ("zh_CN", "en_US", or "ja"), defaults to "zh_CN"
  3. daily-forecast - Get daily weather forecast

    • Parameters:
      • longitude (number): Longitude coordinate
      • latitude (number): Latitude coordinate
      • dailysteps (optional number): Number of daily forecasts to return (max: 7)
      • lang (optional string): Language for response ("zh_CN", "en_US", or "ja"), defaults to "zh_CN"
  4. weather-alerts - Get active weather alerts

    • Parameters:
      • longitude (number): Longitude coordinate
      • latitude (number): Latitude coordinate
      • lang (optional string): Language for response ("zh_CN", "en_US", or "ja"), defaults to "zh_CN"

API Limitations

Per the official Caiyun Weather API documentation: "The API interface only supports returning historical data for the past day." Due to this limitation, the historical weather tool has been removed from this package.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT

No tools information available.
No content found.