MCP Weather Service (Internal Use Only)
基于 Model Context Protocol (MCP)的天气服务实现(仅限内部使用)
功能特性
- 实时天气查询
- 天气预报(小时级和天级)
- 空气质量查询
- 生活指数建议
- 日出日落时间
- 气象灾害预警
- 台风信息
- 降水预报
MCP 使用
安装 uv
uv 是一款高性能的 python 环境管理工具,可以参考官方教程安装并熟悉使用。
MCP 配置
首先配置环境变量 UV_INDEX、WEATHER_ENDPOINT、APP_ID、APP_SECRET:
export UV_INDEX=xxxx
export WEATHER_ENDPOINT=xxxx
export APP_ID=xxxx
export APP_SECRET=xxxx
然后,使用 uvx 启动 MCP 服务,服务将通过 streamable-http 协议在 http://localhost:8000/mcp 启动。
uvx power-ai-weather-mcp
数据结构说明
服务返回的数据使用了以字段描述为键(key)的字典结构,这样能更直观地理解返回数据的含义。例如:
{
"天气状况": "晴",
"温度": 25.6,
"体感温度": 24.8,
"相对湿度": 45
}
而不是传统的以字段名为键的结构:
{
"text": "晴",
"temperature": 25.6,
"feels_like": 24.8,
"humidity": 45
}
许可证
MIT License
Metadata
Release files for power-ai-weather-mcp 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| power_ai_weather_mcp-0.5.0.tar.gz | 7.6 kB | Without provenance | Details for power_ai_weather_mcp-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| power_ai_weather_mcp-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for power_ai_weather_mcp-0.5.0-py3-none-any.whl |
Total release size: 14.7 kB
Release files / power_ai_weather_mcp-0.5.0.tar.gz
| Download URL | power_ai_weather_mcp-0.5.0.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b1a1e44a810681fefb3ca96f5b06b5802973a3c5ef86220c9d6577c4e89436f
|
|
BLAKE2b-256 checksum How to use checksums |
c481e00e22a94e727302a366fa4aa471f9a7ada34534a801303b06ab8c3523b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.3
|
Release files / power_ai_weather_mcp-0.5.0-py3-none-any.whl
| Download URL | power_ai_weather_mcp-0.5.0-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
153d8409754052520f7469cd33d494bce8570b427a1da13901296fca542d5f5e
|
|
BLAKE2b-256 checksum How to use checksums |
2549ce6ed126e92cce2f7807626c0e3e1f4d1769ff91a8e9493c45512f23b8c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.3
|
Security for power-ai-weather-mcp 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.