{"$schema":"https://wellknown.network/schemas/agent-record-v1.json","schemaVersion":"1","id":"ag_qk2esuatgvwg","handle":"weatherwork-consumer-mcp","url":"https://wellknown.network/agents/weatherwork-consumer-mcp","links":{"self":"https://wellknown.network/agents/weatherwork-consumer-mcp/record.json","html":"https://wellknown.network/agents/weatherwork-consumer-mcp","markdown":"https://wellknown.network/agents/weatherwork-consumer-mcp/record.md","api":"https://wellknown.network/api/v1/agents/weatherwork-consumer-mcp","status":"https://wellknown.network/api/v1/agents/weatherwork-consumer-mcp/status","claim":"https://wellknown.network/agents/weatherwork-consumer-mcp/claim","claimApi":"https://wellknown.network/api/v1/claims","claimDescriptor":"https://wellknown.network/agents/weatherwork-consumer-mcp/claim.json","badge":"https://wellknown.network/agents/weatherwork-consumer-mcp/badge.svg","openapi":"https://wellknown.network/openapi.json"},"ard":{"identifier":"urn:air::server:weatherwork-consumer-mcp","type":"application/mcp-server-card+json"},"kind":"mcp_server","declared":{"name":"weatherwork-consumer-mcp","summary":"WeatherWork Consumer MCP Server — 基于 weathercn API 的消费者天气工具集","description":"# WeatherWork Consumer MCP\n\n基于 [weathercn](https://platform.weathercn.com) API 的消费者天气 MCP 服务，提供 **18 个工具**（地名解析、实况、预报、预警、空气质量、分钟降水、生活指数、台风、天文、潮汐等）。\n\n## 安装\n\n```bash\npip install weatherwork-consumer-mcp\n```\n\n从本目录源码安装（开发）：\n\n```bash\ncd weatherwork-consumer-mcp\npip install -e .\n```\n\n## 配置密钥\n\n**openAPI 标准模式**（推荐普通用户）：\n\n```bash\nexport WEATHERCN_OPENAPI_KEY=\"your_openapi_key\"\n```\n\n**JV 高阶模式**（商务授权）：\n\n```bash\nexport WEATHERCN_API_KEY=\"your_api_key\"\nexport WEATHERCN_API_SECRET=\"your_api_secret\"\n```\n\n> **JV 与 openAPI 密钥可并存**：两者都配置时，实况/预报/预警等共用接口**默认走 JV**；仅配置 `WEATHERCN_OPENAPI_KEY` 时走 openAPI。台风/天文/潮汐仅 JV。详见 `.env.example`。\n\n## 运行\n\n安装后可直接启动 MCP（stdio）：\n\n```bash\nweatherwork-consumer-mcp\n```\n\n启动时会通过 MCP `instructions` 下发 `SYSTEM_PROMPT.md` 中的助手规则。**Cursor** 一般无需额外配置。\n\n---\n\n## 接入 VS Code / GitHub Copilot（推荐流程）\n\nCopilot **不会稳定**使用 MCP `initialize.instructions`，请按下面三步适配（与 Cursor 行为对齐）。\n\n### 0. 检查是否已适配（推荐先跑）\n\n```bash\npip install -e .\nweatherwork-consumer-mcp --check-vscode-setup\n# 或独立命令：\nweatherwork-check-vscode --workspace /你的项目路径\n```\n\n- 退出码 `0`：`.github/copilot-instructions.md` 等已就绪  \n- 退出码 `1`：缺少必要文件（会打印修复命令）  \n- 退出码 `2`：仅有警告（如规则版本过期、缺 `.env.mcp.local`）\n\n安装后也可查看说明：`weatherwork-consumer-mcp --install-hint`\n\n**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`。\n\n### 1. 一键生成 Copilot 规则与配置（可选，与自动同步相同）\n\n在**要使用天气助手的仓库根目录**执行（开发时可在本包目录与上层工作区各执行一次）；通常不必再手动执行，除非要在未启动 MCP 时单独更新文件：\n\n```bash\nweatherwork-sync-vscode\n# 若 MCP 工作区在上一级目录，例如：\nweatherwork-sync-vscode --workspace ..\n# 或：weatherwork-check-vscode --workspace .. --sync\n```\n\n将生成（已存在 `.vscode/mcp.json` 时不会覆盖）：\n\n| 文件 | 作用 |\n|------|------|\n| `.github/copilot-instructions.md` | **每次对话自动注入**的路由与输出规范（与 `SYSTEM_PROMPT.md` 同步） |\n| `.github/agents/weather.agent.md` | 可选：在 Agent 列表选择 **weather** 专用助手 |\n| `.vscode/mcp.json` | MCP 服务器配置（`weatherwo…","publisher":{"name":"WeatherWork","url":null},"homepage":"https://github.com/weatherwork/consumer-mcp#readme","repository":"https://github.com/weatherwork/consumer-mcp#readme","version":"0.3.3","license":"MIT","protocols":["mcp"],"tags":["forecast","mcp","model-context-protocol","weather","weathercn"],"pricing":null,"endpoints":[{"url":"pypi:weatherwork-consumer-mcp","type":"package_pypi","auth":null,"probeable":false}],"skills":null,"tools":null,"extra":null,"attribution":{"kind":"pypi","name":"pypi","license":"pypi","repoUrl":"pypi","summary":"pypi","version":"pypi","description":"pypi","homepageUrl":"pypi","publisherName":"pypi"}},"derived":{"capabilities":[{"slug":"data.weather","name":"Weather","confidence":1,"provenance":"declared"}],"categories":["data"],"language":"en"},"observed":{"status":"unknown","statusReason":"Distributed as a package to run locally; no network endpoint to check.","lastOkAt":null,"lastProbedAt":null,"statusComputedAt":null,"reliability30d":null,"latestObservations":[],"tools":null,"package":{"name":"weatherwork-consumer-mcp","registry":"pypi","observedAt":"2026-09-10T15:25:24.089Z","publishedAt":"2026-07-16T10:08:40.670729Z","latestVersion":"0.3.3"}},"verification":{"claimed":false,"claimedAt":null,"proofs":[]},"provenance":{"sources":[{"source":"pypi","key":"weatherwork-consumer-mcp","url":"https://pypi.org/project/weatherwork-consumer-mcp/","firstSeenAt":"2026-09-10T15:24:19.251Z","fetchedAt":"2026-09-10T15:24:19.251Z","normalizedAt":"2026-09-10T15:24:19.251Z"}]},"firstSeenAt":"2026-09-10T15:24:19.251Z","updatedAt":"2026-09-10T15:25:24.089Z"}