Caiyun Weather logo

Caiyun Weather

Community
marcusbai

基于彩云天气 API 的 Model Context Protocol (MCP) 服务器,提供天气数据查询功能。

Publishermarcusbai
Repositorycaiyun-weather-mcp
LanguageTypeScript
Forks
5
Stars
10
Available tools
0
Transport typestdio
Categories
Links
  • Connect tools to AI workflows

    Caiyun Weather exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    10 stars and 5 forks from the linked repository.

彩云天气 MCP 服务器

smithery badge

基于彩云天气 API 的 Model Context Protocol (MCP) 服务器,提供天气数据查询功能。

功能特点

  • 实时天气数据:温度、湿度、风速、气压、能见度等
  • 分钟级降水预报:未来2小时的降水情况
  • 小时级天气预报:未来24小时或更长时间的天气预报
  • 每日天气预报:未来多天的天气预报
  • 天气预警信息:各类天气预警
  • 空气质量趋势:24小时空气质量变化趋势和主要污染物分析
  • 详细生活指数:运动、旅行、洗车、穿衣等详细生活建议
  • 降水类型识别:区分雨、雪、雨夹雪、冰雹等降水类型
  • 地址查询:支持通过地址查询天气,内置35个主要城市坐标缓存,无需额外配置即可使用
  • 多语言支持:支持中文和英文
  • 单位制选择:支持公制和英制

安装

安装 Smithery

通过 Smithery 安装 彩云天气 对于Claude的桌面应用:

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

通过 NPX 使用

您可以直接通过 NPX 运行:

bash
npx caiyun-weather-mcp --api-key=您的彩云天气API密钥

或者设置环境变量:

bash
CAIYUN_API_KEY=您的密钥 npx caiyun-weather-mcp

从源码安装

  1. 克隆仓库:
bash
git clone https://github.com/marcusbai/caiyun-weather-mcp.git
cd caiyun-weather-mcp
  1. 安装依赖:
bash
npm install

注意:本项目依赖于 Model Context Protocol (MCP) SDK,该SDK需要在运行环境中可用。MCP SDK通常由Claude或其他支持MCP的应用程序提供。

  1. 构建项目:
bash
npm run build

配置

在使用前,需要配置彩云天气API密钥。地址查询功能支持内置城市缓存,高德地图API密钥为推荐配置。

彩云天气API密钥

  1. 访问 彩云天气开发者中心
  2. 注册并登录账号
  3. 创建应用并获取API密钥

高德地图API密钥(推荐)

  1. 访问 高德开放平台
  2. 注册并登录账号
  3. 创建应用并获取API密钥,需要启用"地理编码"服务

💡 提示:高德地图API密钥为推荐配置。系统内置了35个主要城市的坐标缓存,包括所有直辖市、省会城市和经济发达城市,无需额外配置即可使用。

地址解析功能

支持的城市

系统内置了以下35个主要城市的坐标缓存:

直辖市:北京、上海、天津、重庆

省会及主要城市:广州、深圳、杭州、南京、武汉、成都、西安、长沙、沈阳、大连、青岛、厦门、苏州、郑州、济南、哈尔滨、石家庄、太原、合肥、南昌、福州、南宁、昆明、贵阳、兰州、西宁、拉萨、呼和浩特、海口、银川、乌鲁木齐

智能地址匹配

支持多种地址格式和智能匹配:

  • 标准格式:上海、上海市
  • 详细地址:上海市浦东新区、北京市朝阳区
  • 城市别名:魔都→上海、帝都→北京、羊城→广州、鹏城→深圳等

地址解析策略

  1. 缓存优先:内置城市坐标立即返回
  2. API增强:配置高德API后支持任意地址
  3. 降级处理:未知地址返回北京坐标并提示配置

配置MCP设置

编辑MCP设置文件,添加彩云天气MCP服务器配置:

json
{
  "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 安装了本服务,可以使用以下配置:

json
{
  "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

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "caiyun-weather": {
      "command": "npx",
      "args": [
        "caiyun-weather-mcp"
      ],
      "env": {
        "CAIYUN_API_KEY": "您的彩云天气API密钥",
        "AMAP_API_KEY": "您的高德地图API密钥(可选)"
      }
    }
  }
}

Use Caiyun Weather MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Caiyun Weather is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Caiyun Weather as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Caiyun Weather MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "caiyun-weather": {
      "command": "npx",
      "args": [
        "-y",
        "caiyun-weather-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Caiyun Weather MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Caiyun Weather MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Caiyun Weather to help me with this task?
Caiyun Weather
Sure. I read it.
Here is what I found using Caiyun Weather.

Frequently asked questions

What is the Caiyun Weather MCP server used for?

Caiyun Weather is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Caiyun Weather MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Caiyun Weather with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Caiyun Weather MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Caiyun Weather connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Caiyun Weather MCP to TypingMind?

Caiyun Weather runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Caiyun Weather MCP provide in TypingMind?

Caiyun Weather exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Caiyun Weather MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Caiyun Weather requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇