Mcp Qweather

by gandli

244 downloads
Not rated
GitHub

Description

# Weather MCP Server [![Publish Python 🐍 distribution 📦 to PyPI and TestPyPI](https://github.com/gandli/mcp-qweather/actions/workflows/publish.yml/badge.svg)](https://github.com/gandli/mcp-qweather/actions/workflows/publish.yml) 一个基于 FastMCP 的和风天气(QWeather)查询服务,提供以下工具: -…

About

# Weather MCP Server [![Publish Python 🐍 distribution 📦 to PyPI and TestPyPI](https://github.com/gandli/mcp-qweather/actions/workflows/publish.yml/badge.svg)](https://github.com/gandli/mcp-qweather/actions/workflows/publish.yml) 一个基于 FastMCP 的和风天气(QWeather)查询服务,提供以下工具: - `lookup_city(location)`: 城市/位置查询(名称或经纬度) -…

Details

Author
gandli
Downloads
244
Categories
Other

- lookup_city(location): Query city or location by name or coordinates.
- get_warning(location): Query weather warnings by LocationID or coordinates.
- get_forecast(location): Query current weather by LocationID or coordinates.
- Runs via stdio transport; no additional network configuration required.
- Available as a PyPI package for zero-clone usage with uvx.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Mcp Qweather
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install by cloning the repository and running uv sync, or use the PyPI package directly with uvx mcp-qweather. Configure the server in your MCP client with stdio transport, setting environment variables QWEATHER_API_HOST and QWEATHER_API_KEY from the QWeather developer console.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp qweather": {
            "weather": {
                "name": "weather",
                "type": "stdio",
                "command": "uvx",
                "args": [
                    "weather-mcp"
                ],
                "env": {
                    "QWEATHER_API_HOST": "your_api_host",
                    "QWEATHER_API_KEY": "your_api_key"
                }
            }
        }
    }
}

McpServers

{
    "weather": {
        "name": "weather",
        "type": "stdio",
        "command": "uvx",
        "args": [
            "weather-mcp"
        ],
        "env": {
            "QWEATHER_API_HOST": "your_api_host",
            "QWEATHER_API_KEY": "your_api_key"
        }
    }
}

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

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.