Skip to main content

用以访问基于位置的天气数据,包括实况天气、逐小时预报、空气质量AQI,灾害预警、分钟级降水、生活建议、台风等天气数据服务

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

power_ai_weather_mcp-0.5.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

power_ai_weather_mcp-0.5.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file power_ai_weather_mcp-0.5.0.tar.gz.

File metadata

File hashes

Hashes for power_ai_weather_mcp-0.5.0.tar.gz
Algorithm Hash digest
SHA256 8b1a1e44a810681fefb3ca96f5b06b5802973a3c5ef86220c9d6577c4e89436f
MD5 597be1550d1a00874e151c1471c94ddf
BLAKE2b-256 c481e00e22a94e727302a366fa4aa471f9a7ada34534a801303b06ab8c3523b8

See more details on using hashes here.

File details

Details for the file power_ai_weather_mcp-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for power_ai_weather_mcp-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 153d8409754052520f7469cd33d494bce8570b427a1da13901296fca542d5f5e
MD5 63537df986f1925a159c969657f5ad8c
BLAKE2b-256 2549ce6ed126e92cce2f7807626c0e3e1f4d1769ff91a8e9493c45512f23b8c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page