Skip to main content

A FastMCP based QWeather query service

Project description

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" } 与分类器。

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

mcp_qweather-0.0.7.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

mcp_qweather-0.0.7-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file mcp_qweather-0.0.7.tar.gz.

File metadata

  • Download URL: mcp_qweather-0.0.7.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcp_qweather-0.0.7.tar.gz
Algorithm Hash digest
SHA256 574d24a96e14f0bf6a33b6542af9e54e6c949663c9d289ff4c8e5721db96dd84
MD5 d3cfe12fb7f86c8a86a9b18640928600
BLAKE2b-256 5545d890e1a2a71e68044e45eb028268e1ba43f32a0b3e11e947eeb05bec470f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_qweather-0.0.7.tar.gz:

Publisher: publish.yml on gandli/mcp-qweather

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_qweather-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: mcp_qweather-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcp_qweather-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 8c685da54ddfa9fad7acf4fb47946744f0f0ae5e4b88acfffa1ba905796b79c5
MD5 e82bc9cd95ea79a8fe4228ff87c74784
BLAKE2b-256 0bb9e3c7b4a821f9cd2a416daab25848b001a95c203cc3509f03813f8710da31

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_qweather-0.0.7-py3-none-any.whl:

Publisher: publish.yml on gandli/mcp-qweather

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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