Caiyun Weather MCP Server
A Model Context Protocol server that provides comprehensive weather data querying capabilities based on the Caiyun Weather API, supporting real-time weather, forecasts, and alerts with multi-language support.
Tools
get_weather_by_location
根据经纬度获取天气信息
get_weather_by_address
根据地址获取天气信息
get_realtime_weather
获取实时天气数据
get_minutely_forecast
获取分钟级降水预报
get_hourly_forecast
获取小时级天气预报
get_daily_forecast
获取天级天气预报
get_weather_alert
获取天气预警信息
README
彩云天气 MCP 服务器
基于彩云天气 API 的 Model Context Protocol (MCP) 服务器,提供天气数据查询功能。
功能特点
- 实时天气数据:温度、湿度、风速、气压等
- 分钟级降水预报:未来2小时的降水情况
- 小时级天气预报:未来24小时或更长时间的天气预报
- 每日天气预报:未来多天的天气预报
- 天气预警信息:各类天气预警
- 地址查询:支持通过地址查询天气(需配置高德地图API)
- 多语言支持:支持中文和英文
- 单位制选择:支持公制和英制
安装
- 克隆仓库:
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密钥,需要启用"地理编码"服务
配置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": []
}
}
}
使用示例
根据经纬度获取天气信息
<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>
参数说明
通用参数
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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.