Skip to main content

Caiyun Weather MCP Server

Setup Instructions

Before anything, ensure you have access to the API. You can apply for it at https://docs.caiyunapp.com/weather-api/.

Install uv first.

MacOS/Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows:

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Setup with Claude Desktop

# claude_desktop_config.json
# Can find location through:
# Hamburger Menu -> File -> Settings -> Developer -> Edit Config
{
  "mcpServers": {
    "caiyun-weather": {
      "command": "uvx",
      "args": ["mcp-caiyun-weather"],
      "env": {
        "CAIYUN_WEATHER_API_TOKEN": "YOUR_API_KEY_HERE"
      }
    }
  }
}

Ask Claude a question requiring weather

e.g. "What's the weather in Beijing Now?"

Local/Dev Setup Instructions

Setup with Claude Desktop

# claude_desktop_config.json
# Can find location through:
# Hamburger Menu -> File -> Settings -> Developer -> Edit Config
{
  "mcpServers": {
    "caiyun-weather": {
      "command": "uv",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/PARENT/FOLDER/mcp-caiyun-weather",
        "run",
        "mcp-caiyun-weather"
      ],
      "env": {
        "CAIYUN_WEATHER_API_TOKEN": "YOUR_API_TOKEN_HERE"
      }
    }
  }
}

Debugging

Run:

npx @modelcontextprotocol/inspector \
      uv \
      --directory /ABSOLUTE/PATH/TO/PARENT/FOLDER/mcp-caiyun-weather \
      run \
      mcp-caiyun-weather

Available Tools

  • get_realtime_weather: Get real-time weather data for a specific location

    • Parameters:
      • lng: The longitude of the location
      • lat: The latitude of the location
    • Returns detailed information including:
      • Temperature and apparent temperature
      • Sky condition
      • Humidity
      • Wind speed and direction
      • Precipitation intensity
      • Air quality metrics (PM2.5, PM10, O3, SO2, NO2, CO)
      • AQI (China and USA standards)
      • Life indices (UV and Comfort)
  • get_hourly_forecast: Get an hourly weather forecast for a configurable number of hours

    • Parameters:
      • lng: The longitude of the location
      • lat: The latitude of the location
      • hours: The number of hours to return (1360, defaults to 72)
    • Returns hourly forecast including:
      • Temperature
      • Weather conditions
      • Rain probability
      • Precipitation intensity (mm/hr)
      • Wind speed and direction
  • get_weekly_forecast: Get daily weather forecast for the next 7 days

    • Parameters:
      • lng: The longitude of the location
      • lat: The latitude of the location
    • Returns daily forecast including:
      • Temperature range (min/max)
      • Weather conditions
      • Rain probability
  • get_historical_weather: Get historical weather data for the past 24 hours

    • Parameters:
      • lng: The longitude of the location
      • lat: The latitude of the location
    • Returns historical data including:
      • Temperature
      • Weather conditions
  • get_weather_alerts: Get weather alerts for a specific location

    • Parameters:
      • lng: The longitude of the location
      • lat: The latitude of the location
    • Returns weather alerts including:
      • Alert title
      • Alert code
      • Alert status
      • Alert description

Note: All tools require a valid Caiyun Weather API token to be set in the environment variable CAIYUN_WEATHER_API_TOKEN.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_caiyun_weather-0.1.4.tar.gz (30.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_caiyun_weather-0.1.4-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file mcp_caiyun_weather-0.1.4.tar.gz.

File metadata

  • Download URL: mcp_caiyun_weather-0.1.4.tar.gz
  • Upload date:
  • Size: 30.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mcp_caiyun_weather-0.1.4.tar.gz
Algorithm Hash digest
SHA256 57168202cb188f5e7a6820e480690f4b91f6f29df70f0e83cfa1110e0e674a5e
MD5 385d1baf803b33a3d8af29a288a32757
BLAKE2b-256 b27ff95a2079ba21ca4d6864aa0d720df0f2cf2bb3cf25e93639bc6972830b13

See more details on using hashes here.

File details

Details for the file mcp_caiyun_weather-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: mcp_caiyun_weather-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mcp_caiyun_weather-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 14dd3b691b417a4b70fcbfa0fd172718c1e49f59a3d89f87e3827b0fc4f46072
MD5 c44b9c34f9d3fdc3602259eca00dacbe
BLAKE2b-256 4208ea66d85d98738c0d4bfbb748040f2a4e97c697826e439a84545771739a8f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page