m

marcusbai

weather-serviceslocation-services

328 查看 · 2026-07-07 更新

Caiyun Weather MCP Server

smithery badge

A Model Context Protocol (MCP) server based on the Caiyun Weather API, providing weather data query functionality.

Features

  • Real-time Weather Data: Temperature, humidity, wind speed, pressure, etc.
  • Minute-level Precipitation Forecast: Precipitation forecast for the next 2 hours
  • Hourly Weather Forecast: Weather forecast for the next 24 hours or longer
  • Daily Weather Forecast: Weather forecast for multiple days ahead
  • Weather Warning Information: Various weather warnings
  • Address Query: Supports querying weather by address (requires configuration of AMap API)
  • Multi-language Support: Supports Chinese and English
  • Unit System Selection: Supports metric and imperial units

Installation

Install Smithery

Install Caiyun Weather for Claude's desktop application via Smithery:

bash npm install @smithery/cli -g smithery install @pepperai/caiyun-weather-mcp

  1. Clone the repository:

bash git clone https://github.com/marcusbai/caiyun-weather-mcp.git cd caiyun-weather-mcp

  1. Install dependencies:

bash npm install

Note: This project depends on the Model Context Protocol (MCP) SDK, which needs to be available in the runtime environment. The MCP SDK is typically provided by Claude or other applications that support MCP.

  1. Build the project:

bash npm run build

Configuration

Before using, you need to configure the Caiyun Weather API key. If you need the address query function, you also need to configure the AMap API key.

Caiyun Weather API Key

  1. Visit Caiyun Weather Developer Center
  2. Register and log in to your account
  3. Create an application and obtain the API key

AMap API Key (Optional)

  1. Visit AMap Open Platform
  2. Register and log in to your account
  3. Create an application and obtain the API key, enabling the "Geocoding" service

Configure MCP Settings

Edit the MCP settings file and add the Caiyun Weather MCP server configuration:

json { "mcpServers": { "caiyun-weather": { "command": "node", "args": ["full/path/to/caiyun-weather-mcp/dist/index.js"], "env": { "CAIYUN_API_KEY": "Your Caiyun Weather API key", "AMAP_API_KEY": "Your AMap API key (optional)" }, "disabled": false, "autoApprove": [] } } }

Usage Examples

Get Weather Information by Coordinates

<use_mcp_tool> <server_name>caiyun-weather</server_name> <tool_name>get_weather_by_location</tool_name> { "longitude": 116.3976, "latitude": 39.9075, "daily_steps": 5, "hourly_steps": 24, "language": "zh_CN", "unit": "metric" } </use_mcp_tool>

Get Weather Information by Address

<use_mcp_tool> <server_name>caiyun-weather</server_name> <tool_name>get_weather_by_address</tool_name> { "address": "Haidian District, Beijing", "daily_steps": 5, "hourly_steps": 24, "language": "zh_CN", "unit": "metric" } </use_mcp_tool>

Get Real-time Weather Data

<use_mcp_tool> <server_name>caiyun-weather</server_name> <tool_name>get_realtime_weather</tool_name> { "longitude": 116.3976, "latitude": 39.9075, "language": "zh_CN", "unit": "metric" } </use_mcp_tool>

Get Minute-level Precipitation Forecast

<use_mcp_tool> <server_name>caiyun-weather</server_name> <tool_name>get_minutely_forecast</tool_name> { "longitude": 116.3976, "latitude": 39.9075, "language": "zh_CN", "unit": "metric" } </use_mcp_tool>

Get Hourly Weather Forecast

<use_mcp_tool> <server_name>caiyun-weather</server_name> <tool_name>get_hourly_forecast</tool_name> { "longitude": 116.3976, "latitude": 39.9075, "hourly_steps": 24, "language": "zh_CN", "unit": "metric" } </use_mcp_tool>

Get Daily Weather Forecast

<use_mcp_tool> <server_name>caiyun-weather</server_name> <tool_name>get_daily_forecast</tool_name> { "longitude": 116.3976, "latitude": 39.9075, "daily_steps": 5, "language": "zh_CN", "unit": "metric" } </use_mcp_tool>### Getting Weather Alert Information

<use_mcp_tool> <server_name>caiyun-weather</server_name> <tool_name>get_weather_alert</tool_name> { "longitude": 116.3976, "latitude": 39.9075, "language": "zh_CN", "unit": "metric" } </use_mcp_tool>

Parameter Explanation

General Parameters

  • longitude: Longitude
  • latitude: Latitude
  • address: Address (only for get_weather_by_address)
  • daily_steps: Number of days for daily forecast (1-15, default 5)
  • hourly_steps: Number of hours for hourly forecast (1-360, default 24)
  • language: Language (zh_CN or en_US, default zh_CN)
  • unit: Unit system (metric or imperial, default metric)

License

MIT

服务配置

[{'mcpServers': {'caiyun-weather': {'args': ['完整路径/caiyun-weather-mcp/dist/index.js'], 'autoApprove': [], 'command': 'node', 'disabled': False, 'env': {'AMAP_API_KEY': '您的高德地图API密钥(可选)', 'CAIYUN_API_KEY': '您的彩云天气API密钥'}}}}]

来源