彩云天气MCP服务器

彩云天气MCP服务器

提供无缝访问彩云天气API的MCP服务器。

快速入门

  1. 注册并获取API密钥:访问 彩云平台 注册并生成API密钥。

  2. 克隆仓库并设置环境: 克隆代码库并使用 uv 创建Python虚拟环境和安装依赖。

    git clone https://github.com/mrchi/caiyun-weather-mcp-server.git
    cd caiyun-weather-mcp-server/
    uv venv
    uv sync
    
  3. 配置环境变量:创建 .env 文件存储API密钥。

    CAIYUN_API_KEY="your-key"
    
  4. 配置MCP客户端:打开支持MCP协议的客户端(如Claude桌面版或VSCode插件Cline),添加以下配置:

    {
        "mcpServers": {
            "weather": {
                "command": "uv",
                "args": [
                    "--directory",
                    "<你的仓库目录>",
                    "run",
                    "--env-file",
                    ".env",
                    "servers/caiyun_weather.py"
                ]
            }
        }
    }
    
  5. 查询天气:输入问题例如“天安门广场的天气怎么样?”即可查询。