Catalog PyPI
PACKAGE EXPLORERView in registry

accton-mcpdemo-weather

PyPI

A MCP server for querying current weather and forecasts via OpenWeatherMap API

Versions collected1
Direct dependencies2From release 0.1.9
Last observed20 Oct, 18:02 UTC

README

Version 0.1.9 documentation

accton-mcpdemo-weather

一个基于 MCP (Model Context Protocol) 的天气查询服务器,通过 OpenWeatherMap API 提供实时天气和未来天气预报。

功能

  • 🌍 查询全球城市的当前实时天气(温度、湿度、风速、气压、日出日落等)
  • 📅 查询未来 5 天的天气预报(每 3 小时一个时段,含降水概率)
  • 🌐 支持中文和英文城市名称

安装

pip install accton-mcpdemo-weather

配置

使用前需要设置环境变量:

export OPENWEATHER_API_KEY="your-api-key"

在 OpenWeatherMap 注册即可免费获取 API Key。

使用

命令行运行

accton-mcpdemo-weather

作为 MCP Server 配置

在 Claude Desktop 或其他 MCP 客户端的配置文件中添加:

{
  "mcpServers": {
    "weather": {
      "command": "uvx",
      "args": ["accton-mcpdemo-weather"],
      "env": {
        "OPENWEATHER_API_KEY": "your-api-key"
      }
    }
  }
}

提供的工具

工具说明
get_current_weather获取指定城市的当前实时天气
get_weather_forecast获取指定城市未来某天的天气预报
get_weather综合查询:不传日期返回当前天气,传日期返回预报

开发

# 克隆仓库
git clone https://github.com/your-repo/accton-mcpdemo-weather.git
cd accton-mcpdemo-weather

# 安装依赖
uv sync

# 运行
uv run accton-mcpdemo-weather

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.98 Jun 20262

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:02 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:3fb1eedeeaf3f95dc5bb7e38a9f3aac4770813592ed0faf4ac961f2e09f18e05