MCP天气服务器 - 基于Model Context Protocol的天气信息查询服务
Project description
iFlow MCP Weather Server
基于 Model Context Protocol (MCP) 的天气服务器,提供天气预警和天气预报查询功能。
功能
- 天气预警查询:获取指定城市ID或经纬度的天气灾害预警信息
- 天气预报查询:获取指定城市ID或经纬度的天气预报(支持3/7/10/15/30天)
安装
pip install iflow-mcp_flyaibox-weather
使用
环境变量配置
在使用前,需要配置和风天气 API Key:
export QWEATHER_API_BASE="https://devapi.qweather.com"
export QWEATHER_API_KEY="your-api-key-here"
启动服务器
iflow-mcp-flyaibox-weather
使用 uvx 启动
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 获取
- 访问 和风天气开发服务
- 注册账号并创建项目
- 获取 API Key 和 API Host
许可证
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iflow_mcp_flyaibox_weather-0.1.0.tar.gz.
File metadata
- Download URL: iflow_mcp_flyaibox_weather-0.1.0.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86a7b6772e1756972b747056a7b5a60692b48bfe18e6058d6168585c879c76ba
|
|
| MD5 |
ccb770a8af8da3fe18368fb7df1d71fb
|
|
| BLAKE2b-256 |
cf9ceaf91664e1ff8e0feedb9a4852811d0291fd9a7f36c3e49f13a70e066e97
|
File details
Details for the file iflow_mcp_flyaibox_weather-0.1.0-py3-none-any.whl.
File metadata
- Download URL: iflow_mcp_flyaibox_weather-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfa72858c27a9035636ad3d933a749c94626f428f3a0be1fe3913043c6e9dfc3
|
|
| MD5 |
2d282ede646f0968874940185ec2d3b8
|
|
| BLAKE2b-256 |
05b13184cd3587792cb0b78a85a04b89fbc1461ce71601d8f5d0164afda4d223
|