Catalog PyPI
Back to packageRELEASE DETAILS

0.1.9

PyPI

accton-mcpdemo-weather

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

Published8 Jun 2026
Direct dependencies2
Transitive dependenciesNot calculated

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.

Declared dependencies 2

Native requirements
2 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
httpx
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.13",
  "evaluation": "NOT_EVALUATED"
}
httpx>=0.28.1runtime
mcp
Environment
{
  "extras": "cli",
  "marker": null,
  "requires_python": ">=3.13",
  "evaluation": "NOT_EVALUATED"
}
mcp[cli]>=1.27.2runtime

Distribution files

2 collected
accton_mcpdemo_weather-0.1.9-py3-none-any.whl

bdist_wheel · 7.2 KB · Python py3

Source file
accton_mcpdemo_weather-0.1.9.tar.gz

sdist · 5.74 KB · Python source

Source file

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_version:d033d608164a03d3316cfbb89fd1bc80cee6012d9f42ff07bcff09e08daf69d3

Other collected versions

View all collected versions →