WeatherWork Consumer MCP Server — 基于 weathercn API 的消费者天气工具集
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"weatherwork-consumer-mcp","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# WeatherWork Consumer MCP 基于 [weathercn](https://platform.weathercn.com) API 的消费者天气 MCP 服务,提供 **18 个工具**(地名解析、实况、预报、预警、空气质量、分钟降水、生活指数、台风、天文、潮汐等)。 ## 安装 ```bash pip install weatherwork-consumer-mcp ``` 从本目录源码安装(开发): ```bash cd weatherwork-consumer-mcp pip install -e . ``` ## 配置密钥 **openAPI 标准模式**(推荐普通用户): ```bash export WEATHERCN_OPENAPI_KEY="your_openapi_key" ``` **JV 高阶模式**(商务授权): ```bash export WEATHERCN_API_KEY="your_api_key" export WEATHERCN_API_SECRET="your_api_secret" ``` > **JV 与 openAPI 密钥可并存**:两者都配置时,实况/预报/预警等共用接口**默认走 JV**;仅配置 `WEATHERCN_OPENAPI_KEY` 时走 openAPI。台风/天文/潮汐仅 JV。详见 `.env.example`。 ## 运行 安装后可直接启动 MCP(stdio): ```bash weatherwork-consumer-mcp ``` 启动时会通过 MCP `instructions` 下发 `SYSTEM_PROMPT.md` 中的助手规则。**Cursor** 一般无需额外配置。 --- ## 接入 VS Code / GitHub Copilot(推荐流程) Copilot **不会稳定**使用 MCP `initialize.instructions`,请按下面三步适配(与 Cursor 行为对齐)。 ### 0. 检查是否已适配(推荐先跑) ```bash pip install -e . weatherwork-consumer-mcp --check-vscode-setup # 或独立命令: weatherwork-check-vscode --workspace /你的项目路径 ``` - 退出码 `0`:`.github/copilot-instructions.md` 等已就绪 - 退出码 `1`:缺少必要文件(会打印修复命令) - 退出码 `2`:仅有警告(如规则版本过期、缺 `.env.mcp.local`) 安装后也可查看说明:`weatherwork-consumer-mcp --install-hint` **VS Code 启动 MCP 时自动同步**:首次在 VS Code 中连接本 MCP(或规则版本与包版本不一致)时,会自动写入/更新 `.github/copilot-instructions.md` 与 `.github/agents/weather.agent.md`(日志仅输出到 **stderr**,不影响 MCP stdio)。请**新开一条 Agent 对话**后 Copilot 才会读到最新规则。禁用自动同步:`WEATHERWORK_SKIP_VSCODE_AUTO_SYNC=1`。 ### 1. 一键生成 Copilot 规则与配置(可选,与自动同步相同) 在**要使用天气助手的仓库根目录**执行(开发时可在本包目录与上层工作区各执行一次);通常不必再手动执行,除非要在未启动 MCP 时单独更新文件: ```bash weatherwork-sync-vscode # 若 MCP 工作区在上一级目录,例如: weatherwork-sync-vscode --workspace .. # 或:weatherwork-check-vscode --workspace .. --sync ``` 将生成(已存在 `.vscode/mcp.json` 时不会覆盖): | 文件 | 作用 | |------|------| | `.github/copilot-instructions.md` | **每次对话自动注入**的路由与输出规范(与 `SYSTEM_PROMPT.md` 同步) | | `.github/agents/weather.agent.md` | 可选:在 Agent 列表选择 **weather** 专用助手 | | `.vscode/mcp.json` | MCP 服务器配置(`weatherwo…
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.