A FastMCP based QWeather query service
Project description
Weather MCP Server
一个基于 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(控制台脚本
mcp-qweather),可在客户端直接使用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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_qweather-0.0.3.tar.gz.
File metadata
- Download URL: mcp_qweather-0.0.3.tar.gz
- Upload date:
- Size: 22.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d68a469b311f5d51ec07b19fc6967a65e3a08704884e6a4c29c9bab96390973
|
|
| MD5 |
f0d333aa9ac57ca72e0d48791a820378
|
|
| BLAKE2b-256 |
724c541ca0f78d23e65e1eaffe683b66d18d15dda92090b3a23b4a2fb1ed35c2
|
Provenance
The following attestation bundles were made for mcp_qweather-0.0.3.tar.gz:
Publisher:
publish.yml on gandli/mcp-qweather
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_qweather-0.0.3.tar.gz -
Subject digest:
7d68a469b311f5d51ec07b19fc6967a65e3a08704884e6a4c29c9bab96390973 - Sigstore transparency entry: 604935099
- Sigstore integration time:
-
Permalink:
gandli/mcp-qweather@be214f8dfe233be3e360827aa189244dfdbd28c0 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/gandli
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@be214f8dfe233be3e360827aa189244dfdbd28c0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mcp_qweather-0.0.3-py3-none-any.whl.
File metadata
- Download URL: mcp_qweather-0.0.3-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a098dbb3c9df72b727b2998a0820f1a44e68ecbd00147aeb65c22b4464b3bcd5
|
|
| MD5 |
8b705fb4f7a42e7c7dae68e6141fadd6
|
|
| BLAKE2b-256 |
235f9a154e88e32ff2854582ea4d4bba9eec62d1f4f567fd967805311d0b76bd
|
Provenance
The following attestation bundles were made for mcp_qweather-0.0.3-py3-none-any.whl:
Publisher:
publish.yml on gandli/mcp-qweather
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_qweather-0.0.3-py3-none-any.whl -
Subject digest:
a098dbb3c9df72b727b2998a0820f1a44e68ecbd00147aeb65c22b4464b3bcd5 - Sigstore transparency entry: 604935102
- Sigstore integration time:
-
Permalink:
gandli/mcp-qweather@be214f8dfe233be3e360827aa189244dfdbd28c0 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/gandli
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@be214f8dfe233be3e360827aa189244dfdbd28c0 -
Trigger Event:
push
-
Statement type: