Caiyun Weather MCP Server
The Caiyun Weather MCP Server is a weather data query service that provides comprehensive weather information based on the Caiyun Weather API.
With this server, you can:
Query weather by location (longitude and latitude) or by address
Access real-time weather conditions including temperature, humidity, and wind speed
Get minute-by-minute precipitation forecasts for the next 2 hours
Retrieve hourly weather forecasts for up to 24+ hours
Obtain daily weather forecasts for multiple days
Receive weather alerts for severe conditions
Customize data presentation with multi-language support (Chinese/English)
Select between metric and imperial units
Connects to a GitHub repository where the MCP server code is hosted, allowing users to clone the caiyun-weather-mcp repository to set up the weather service.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Caiyun Weather MCP Server what's the weather like in Shanghai tomorrow?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
彩云天气 MCP 服务器
基于彩云天气 API 的 Model Context Protocol (MCP) 服务器,提供天气数据查询功能。
功能特点
实时天气数据:温度、湿度、风速、气压、能见度等
分钟级降水预报:未来2小时的降水情况
小时级天气预报:未来24小时或更长时间的天气预报
每日天气预报:未来多天的天气预报
天气预警信息:各类天气预警
空气质量趋势:24小时空气质量变化趋势和主要污染物分析
详细生活指数:运动、旅行、洗车、穿衣等详细生活建议
降水类型识别:区分雨、雪、雨夹雪、冰雹等降水类型
地址查询:支持通过地址查询天气,内置35个主要城市坐标缓存,无需额外配置即可使用
多语言支持:支持中文和英文
单位制选择:支持公制和英制
Related MCP server: MCP Weather Server
安装
安装 Smithery
通过 Smithery 安装 彩云天气 对于Claude的桌面应用:
npm install @smithery/cli -g
smithery install @pepperai/caiyun-weather-mcp通过 NPX 使用
您可以直接通过 NPX 运行:
npx caiyun-weather-mcp --api-key=您的彩云天气API密钥或者设置环境变量:
CAIYUN_API_KEY=您的密钥 npx caiyun-weather-mcp从源码安装
克隆仓库:
git clone https://github.com/marcusbai/caiyun-weather-mcp.git
cd caiyun-weather-mcp安装依赖:
npm install注意:本项目依赖于 Model Context Protocol (MCP) SDK,该SDK需要在运行环境中可用。MCP SDK通常由Claude或其他支持MCP的应用程序提供。
构建项目:
npm run build配置
在使用前,需要配置彩云天气API密钥。地址查询功能支持内置城市缓存,高德地图API密钥为推荐配置。
彩云天气API密钥
访问 彩云天气开发者中心
注册并登录账号
创建应用并获取API密钥
高德地图API密钥(推荐)
访问 高德开放平台
注册并登录账号
创建应用并获取API密钥,需要启用"地理编码"服务
💡 提示:高德地图API密钥为推荐配置。系统内置了35个主要城市的坐标缓存,包括所有直辖市、省会城市和经济发达城市,无需额外配置即可使用。
地址解析功能
支持的城市
系统内置了以下35个主要城市的坐标缓存:
直辖市:北京、上海、天津、重庆
省会及主要城市:广州、深圳、杭州、南京、武汉、成都、西安、长沙、沈阳、大连、青岛、厦门、苏州、郑州、济南、哈尔滨、石家庄、太原、合肥、南昌、福州、南宁、昆明、贵阳、兰州、西宁、拉萨、呼和浩特、海口、银川、乌鲁木齐
智能地址匹配
支持多种地址格式和智能匹配:
标准格式:
上海、上海市详细地址:
上海市浦东新区、北京市朝阳区城市别名:
魔都→上海、帝都→北京、羊城→广州、鹏城→深圳等
地址解析策略
缓存优先:内置城市坐标立即返回
API增强:配置高德API后支持任意地址
降级处理:未知地址返回北京坐标并提示配置
配置MCP设置
编辑MCP设置文件,添加彩云天气MCP服务器配置:
{
"mcpServers": {
"caiyun-weather": {
"command": "node",
"args": ["完整路径/caiyun-weather-mcp/dist/index.js"],
"env": {
"CAIYUN_API_KEY": "您的彩云天气API密钥",
"AMAP_API_KEY": "您的高德地图API密钥(推荐)"
},
"disabled": false,
"autoApprove": []
}
}
}如果您通过 NPX 安装了本服务,可以使用以下配置:
{
"mcpServers": {
"caiyun-weather": {
"command": "npx",
"args": ["caiyun-weather-mcp"],
"env": {
"CAIYUN_API_KEY": "您的彩云天气API密钥",
"AMAP_API_KEY": "您的高德地图API密钥(推荐)"
},
"disabled": false,
"autoApprove": []
}
}
}使用示例
根据经纬度获取天气信息
<use_mcp_tool>
<server_name>caiyun-weather</server_name>
<tool_name>get_weather_by_location</tool_name>
<arguments>
{
"longitude": 116.3976,
"latitude": 39.9075,
"daily_steps": 5,
"hourly_steps": 24,
"language": "zh_CN",
"unit": "metric"
}
</arguments>
</use_mcp_tool>根据地址获取天气信息
<use_mcp_tool>
<server_name>caiyun-weather</server_name>
<tool_name>get_weather_by_address</tool_name>
<arguments>
{
"address": "上海市",
"daily_steps": 5,
"hourly_steps": 24,
"language": "zh_CN",
"unit": "metric"
}
</arguments>
</use_mcp_tool>获取实时天气数据
<use_mcp_tool>
<server_name>caiyun-weather</server_name>
<tool_name>get_realtime_weather</tool_name>
<arguments>
{
"longitude": 116.3976,
"latitude": 39.9075,
"language": "zh_CN",
"unit": "metric"
}
</arguments>
</use_mcp_tool>获取分钟级降水预报
<use_mcp_tool>
<server_name>caiyun-weather</server_name>
<tool_name>get_minutely_forecast</tool_name>
<arguments>
{
"longitude": 116.3976,
"latitude": 39.9075,
"language": "zh_CN",
"unit": "metric"
}
</arguments>
</use_mcp_tool>获取小时级天气预报
<use_mcp_tool>
<server_name>caiyun-weather</server_name>
<tool_name>get_hourly_forecast</tool_name>
<arguments>
{
"longitude": 116.3976,
"latitude": 39.9075,
"hourly_steps": 24,
"language": "zh_CN",
"unit": "metric"
}
</arguments>
</use_mcp_tool>获取每日天气预报
<use_mcp_tool>
<server_name>caiyun-weather</server_name>
<tool_name>get_daily_forecast</tool_name>
<arguments>
{
"longitude": 116.3976,
"latitude": 39.9075,
"daily_steps": 5,
"language": "zh_CN",
"unit": "metric"
}
</arguments>
</use_mcp_tool>获取天气预警信息
<use_mcp_tool>
<server_name>caiyun-weather</server_name>
<tool_name>get_weather_alert</tool_name>
<arguments>
{
"longitude": 116.3976,
"latitude": 39.9075,
"language": "zh_CN",
"unit": "metric"
}
</arguments>
</use_mcp_tool>获取空气质量趋势
<use_mcp_tool>
<server_name>caiyun-weather</server_name>
<tool_name>get_air_quality_trend</tool_name>
<arguments>
{
"longitude": 116.3976,
"latitude": 39.9075,
"language": "zh_CN",
"unit": "metric"
}
</arguments>
</use_mcp_tool>获取详细生活指数
<use_mcp_tool>
<server_name>caiyun-weather</server_name>
<tool_name>get_detailed_life_index</tool_name>
<arguments>
{
"longitude": 116.3976,
"latitude": 39.9075,
"language": "zh_CN",
"unit": "metric"
}
</arguments>
</use_mcp_tool>参数说明
通用参数
longitude:经度latitude:纬度address:地址(仅用于get_weather_by_address)daily_steps:每日预报天数(1-15,默认5)hourly_steps:小时预报数量(1-360,默认24)language:语言(zh_CN或en_US,默认zh_CN)unit:单位制(metric或imperial,默认metric)
许可证
MIT
Available Tools
7 toolsget_daily_forecastC
获取天级天气预报
Inputs: latitude (required), longitude (required), daily_steps, language, +1 more.
get_hourly_forecastC
获取小时级天气预报
Inputs: latitude (required), longitude (required), hourly_steps, language, +1 more.
get_minutely_forecastC
获取分钟级降水预报
Inputs: latitude (required), longitude (required), language, unit.
get_realtime_weatherC
获取实时天气数据
Inputs: latitude (required), longitude (required), language, unit.
get_weather_alertC
获取天气预警信息
Inputs: latitude (required), longitude (required), language, unit.
get_weather_by_addressC
根据地址获取天气信息
Inputs: address (required), daily_steps, hourly_steps, language, +1 more.
get_weather_by_locationC
根据经纬度获取天气信息
Inputs: latitude (required), longitude (required), daily_steps, hourly_steps, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a clearly distinct purpose with no overlap: daily, hourly, and minutely forecasts target different time granularities, realtime weather provides current conditions, weather alerts are separate, and the last two tools differ by input type (address vs. location). An agent can easily tell them apart based on their specific functions.
All tool names follow a consistent verb_noun pattern using 'get_' as the prefix, followed by descriptive nouns like 'daily_forecast' or 'weather_by_address'. There are no deviations in style or convention, making the naming predictable and easy to understand.
With 7 tools, this server is well-scoped for a weather domain, covering key aspects like forecasts, real-time data, alerts, and location-based queries. Each tool earns its place without being excessive or insufficient, aligning perfectly with typical MCP server expectations.
The tool set is highly complete for weather data retrieval, covering forecasts, real-time info, alerts, and multiple input methods. A minor gap might be the lack of historical weather data or more advanced queries, but core workflows are fully supported, allowing agents to handle most weather-related tasks effectively.
Maintenance
Related MCP Connectors
The official Model Context Protocol server for Ambee. It gives any MCP-compatible AI assistant — Claude, ChatGPT, Cursor, VS Code, Ollama, and more direct access to live air quality, pollen, and weather data. To get started, including information on signing up and obtaining your Ambee key, check out the Ambee documentation on https://docs.ambeedata.com
MCP server for current weather and multi-day forecasts worldwide, Chinese city names and output.
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
MCP server for China weather: current conditions and multi-day forecast by city name or adcode.
Related MCP Servers
FlicenseBqualityDmaintenanceProvides a Model Context Protocol server that enables large language models to query and retrieve real-time weather forecasts for cities and regions across China.1-- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides real-time weather information and 5-day forecasts to AI assistants, supporting multiple languages and flexible units.3MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides comprehensive weather data and forecasts through the OpenWeatherMap API, enabling AI assistants to access real-time weather information, forecasts, air quality data, and location services.1142 npm5MIT
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables natural language weather queries for global cities, integrating with OpenWeather API to provide real-time weather information in an easy-to-read format.1-