Skip to main content

Weather MCP Server Publish Python 🐍 distribution 📦 to PyPI and TestPyPI

一个基于 FastMCP 的和风天气(QWeather)查询服务,提供以下工具:

  • lookup_city(location): 城市/位置查询(名称或经纬度)
  • get_warning(location): 天气预警查询(LocationID 或经纬度)
  • get_forecast(location): 当前天气查询(LocationID 或经纬度)

安装与运行

  • 克隆仓库:
git clone --depth 1 https://github.com/gandli/mcp-qweather
uv sync
  • 在支持 MCP 的客户端中,可添加如下配置以 stdio 方式启动本服务:
{
  "mcpServers": {
    "weather": {
      "name": "weather",
      "type": "stdio",
      "description": "一个基于 FastMCP 的和风天气(QWeather)查询服务",
      "isActive": true,
      "registryUrl": "",
      "command": "uv",
      "args": [
        "--directory",
        "path/to/mcp-qweather",
        "run",
        "main.py"
      ],
      "env": {
        "QWEATHER_API_HOST": "your_api_host",
        "QWEATHER_API_KEY": "your_api_key"
      }
    }
  }
}

零克隆使用(更省事的方式)

  • 已发布到 PyPI,可在客户端直接使用 uvx 调用,无需克隆仓库:
{
  "mcpServers": {
    "weather": {
      "name": "weather",
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-qweather"
      ],
      "env": {
        "QWEATHER_API_HOST": "your_api_host",
        "QWEATHER_API_KEY": "your_api_key"
      }
    }
  }
}

QWEATHER_API_KEY:前往和风天气开发控制台,创建项目并生成凭据,获取 API Key。

QWEATHER_API_HOST:前往设置页·开发者信息,查看并复制 API Host。

许可

  • 采用 MIT 许可证(见 LICENSE)。
  • 已在 pyproject.toml 设置 license = { file = "LICENSE" } 与分类器。

Release files for mcp-qweather 0.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-qweather 0.0.9
File Size Uploaded
mcp_qweather-0.0.9.tar.gz 22.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-qweather 0.0.9
File Interpreter ABI Platform
mcp_qweather-0.0.9-py3-none-any.whl Python 3 none any Details

Total release size:25.8 kB

Release files / mcp_qweather-0.0.9.tar.gz

Download URL mcp_qweather-0.0.9.tar.gz
Size 22.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3f4c7a304a3180fbe0bd187eff4597630f8fd663ca1e2c9d6bf2851112f3fa99
BLAKE2b-256 checksum
How to use checksums
3d4af42a05049c85e364deeaab66f172e65ac25f876a8fcdcbb53a598f2a3169
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2025.

Transparency log

Release files / mcp_qweather-0.0.9-py3-none-any.whl

Download URL mcp_qweather-0.0.9-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
513ab776e3fcc3147e9057ba45e485d7d85c28b5a2d73a1f45c6f21bf404aa23
BLAKE2b-256 checksum
How to use checksums
001b72f2582c6d1fda15071e6b6aeab6a25aa0c1b3f076bb6d23e61aef389480
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.9 This release

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page