Metadata-Version: 2.4
Name: iflow-mcp_flyaibox-weather
Version: 0.1.0
Summary: MCP天气服务器 - 基于Model Context Protocol的天气信息查询服务
Project-URL: Homepage, https://github.com/FlyAIBox/Agent_In_Action
Project-URL: Repository, https://github.com/iflow-mcp/flyaibox-agent_in_action
Author: FlyAIBox
License: MIT
License-File: LICENSE
Keywords: mcp,model-context-protocol,weather
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Requires-Dist: httpx>=0.28.1
Requires-Dist: mcp>=1.17.0
Requires-Dist: python-dotenv>=1.1.1
Description-Content-Type: text/markdown

# iFlow MCP Weather Server

基于 Model Context Protocol (MCP) 的天气服务器，提供天气预警和天气预报查询功能。

## 功能

- **天气预警查询**：获取指定城市ID或经纬度的天气灾害预警信息
- **天气预报查询**：获取指定城市ID或经纬度的天气预报（支持3/7/10/15/30天）

## 安装

```bash
pip install iflow-mcp_flyaibox-weather
```

## 使用

### 环境变量配置

在使用前，需要配置和风天气 API Key：

```bash
export QWEATHER_API_BASE="https://devapi.qweather.com"
export QWEATHER_API_KEY="your-api-key-here"
```

### 启动服务器

```bash
iflow-mcp-flyaibox-weather
```

### 使用 uvx 启动

```bash
uvx iflow-mcp_flyaibox-weather
```

## 工具说明

### get_weather_warning

获取指定位置的天气灾害预警。

**参数：**
- `location` (必需)：城市ID或经纬度坐标。例如：'101010100'（北京）或 '116.41,39.92'

**返回：** 格式化的预警信息字符串

### get_daily_forecast

获取指定位置的天气预报。

**参数：**
- `location` (必需)：城市ID或经纬度坐标
- `days` (可选)：预报天数，可选值为 3、7、10、15、30，默认为 3

**返回：** 格式化的天气预报字符串

## API Key 获取

1. 访问 [和风天气开发服务](https://dev.qweather.com/)
2. 注册账号并创建项目
3. 获取 API Key 和 API Host

## 许可证

MIT License