Back to MCP directory
publicPublicdnsLocal runtime

qweather-mcp

qweather-mcp是一个为QWeather API提供天气查询功能的MCP服务器项目,支持通过命令行或配置文件快速部署,提供城市查询和实时天气获取功能。

article

README

🚀 qweather-mcp

本项目是为QWeather API提供服务的MCP服务器,借助Model Context Protocol (MCP) 实现天气信息的查询功能。

🚀 快速开始

在开始使用本项目前,您需要先在这里获取API密钥。

📦 安装指南

通过Smithery安装

若要为Claude Desktop自动安装qweather-mcp插件,可使用Smithery,执行以下命令:

npx -y @smithery/cli install @overstarry/qweather-mcp --client claude

手动配置

执行以下命令启动标准输入输出服务器:

# 标准输入输出服务器
npx -y qweather-mcp

同时,您需要设置以下环境变量:

QWEATHER_API_BASE=https://api.qweather.com
QWEATHER_API_KEY=<您的API密钥>

JSON配置

您也可以使用JSON文件进行配置,示例如下:

{
  "mcpServers": {
    "qweather": {
      "command": "npx",
      "args": ["-y", "qweather-mcp"],
      "env": {
        "QWEATHER_API_BASE": "<您的API地址>",
        "QWEATHER_API_KEY": "<您的API密钥>"
      }
    }
  }
}

💻 使用示例

可用工具

  • lookup-city:根据名称查找城市信息
  • get-weather-now:获取指定位置的当前天气状况

📄 许可证

本项目采用MIT许可证。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client