328 查看 · 2026-07-07 更新
Caiyun Weather MCP Server
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
- Clone the repository:
bash git clone https://github.com/marcusbai/caiyun-weather-mcp.git cd caiyun-weather-mcp
- 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.
- 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
- Visit Caiyun Weather Developer Center
- Register and log in to your account
- Create an application and obtain the API key
AMap API Key (Optional)
- Visit AMap Open Platform
- Register and log in to your account
- 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>
Get Weather Information by Address
<use_mcp_tool>
<server_name>caiyun-weather</server_name>
<tool_name>get_weather_by_address</tool_name>
Get Real-time Weather Data
<use_mcp_tool>
<server_name>caiyun-weather</server_name>
<tool_name>get_realtime_weather</tool_name>
Get Minute-level Precipitation Forecast
<use_mcp_tool>
<server_name>caiyun-weather</server_name>
<tool_name>get_minutely_forecast</tool_name>
Get Hourly Weather Forecast
<use_mcp_tool>
<server_name>caiyun-weather</server_name>
<tool_name>get_hourly_forecast</tool_name>
Get Daily Weather Forecast
<use_mcp_tool>
<server_name>caiyun-weather</server_name>
<tool_name>get_daily_forecast</tool_name>
<use_mcp_tool>
<server_name>caiyun-weather</server_name>
<tool_name>get_weather_alert</tool_name>
Parameter Explanation
General Parameters
longitude: Longitudelatitude: Latitudeaddress: Address (only forget_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_CNoren_US, defaultzh_CN)unit: Unit system (metricorimperial, defaultmetric)
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密钥'}}}}]
来源
- 来源:github
- 链接:https://github.com/marcusbai/caiyun-weather-mcp