{"id":"43f3fc28-c271-4875-aa85-16bec85ab729","entityType":"agent","slug":"clawhub-mifochen-update-stock-mcp","name":"Update Stock Mcp","canonicalUrl":"https://www.xpersona.co/agent/clawhub-mifochen-update-stock-mcp","canonicalPath":"/agent/clawhub-mifochen-update-stock-mcp","generatedAt":"2026-10-11T11:24:27.609Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-11T09:23:20.787Z","emptyReason":null},"description":"UpdateStock MCP 服务技能 —— 通过 stdio 模式调用 UpdateStock 脚本， 提供 A 股 DuckDB 数据库管理功能：创建数据库、全量/增量更新股票数据、查询股票行情。 设计的数据库方案兼容 QuantAll（全A解析）计算引擎。 触发条件：用户提到\"UpdateStock\"、\"创建股票数据库\"、\"更新股票数据\"、\"获取股票数据\"等。 Skill: Update Stock Mcp Owner: mifochen Summary: UpdateStock MCP 服务技能 —— 通过 stdio 模式调用 UpdateStock 脚本， 提供 A 股 DuckDB 数据库管理功能：创建数据库、全量/增量更新股票数据、查询股票行情。 设计的数据库方案兼容 QuantAll（全A解析）计算引擎。 触发条件：用户提到\"UpdateStock\"、\"创建股票数据库\"、\"更新股票数据\"、\"获取股票数据\"等。 Tags: latest:2.2.0 Version history: v2.2.0 | 2026-07-10T12:32:41.936Z | user update-stock-mcp v2.2.0 - 移除了 skill-card.md 文件（不用的描述文件）。 - 新增 license: MIT 字段到 SKILL.md，补充许可证信息。 - SKILL.md","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s17ez9j9adqc2m8d7g786vbkjd86fjsg:update-stock-mcp","sourceUrl":"https://clawhub.ai/mifochen/update-stock-mcp","homepage":"https://clawhub.ai/mifochen/skills/update-stock-mcp","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/mifochen/update-stock-mcp","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/mifochen/skills/update-stock-mcp","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":61,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"UpdateStock MCP 服务技能 —— 通过 stdio 模式调用 UpdateStock 脚本， 提供 A 股 DuckDB 数据库管理功能：创建数据库、全量/增量更新股票数据、查询股票行情。 设计的数据库方案兼容 QuantAll（全A解析）计算引擎。 触发条件：用户提到\"UpdateStock\"、\"创建股"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T09:23:20.787Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T09:23:20.787Z","emptyReason":null},"stars":null,"forks":null,"downloads":1101,"packageName":null,"latestVersion":"2.2.0","tractionLabel":"1.1K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T09:23:20.773Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T09:23:20.787Z","lastCrawledAt":"2026-10-11T09:23:20.773Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T09:23:20.773Z","lastVerifiedAt":null,"highlights":[{"version":"2.2.0","createdAt":"2026-07-10T12:32:41.936Z","changelog":"update-stock-mcp v2.2.0 - 移除了 skill-card.md 文件（不用的描述文件）。 - 新增 license: MIT 字段到 SKILL.md，补充许可证信息。 - SKILL.md 细节调整，完善了工具使用、说明和阶段描述，无功能变更。 - 优化更新代码，减少不必要的环节，加快更新速度","fileCount":6,"zipByteSize":28895},{"version":"2.1.0","createdAt":"2026-07-08T08:33:05.776Z","changelog":"**v1.0.1 Changelog** - Removed the skill-card.md file to clean up redundant documentation. - No functional or toolset changes; all existing database management and data query features remain unchanged.","fileCount":6,"zipByteSize":25784},{"version":"1.0.0","createdAt":"2026-05-30T08:46:00.432Z","changelog":"update-stock-mcp v1.0.0 - Initial release. - Provides A-share DuckDB database management via UpdateStock script through stdio MCP. - Supports database creation and full/incremental stock data updates. - Basic MCP integration and configuration instructions included.","fileCount":6,"zipByteSize":19448}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17ez9j9adqc2m8d7g786vbkjd86fjsg:update-stock-mcp","setupComplexity":"medium","setupSteps":["Python environment detected. Create a strict virtual environment (`python -m venv .venv`) before installing dependencies to prevent system-level package conflicts.","Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-mifochen-update-stock-mcp/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-mifochen-update-stock-mcp/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-mifochen-update-stock-mcp/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-mifochen-update-stock-mcp/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-mifochen-update-stock-mcp/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-mifochen-update-stock-mcp/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-11T11:24:27.608Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-mifochen-update-stock-mcp/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-mifochen-update-stock-mcp/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-mifochen-update-stock-mcp/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-mifochen-update-stock-mcp/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-11T09:23:20.787Z","emptyReason":null},"readme":"Skill: Update Stock Mcp\n\nOwner: mifochen\n\nSummary: UpdateStock MCP 服务技能 —— 通过 stdio 模式调用 UpdateStock 脚本， 提供 A 股 DuckDB 数据库管理功能：创建数据库、全量/增量更新股票数据、查询股票行情。 设计的数据库方案兼容 QuantAll（全A解析）计算引擎。 触发条件：用户提到\"UpdateStock\"、\"创建股票数据库\"、\"更新股票数据\"、\"获取股票数据\"等。\n\nTags: latest:2.2.0\n\nVersion history:\n\nv2.2.0 | 2026-07-10T12:32:41.936Z | user\n\nupdate-stock-mcp v2.2.0\n\n- 移除了 skill-card.md 文件（不用的描述文件）。\n- 新增 license: MIT 字段到 SKILL.md，补充许可证信息。\n- SKILL.md 细节调整，完善了工具使用、说明和阶段描述，无功能变更。\n- 优化更新代码，减少不必要的环节，加快更新速度\n\nv2.1.0 | 2026-07-08T08:33:05.776Z | user\n\n**v1.0.1 Changelog**\n\n- Removed the skill-card.md file to clean up redundant documentation.\n- No functional or toolset changes; all existing database management and data query features remain unchanged.\n\nv1.0.0 | 2026-05-30T08:46:00.432Z | auto\n\nupdate-stock-mcp v1.0.0\n\n- Initial release.\n- Provides A-share DuckDB database management via UpdateStock script through stdio MCP.\n- Supports database creation and full/incremental stock data updates.\n- Basic MCP integration and configuration instructions included.\n\nArchive index:\n\nArchive v2.2.0: 6 files, 28895 bytes\n\nFiles: requirements.txt (104b), scripts/API_tushare.txt (0b), scripts/UpdateStock_skill.py (90806b), skill-card.md (2714b), SKILL.md (15392b), _meta.json (135b)\n\nFile v2.2.0:SKILL.md\n\n---\nname: update-stock-mcp\ndescription: >\n  UpdateStock MCP 服务技能 —— 通过 stdio 模式调用 UpdateStock 脚本，\n  提供 A 股 DuckDB 数据库管理功能：创建数据库、全量/增量更新股票数据、查询股票行情。\n  设计的数据库方案兼容 QuantAll（全A解析）计算引擎。\n  触发条件：用户提到\"UpdateStock\"、\"创建股票数据库\"、\"更新股票数据\"、\"获取股票数据\"等。\nagent_created: true\nlicense: MIT \n---\n\n# UpdateStock MCP 技能\n\n通过 stdio MCP 管理 A 股 DuckDB 数据库——创建、更新、查询股票行情数据。数据库方案兼容 QuantAll（全A解析）计算引擎。\n\n> 💡 **如需使用 QuantAll**：推荐安装 `QuantAll-mcp` 技能（`pip install quantall`），其中包含 QuantAll 的详细使用文档。本技能负责为其准备兼容的数据库。\n\n---\n\n## 安装前准备\n\n### 1. 填写 tushare API token\n\n技能目录下已包含 `API_tushare.txt`（空白文件），**请先填入你自己的 tushare API token**，否则无法获取 tushare 数据。\n\n获取方式：访问 https://tushare.pro/register 注册，登录后在个人中心复制 token，粘贴到 `API_tushare.txt` 中保存。\n\n> 即使不填 token，脚本仍可通过 baostock（免费，无需注册）获取部分数据。\n\n### 2. 安装 Python 依赖\n\n建议使用虚拟环境隔离：\n\n```bash\n# 在 scripts 目录下创建虚拟环境\n<你的Python路径> -m venv scripts/.venv\n\n# 用清华镜像源安装依赖\nscripts/.venv/Scripts/python.exe -m pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple\n```\n\n所需依赖（见 `requirements.txt`）：\n- `mcp` — MCP Python SDK（提供 FastMCP）\n- `pydantic` — 参数校验\n- `pandas` — 数据处理\n- `numpy` — 数值计算\n- `duckdb` — DuckDB 数据库引擎\n- `tushare` — A 股数据接口（需注册获取 API token）\n- `baostock` — 备用数据源（免费，无需 token）\n\n### 3. 配置 MCP（stdio 模式）\n\n在 `~/.workbuddy/mcp.json` 的 `mcpServers` 中添加：\n\n```json\n\"UpdateStock\": {\n  \"command\": \"C:/Users/<用户>/.workbuddy/skills/update-stock-mcp/scripts/.venv/Scripts/python.exe\",\n  \"args\": [\"C:/Users/<用户>/.workbuddy/skills/update-stock-mcp/scripts/UpdateStock_skill.py\"],\n  \"disabled\": false\n}\n```\n\n> 路径使用正斜杠 `/`，避免反斜杠转义问题。\n> 配置完成后需在 WorkBuddy 连接器管理中断开重连（或重启智能体），首次连接需点击「信任」。\n\n### 4. DB_setting.json（自动创建）\n\n技能包**不携带** `DB_setting.json`。UpdateStock 首次启动时检测到缺失会自动创建默认配置文件，默认连接同目录下的 `Test.duckdb`。\n\n> ⚠️ **Test.duckdb 仅供测试**：首次调用 `Creat_DB` 留空路径时自动创建，仅含基础表结构（无数据）。正式使用时请通过 `Creat_DB` 指定独立路径创建数据库。\n\n`DB_setting.json` 结构：\n\n```json\n{\n  \"db_path\": \"./Test.duckdb\",\n  \"days\": 730,\n  \"stock\": \"stock\",\n  \"map_stock\": { \"trade_date\": \"trade_date\", \"symbol\": \"symbol\", ... },\n  \"stock_index\": \"stock_index\",\n  \"map_stock_index\": { ... },\n  ...\n}\n```\n\n每个 `map_*` 字段定义了对应表的列名映射，用户使用自有数据库时修改这些映射即可适配实际字段名。\n\n---\n\n## 可用工具\n\n### mcp__UpdateStock__ping — 连接检测\n\n无参数。返回 `Pong` 表示服务正常。\n\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__ping\", params={})\n```\n\n### mcp__UpdateStock__Creat_DB — 创建数据库\n\n| 参数 | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| DB_path | string | `\"\"` | 数据库路径，留空则使用同目录下 `Test.duckdb` |\n\n创建的表：stock、stock_index、stock_basic、stock_factor、stock_forecast、stock_dividend、stock_report\n\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__Creat_DB\", params={\"DB_path\": \"\"})\n```\n\n### mcp__UpdateStock__Update_Stock_Data — 全量更新\n\n> ⚠️ **首次从 0 开始更新数据库耗时非常长（可能需数小时）**，请在空闲时运行，避免中途中断。\n> 需要 tushare 积分 2000+。\n\n| 参数 | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| ignore_check | boolean | `false` | 是否跳过部分检查 |\n\n数据库路径和 API key 自动从 `DB_setting.json` 和 `API_tushare.txt` 读取，无需手动传入。\n\n**7 个更新阶段**（每阶段持续发送 MCP 进度通知）：\n1. 指数数据（上证指数、深证成指）\n2. 股票行情（全市场日线）\n3. 基础数据（股票列表、公司信息）\n4. 行情因子（PE/PB/换手率/市值等每日指标）\n5. 业绩预告\n6. 分红\n7. 财报 / 财务指标\n\n> **阶段 7 特殊情况**：2000 积分接口不支持按日期批量获取财务指标，需先通过 `disclosure_date` 收集发布财报的股票清单，再逐只调用 `fina_indicator` 拉取。\n> - **非财报披露窗口**（如 5~7 月）清单可能为空，属正常现象——没有公司在这些月份披露新财报。\n> - **披露窗口**（3~4 月年报季、8 月中报季、10 月三季报季）可能涉及数千只股票，逐只拉取耗时数十分钟。\n> - v2.2 起内置**心跳机制**：每更新 10 只或超过 30 秒无输出，强制发送进度（含 ETA），防止 AI 因长时间无响应而误判 MCP 断连。\n>\n> **`table_date` 更新追踪**：数据库内置 `table_date` 表，记录 `stock_forecast`、`stock_dividend`、`stock_report` 三张表的最后更新日期（取上证指数 000001 最新交易日）。即使某阶段无新数据（skip），也会写入记录——下次运行时直接跳过，不再重复扫描缺失日期区间。\n\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__Update_Stock_Data\", params={\n  \"ignore_check\": false\n})\n```\n\n### mcp__UpdateStock__Update_Stock_Data_easy — 增量更新（精简版）\n\n> 适合 tushare 积分 120-200 的用户，仅更新指数行情和股票行情两张表。\n> 通过 baostock 获取指数数据 + tushare 获取股票日线。\n\n| 参数 | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| ignore_check | boolean | `false` | 是否跳过部分检查 |\n\n数据库路径和 API key 自动从 `DB_setting.json` 和 `API_tushare.txt` 读取。\n\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__Update_Stock_Data_easy\", params={\n  \"ignore_check\": false\n})\n```\n\n### mcp__UpdateStock__get_stock — 获取非复权股票行情\n\n从数据库查询指定股票、指定时间范围的非复权行情数据。\n\n| 参数 | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| symbol | string | `\"000001\"` | 股票代码（6位数字） |\n| start_date | string | `\"\"` | 开始日期，格式 `YYYY-MM-DD` |\n| end_date | string | `\"\"` | 截止日期，格式 `YYYY-MM-DD` |\n\n返回字段：trade_date, symbol, open, high, low, close, pre_close, vol, voe\n\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__get_stock\", params={\n  \"symbol\": \"000001\",\n  \"start_date\": \"2026-05-01\",\n  \"end_date\": \"2026-07-03\"\n})\n```\n\n### mcp__UpdateStock__get_adj_stock — 获取前复权股票行情\n\n从数据库查询指定股票、指定时间范围的前复权行情数据（已自动处理分红送股除权）。\n\n| 参数 | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| symbol | string | `\"000001\"` | 股票代码（6位数字） |\n| start_date | string | `\"\"` | 开始日期，格式 `YYYY-MM-DD` |\n| end_date | string | `\"\"` | 截止日期，格式 `YYYY-MM-DD` |\n\n返回字段：trade_date, symbol, open, high, low, close, vol, voe\n\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__get_adj_stock\", params={\n  \"symbol\": \"000001\",\n  \"start_date\": \"2026-05-01\",\n  \"end_date\": \"2026-07-03\"\n})\n```\n\n### mcp__UpdateStock__Start_QuantAll — 启动 QuantAll\n\n无参数。在 localhost:8686 启动 QuantAll HTTP MCP 服务。内置端口检测，防止重复启动。\n\n> 启动时会在 `scripts/` 目录下动态生成 `Start_QuantAll.py` 启动脚本，然后通过 subprocess 启动子进程。\n\n> ⚠️ **用户协议**：QuantAll 首次启动会弹出用户协议确认窗口。**在用户点击确认之前，除 `ping` 外的所有 QuantAll 工具都将被阻止**——这是金融技能的法律合规要求。启动后请尽快到桌面找到弹窗并点击确认。\n\n> ⚠️ **MCP 重连**：QuantAll 启动后，全A解析 MCP 连接需要断开重连才能生效。两种方式：①连接器管理页面手动重连（专家→连接器→自定义连接器→全A解析→断开→连接）；②重启智能体（推荐，自动重连所有 MCP）。\n\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__Start_QuantAll\", params={})\n```\n\n### mcp__UpdateStock__Set_QuantAll_DataBase — 设置数据库\n\n| 参数 | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| path | string | `\"\"` | 数据库路径 |\n| days | int | `730` | 加载天数（默认两年） |\n\n将数据库路径写入 `DB_setting.json`，QuantAll 下次启动时生效。\n\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__Set_QuantAll_DataBase\", params={\n  \"path\": \"D:/你的数据库路径/your_db.duckdb\",\n  \"days\": 730\n})\n```\n\n---\n\n## QuantAll 集成\n\n本技能管理的 DuckDB 数据库可直接作为 QuantAll 的数据源。如需使用 QuantAll：\n\n1. **安装 QuantAll**：推荐安装 `QuantAll-mcp` 技能（`pip install quantall`），该技能包含详细的 QuantAll 使用文档\n2. **准备数据库**：通过本技能的 `Creat_DB` + `Update_Stock_Data`（或 `Update_Stock_Data_easy`）创建并填充数据库\n3. **设置数据库路径**：调用 `Set_QuantAll_DataBase` 将数据库路径写入配置\n4. **启动 QuantAll**：调用 `Start_QuantAll` 启动服务（首次启动需确认用户协议弹窗）\n5. **配置 MCP**：在 `mcp.json` 中添加全A解析 HTTP MCP 配置：\n\n```json\n\"全A解析\": {\n  \"url\": \"http://127.0.0.1:8686/mcp\",\n  \"disabled\": false\n}\n```\n\n6. 重连全A解析 MCP（连接器页面或重启智能体），首次连接需点击「信任」\n\n---\n\n## 数据库方案\n\n### 方案 A：使用默认测试数据库（仅供功能验证）\n\n调用 `Creat_DB` 留空路径时自动创建 `Test.duckdb`，仅含 7 张空表结构。用于验证数据库连接和工具可用性。\n\n> ⚠️ **Test.duckdb 仅用于测试**，正式使用请通过方案 B/C 创建独立数据库。\n\n### 方案 B：通过 UpdateStock 创建完整数据库\n\n| 方案 | tushare积分 | 数据范围 | 调用工具 | 耗时 |\n|------|------------|----------|----------|------|\n| 完整版 | **2000+** | 全市场 5500+ 股票，全部表（行情/财务/因子/预告/分红/财报） | `Update_Stock_Data` | 首次数小时 |\n| 精简版 | **120-200**（免费认证即可获得） | 指数行情 + 股票行情（仅 OHLCV） | `Update_Stock_Data_easy` | 较快 |\n\n> **更新速度说明**：即使是增量更新也不快——部分数据需从最新缺失日期开始逐天确认是否有新数据，且 tushare 部分接口本身响应较慢。\n>\n> **心跳机制（v2.2+）**：阶段 7（财务指标）逐只拉取时，内置计数+时间双触发心跳——每 10 只或 30 秒无输出即发送进度。进度格式为 `财报拉取进度 1523/5530（27%）已耗时 5m12s 预计剩余 13m40s`，确保 AI 不会因长时间无响应而误判 MCP 断连或进程崩溃。\n>\n> **`table_date` 追踪（v2.2）**：`stock_forecast`、`stock_dividend`、`stock_report` 三张财报相关表在每次更新（含 skip）后自动记录上证指数最新交易日，下次增量运行时直接跳过——避免每轮都重复扫描数十个缺失日期区间。\n\n操作步骤：\n1. 调用 `Creat_DB` 创建独立数据库（指定新路径，**不要覆盖 Test.duckdb**）\n2. 调用 `Set_QuantAll_DataBase` 将新数据库路径写入设置\n3. 调用 `Update_Stock_Data` 或 `Update_Stock_Data_easy` 填充数据\n4. 重启 QuantAll 服务使新数据库生效\n\n### 方案 C：使用用户自有数据库\n\n如果用户已有 DuckDB 股票数据库，直接修改 `DB_setting.json` 中的 `db_path` 指向该数据库，并调整各表的 `map_*` 字段映射以匹配实际列名即可。\n\n---\n\n## 工作流程\n\n### 数据库创建与更新流程\n1. 调用 `ping` 确认 MCP 服务已连接\n2. 首次使用先调用 `Creat_DB` 创建独立数据库（不要用 Test.duckdb）\n3. 调用 `Set_QuantAll_DataBase` 设置数据库路径\n4. 根据 tushare 积分选择 `Update_Stock_Data`（2000+）或 `Update_Stock_Data_easy`（120-200）\n   - **首次全量更新耗时极长，请在空闲时段运行，避免中途中断**\n5. 检查返回信息确认操作结果\n\n### 数据查询流程\n1. 调用 `get_stock`（非复权）或 `get_adj_stock`（前复权）获取行情数据\n2. 指定股票代码和时间范围\n3. AI 可直接使用返回的 JSON 数据进行绘图、分析等操作\n\n### QuantAll 启动流程\n1. 确认 QuantAll 已安装（`pip install quantall`，推荐通过 `QuantAll-mcp` 技能安装）\n2. 确认 `mcp.json` 中已配置全A解析 HTTP MCP\n3. 调用 `Start_QuantAll` 启动服务\n4. 重连全A解析 MCP（连接器页面或重启智能体）\n5. 首次启动需确认用户协议弹窗\n6. 调用 `mcp__全A解析__ping` 验证\n\n---\n\n## 注意事项\n\n- 数据库路径和 API key 分别由 `DB_setting.json` 和 `API_tushare.txt` 管理，工具调用时无需手动传入\n- `DB_setting.json` 首次运行自动创建，默认连接同目录 `Test.duckdb`\n- tushare API token 放入 `API_tushare.txt`（纯文本，一行），避免每次输入\n- 查询无结果时返回友好提示字符串，而非报错\n- 返回的 trade_date 格式为 `YYYY-MM-DD` 字符串，方便 AI 直接解析\n- **pandas 3.x 兼容性**：pandas 3.0+ 中 `str` 类型不再是 `object`，日期处理代码需在 `pd.to_datetime()` 前先 `.astype(object)` 转换\n- Test.duckdb 仅供测试，正式使用务必创建独立数据库\n\n## 版本历史\n\n- **v2.2** — 阶段 7（财务指标）心跳优化：计数+时间双触发进度机制（每 10 只 / 30 秒），带 ETA 预估；修正 `disclosure_date` 按 `actual_date` 查询在非披露窗口返回 0 的说明（非 bug，正常行为）；修正频率限速逻辑；新增 `table_date` 更新追踪表——`stock_forecast`/`stock_dividend`/`stock_report` 三表在每次更新后记录上证指数最新交易日，skip 路径也写入，避免每轮重复扫描缺失日期区间；新增 `Updb.write_table_date()` 方法；\n- **v2.1** — 移除已废弃的 `Install_QuantAll` / `Uninstall_QuantAll` 工具（QuantAll 现通过 `pip install quantall` 安装）；精简 QuantAll 相关描述（推荐安装 `QuantAll-mcp` 技能）；修正依赖列表（移除不在 requirements.txt 中的 PySide6/PyOpenGL）；修正 Test.duckdb 说明（运行时创建，非技能包自带）；修正字段映射说明（`DB_setting.json` 的 `map_*` 替代 `db_translate.json`）\n- **v2.0** — 重写文档：以数据库管理为核心定位；更新工具签名匹配 async 新版本（`Update_Stock_Data` / `Update_Stock_Data_easy` 不再接收 `DB_path`/`API` 参数，改为自动读取配置文件）；新增进度通知说明；新增 MCP 重连和用户协议注意事项\n- **v1.1** — 新增 `get_stock` 和 `get_adj_stock` 工具，支持查询股票行情数据（支持时间范围过滤）\n- **v1.0** — 初始版本，支持数据库创建和全量/增量更新\n\nFile v2.2.0:_meta.json\n\n{\n  \"ownerId\": \"kn798etnj1hernzd0bqw4cg9yx86fkc9\",\n  \"slug\": \"update-stock-mcp\",\n  \"version\": \"2.2.0\",\n  \"publishedAt\": 1783686761936\n}\n\nFile v2.2.0:skill-card.md\n\n## Description:\n\nUpdateStock MCP manages A-share DuckDB stock databases over stdio, including database creation, full or incremental data updates, stock-market data queries, and QuantAll-compatible database setup.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[mifochen](https://clawhub.ai/user/mifochen)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers, quantitative analysts, and agent users use this skill to create and maintain local DuckDB databases for Chinese A-share market data, then query that data or prepare it for QuantAll analysis workflows.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The scanner reports real security and control issues that should be reviewed before installation.\n\nMitigation: Install and run the skill only in an isolated environment until the issues have been reviewed.\n\nRisk: The Tushare token is stored in a local plaintext file.\n\nMitigation: Keep the token out of shared folders and backups, and restrict file access to the user running the MCP server.\n\nRisk: The MCP server can expose or modify local DuckDB stock databases.\n\nMitigation: Use a dedicated database path with least-privilege filesystem access and avoid exposing sensitive DuckDB files through the server.\n\nRisk: Starting QuantAll launches a local HTTP MCP service.\n\nMitigation: Start QuantAll only when that local service is intended and trusted for the current session.\n\nRisk: Query inputs are not confirmed safe by the scanner guidance.\n\nMitigation: Treat query inputs as unsafe until SQL construction has been fixed, and avoid connecting the tool to untrusted callers.\n\nRisk: Dependencies are specified with lower bounds rather than pinned versions.\n\nMitigation: Prefer pinned dependencies in a virtual environment before deployment.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/mifochen/skills/update-stock-mcp)\n- [Tushare registration](https://tushare.pro/register)\n\n## Skill Output:\n\n**Output Type(s):** [text, JSON, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown guidance with MCP tool calls, JSON snippets, shell commands, and text or JSON tool responses]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May create or update local DuckDB databases and JSON configuration files when the MCP tools are executed.]\n\n## Skill Version(s):\n\n2.2.0 (source: server release metadata and release changelog)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v2.2.0:requirements.txt\n\nmcp>=1.26.0\npydantic>=2.0.0\npandas>=2.3.3\nnumpy>=1.24.0\nduckdb>=1.5.2\ntushare>=1.4.29\nbaostock>=0.9.1\n\nArchive v2.1.0: 6 files, 25784 bytes\n\nFiles: requirements.txt (104b), scripts/API_tushare.txt (0b), scripts/UpdateStock_skill.py (86088b), skill-card.md (2433b), SKILL.md (13280b), _meta.json (135b)\n\nFile v2.1.0:SKILL.md\n\n---\nname: update-stock-mcp\ndescription: >\n  UpdateStock MCP 服务技能 —— 通过 stdio 模式调用 UpdateStock 脚本，\n  提供 A 股 DuckDB 数据库管理功能：创建数据库、全量/增量更新股票数据、查询股票行情。\n  设计的数据库方案兼容 QuantAll（全A解析）计算引擎。\n  触发条件：用户提到\"UpdateStock\"、\"创建股票数据库\"、\"更新股票数据\"、\"获取股票数据\"等。\nagent_created: true\n---\n\n# UpdateStock MCP 技能\n\n通过 stdio MCP 管理 A 股 DuckDB 数据库——创建、更新、查询股票行情数据。数据库方案兼容 QuantAll（全A解析）计算引擎。\n\n> 💡 **如需使用 QuantAll**：推荐安装 `QuantAll-mcp` 技能（`pip install quantall`），其中包含 QuantAll 的详细使用文档。本技能负责为其准备兼容的数据库。\n\n---\n\n## 安装前准备\n\n### 1. 填写 tushare API token\n\n技能目录下已包含 `API_tushare.txt`（空白文件），**请先填入你自己的 tushare API token**，否则无法获取 tushare 数据。\n\n获取方式：访问 https://tushare.pro/register 注册，登录后在个人中心复制 token，粘贴到 `API_tushare.txt` 中保存。\n\n> 即使不填 token，脚本仍可通过 baostock（免费，无需注册）获取部分数据。\n\n### 2. 安装 Python 依赖\n\n建议使用虚拟环境隔离：\n\n```bash\n# 在 scripts 目录下创建虚拟环境\n<你的Python路径> -m venv scripts/.venv\n\n# 用清华镜像源安装依赖\nscripts/.venv/Scripts/python.exe -m pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple\n```\n\n所需依赖（见 `requirements.txt`）：\n- `mcp` — MCP Python SDK（提供 FastMCP）\n- `pydantic` — 参数校验\n- `pandas` — 数据处理\n- `numpy` — 数值计算\n- `duckdb` — DuckDB 数据库引擎\n- `tushare` — A 股数据接口（需注册获取 API token）\n- `baostock` — 备用数据源（免费，无需 token）\n\n### 3. 配置 MCP（stdio 模式）\n\n在 `~/.workbuddy/mcp.json` 的 `mcpServers` 中添加：\n\n```json\n\"UpdateStock\": {\n  \"command\": \"C:/Users/<用户>/.workbuddy/skills/update-stock-mcp/scripts/.venv/Scripts/python.exe\",\n  \"args\": [\"C:/Users/<用户>/.workbuddy/skills/update-stock-mcp/scripts/UpdateStock_skill.py\"],\n  \"disabled\": false\n}\n```\n\n> 路径使用正斜杠 `/`，避免反斜杠转义问题。\n> 配置完成后需在 WorkBuddy 连接器管理中断开重连（或重启智能体），首次连接需点击「信任」。\n\n### 4. DB_setting.json（自动创建）\n\n技能包**不携带** `DB_setting.json`。UpdateStock 首次启动时检测到缺失会自动创建默认配置文件，默认连接同目录下的 `Test.duckdb`。\n\n> ⚠️ **Test.duckdb 仅供测试**：首次调用 `Creat_DB` 留空路径时自动创建，仅含基础表结构（无数据）。正式使用时请通过 `Creat_DB` 指定独立路径创建数据库。\n\n`DB_setting.json` 结构：\n\n```json\n{\n  \"db_path\": \"./Test.duckdb\",\n  \"days\": 730,\n  \"stock\": \"stock\",\n  \"map_stock\": { \"trade_date\": \"trade_date\", \"symbol\": \"symbol\", ... },\n  \"stock_index\": \"stock_index\",\n  \"map_stock_index\": { ... },\n  ...\n}\n```\n\n每个 `map_*` 字段定义了对应表的列名映射，用户使用自有数据库时修改这些映射即可适配实际字段名。\n\n---\n\n## 可用工具\n\n### mcp__UpdateStock__ping — 连接检测\n\n无参数。返回 `Pong` 表示服务正常。\n\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__ping\", params={})\n```\n\n### mcp__UpdateStock__Creat_DB — 创建数据库\n\n| 参数 | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| DB_path | string | `\"\"` | 数据库路径，留空则使用同目录下 `Test.duckdb` |\n\n创建的表：stock、stock_index、stock_basic、stock_factor、stock_forecast、stock_dividend、stock_report\n\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__Creat_DB\", params={\"DB_path\": \"\"})\n```\n\n### mcp__UpdateStock__Update_Stock_Data — 全量更新\n\n> ⚠️ **首次从 0 开始更新数据库耗时非常长（可能需数小时）**，请在空闲时运行，避免中途中断。\n> 需要 tushare 积分 2000+。\n\n| 参数 | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| ignore_check | boolean | `false` | 是否跳过部分检查 |\n\n数据库路径和 API key 自动从 `DB_setting.json` 和 `API_tushare.txt` 读取，无需手动传入。\n\n**7 个更新阶段**（每阶段持续发送 MCP 进度通知）：\n1. 指数数据（上证指数、深证成指）\n2. 股票行情（全市场日线）\n3. 基础数据（股票列表、公司信息）\n4. 行情因子（PE/PB/换手率/市值等每日指标）\n5. 业绩预告\n6. 分红\n7. 财报（财务指标）\n\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__Update_Stock_Data\", params={\n  \"ignore_check\": false\n})\n```\n\n### mcp__UpdateStock__Update_Stock_Data_easy — 增量更新（精简版）\n\n> 适合 tushare 积分 120-200 的用户，仅更新指数行情和股票行情两张表。\n> 通过 baostock 获取指数数据 + tushare 获取股票日线。\n\n| 参数 | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| ignore_check | boolean | `false` | 是否跳过部分检查 |\n\n数据库路径和 API key 自动从 `DB_setting.json` 和 `API_tushare.txt` 读取。\n\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__Update_Stock_Data_easy\", params={\n  \"ignore_check\": false\n})\n```\n\n### mcp__UpdateStock__get_stock — 获取非复权股票行情\n\n从数据库查询指定股票、指定时间范围的非复权行情数据。\n\n| 参数 | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| symbol | string | `\"000001\"` | 股票代码（6位数字） |\n| start_date | string | `\"\"` | 开始日期，格式 `YYYY-MM-DD` |\n| end_date | string | `\"\"` | 截止日期，格式 `YYYY-MM-DD` |\n\n返回字段：trade_date, symbol, open, high, low, close, pre_close, vol, voe\n\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__get_stock\", params={\n  \"symbol\": \"000001\",\n  \"start_date\": \"2026-05-01\",\n  \"end_date\": \"2026-07-03\"\n})\n```\n\n### mcp__UpdateStock__get_adj_stock — 获取前复权股票行情\n\n从数据库查询指定股票、指定时间范围的前复权行情数据（已自动处理分红送股除权）。\n\n| 参数 | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| symbol | string | `\"000001\"` | 股票代码（6位数字） |\n| start_date | string | `\"\"` | 开始日期，格式 `YYYY-MM-DD` |\n| end_date | string | `\"\"` | 截止日期，格式 `YYYY-MM-DD` |\n\n返回字段：trade_date, symbol, open, high, low, close, vol, voe\n\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__get_adj_stock\", params={\n  \"symbol\": \"000001\",\n  \"start_date\": \"2026-05-01\",\n  \"end_date\": \"2026-07-03\"\n})\n```\n\n### mcp__UpdateStock__Start_QuantAll — 启动 QuantAll\n\n无参数。在 localhost:8686 启动 QuantAll HTTP MCP 服务。内置端口检测，防止重复启动。\n\n> 启动时会在 `scripts/` 目录下动态生成 `Start_QuantAll.py` 启动脚本，然后通过 subprocess 启动子进程。\n\n> ⚠️ **用户协议**：QuantAll 首次启动会弹出用户协议确认窗口。**在用户点击确认之前，除 `ping` 外的所有 QuantAll 工具都将被阻止**——这是金融技能的法律合规要求。启动后请尽快到桌面找到弹窗并点击确认。\n\n> ⚠️ **MCP 重连**：QuantAll 启动后，全A解析 MCP 连接需要断开重连才能生效。两种方式：①连接器管理页面手动重连（专家→连接器→自定义连接器→全A解析→断开→连接）；②重启智能体（推荐，自动重连所有 MCP）。\n\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__Start_QuantAll\", params={})\n```\n\n### mcp__UpdateStock__Set_QuantAll_DataBase — 设置数据库\n\n| 参数 | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| path | string | `\"\"` | 数据库路径 |\n| days | int | `730` | 加载天数（默认两年） |\n\n将数据库路径写入 `DB_setting.json`，QuantAll 下次启动时生效。\n\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__Set_QuantAll_DataBase\", params={\n  \"path\": \"D:/你的数据库路径/your_db.duckdb\",\n  \"days\": 730\n})\n```\n\n---\n\n## QuantAll 集成\n\n本技能管理的 DuckDB 数据库可直接作为 QuantAll 的数据源。如需使用 QuantAll：\n\n1. **安装 QuantAll**：推荐安装 `QuantAll-mcp` 技能（`pip install quantall`），该技能包含详细的 QuantAll 使用文档\n2. **准备数据库**：通过本技能的 `Creat_DB` + `Update_Stock_Data`（或 `Update_Stock_Data_easy`）创建并填充数据库\n3. **设置数据库路径**：调用 `Set_QuantAll_DataBase` 将数据库路径写入配置\n4. **启动 QuantAll**：调用 `Start_QuantAll` 启动服务（首次启动需确认用户协议弹窗）\n5. **配置 MCP**：在 `mcp.json` 中添加全A解析 HTTP MCP 配置：\n\n```json\n\"全A解析\": {\n  \"url\": \"http://127.0.0.1:8686/mcp\",\n  \"disabled\": false\n}\n```\n\n6. 重连全A解析 MCP（连接器页面或重启智能体），首次连接需点击「信任」\n\n---\n\n## 数据库方案\n\n### 方案 A：使用默认测试数据库（仅供功能验证）\n\n调用 `Creat_DB` 留空路径时自动创建 `Test.duckdb`，仅含 7 张空表结构。用于验证数据库连接和工具可用性。\n\n> ⚠️ **Test.duckdb 仅用于测试**，正式使用请通过方案 B/C 创建独立数据库。\n\n### 方案 B：通过 UpdateStock 创建完整数据库\n\n| 方案 | tushare积分 | 数据范围 | 调用工具 | 耗时 |\n|------|------------|----------|----------|------|\n| 完整版 | **2000+** | 全市场 5500+ 股票，全部表（行情/财务/因子/预告/分红/财报） | `Update_Stock_Data` | 首次数小时 |\n| 精简版 | **120-200**（免费认证即可获得） | 指数行情 + 股票行情（仅 OHLCV） | `Update_Stock_Data_easy` | 较快 |\n\n> **更新速度说明**：即使是增量更新也不快——部分数据需从最新缺失日期开始逐天确认是否有新数据，且 tushare 部分接口本身响应较慢。更新过程中会持续发送 MCP 进度通知。\n\n操作步骤：\n1. 调用 `Creat_DB` 创建独立数据库（指定新路径，**不要覆盖 Test.duckdb**）\n2. 调用 `Set_QuantAll_DataBase` 将新数据库路径写入设置\n3. 调用 `Update_Stock_Data` 或 `Update_Stock_Data_easy` 填充数据\n4. 重启 QuantAll 服务使新数据库生效\n\n### 方案 C：使用用户自有数据库\n\n如果用户已有 DuckDB 股票数据库，直接修改 `DB_setting.json` 中的 `db_path` 指向该数据库，并调整各表的 `map_*` 字段映射以匹配实际列名即可。\n\n---\n\n## 工作流程\n\n### 数据库创建与更新流程\n1. 调用 `ping` 确认 MCP 服务已连接\n2. 首次使用先调用 `Creat_DB` 创建独立数据库（不要用 Test.duckdb）\n3. 调用 `Set_QuantAll_DataBase` 设置数据库路径\n4. 根据 tushare 积分选择 `Update_Stock_Data`（2000+）或 `Update_Stock_Data_easy`（120-200）\n   - **首次全量更新耗时极长，请在空闲时段运行，避免中途中断**\n5. 检查返回信息确认操作结果\n\n### 数据查询流程\n1. 调用 `get_stock`（非复权）或 `get_adj_stock`（前复权）获取行情数据\n2. 指定股票代码和时间范围\n3. AI 可直接使用返回的 JSON 数据进行绘图、分析等操作\n\n### QuantAll 启动流程\n1. 确认 QuantAll 已安装（`pip install quantall`，推荐通过 `QuantAll-mcp` 技能安装）\n2. 确认 `mcp.json` 中已配置全A解析 HTTP MCP\n3. 调用 `Start_QuantAll` 启动服务\n4. 重连全A解析 MCP（连接器页面或重启智能体）\n5. 首次启动需确认用户协议弹窗\n6. 调用 `mcp__全A解析__ping` 验证\n\n---\n\n## 注意事项\n\n- 数据库路径和 API key 分别由 `DB_setting.json` 和 `API_tushare.txt` 管理，工具调用时无需手动传入\n- `DB_setting.json` 首次运行自动创建，默认连接同目录 `Test.duckdb`\n- tushare API token 放入 `API_tushare.txt`（纯文本，一行），避免每次输入\n- 查询无结果时返回友好提示字符串，而非报错\n- 返回的 trade_date 格式为 `YYYY-MM-DD` 字符串，方便 AI 直接解析\n- **pandas 3.x 兼容性**：pandas 3.0+ 中 `str` 类型不再是 `object`，日期处理代码需在 `pd.to_datetime()` 前先 `.astype(object)` 转换\n- Test.duckdb 仅供测试，正式使用务必创建独立数据库\n\n## 版本历史\n\n- **v2.1** — 移除已废弃的 `Install_QuantAll` / `Uninstall_QuantAll` 工具（QuantAll 现通过 `pip install quantall` 安装）；精简 QuantAll 相关描述（推荐安装 `QuantAll-mcp` 技能）；修正依赖列表（移除不在 requirements.txt 中的 PySide6/PyOpenGL）；修正 Test.duckdb 说明（运行时创建，非技能包自带）；修正字段映射说明（`DB_setting.json` 的 `map_*` 替代 `db_translate.json`）\n- **v2.0** — 重写文档：以数据库管理为核心定位；更新工具签名匹配 async 新版本（`Update_Stock_Data` / `Update_Stock_Data_easy` 不再接收 `DB_path`/`API` 参数，改为自动读取配置文件）；新增进度通知说明；新增 MCP 重连和用户协议注意事项\n- **v1.1** — 新增 `get_stock` 和 `get_adj_stock` 工具，支持查询股票行情数据（支持时间范围过滤）\n- **v1.0** — 初始版本，支持数据库创建和全量/增量更新\n\nFile v2.1.0:_meta.json\n\n{\n  \"ownerId\": \"kn798etnj1hernzd0bqw4cg9yx86fkc9\",\n  \"slug\": \"update-stock-mcp\",\n  \"version\": \"2.1.0\",\n  \"publishedAt\": 1783499585776\n}\n\nFile v2.1.0:skill-card.md\n\n## Description: <br>\nUpdate Stock MCP manages an A-share DuckDB database through MCP tools for creating databases, running full or incremental stock-data updates, querying stock prices, and preparing QuantAll-compatible data. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[mifochen](https://clawhub.ai/user/mifochen) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers, analysts, and agent users can use this skill to maintain a local A-share market database, refresh stock data from supported data providers, query price history, and connect the prepared database to QuantAll workflows. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill stores the user's tushare token in a plaintext local file. <br>\nMitigation: Use a dedicated local environment, restrict access to the skill directory, and rotate or remove the token when it is no longer needed. <br>\nRisk: The skill writes local DuckDB and configuration files. <br>\nMitigation: Choose an explicit database path for production use, review configuration changes, and avoid relying on the default test database for real workflows. <br>\nRisk: The skill can start a local QuantAll MCP service on localhost:8686. <br>\nMitigation: Start QuantAll only when the local service is intended, confirm the user agreement when prompted, and stop or disable the service when finished. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/mifochen/skills/update-stock-mcp) <br>\n- [Tushare registration](https://tushare.pro/register) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown guidance with MCP tool calls, JSON configuration snippets, status text, and tabular stock-query data] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Produces local database files and configuration updates; some update operations can run for hours and may emit progress notifications.] <br>\n\n## Skill Version(s): <br>\n2.1.0 (source: server release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v2.1.0:requirements.txt\n\nmcp>=1.26.0\npydantic>=2.0.0\npandas>=2.3.3\nnumpy>=1.24.0\nduckdb>=1.5.2\ntushare>=1.4.29\nbaostock>=0.9.1\n\nArchive v1.0.0: 6 files, 19448 bytes\n\nFiles: requirements.txt (101b), scripts/API_tushare.txt (0b), scripts/UpdateStock_skill.py (70399b), skill-card.md (2602b), SKILL.md (6434b), _meta.json (135b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: update-stock-mcp\ndescription: >\n  UpdateStock MCP 服务技能 v1.1 —— 通过 stdio 模式调用 UpdateStock 脚本，\n  提供 A 股 DuckDB 数据库管理功能：创建数据库、全量/增量更新股票数据、查询股票行情。\n  触发条件：用户提到\"UpdateStock\"、\"创建股票数据库\"、\"更新股票数据\"、\"获取股票数据\"、\"ping 股票服务\"等。\nagent_created: true\n---\n\n# UpdateStock MCP 技能 v1.1\n\n通过 stdio MCP 工具调用 UpdateStock 脚本，管理 A 股 DuckDB 数据库。\n\n## 安装前准备\n\n### 1. 填写 tushare API token\n\n技能目录下已包含 `API_tushare.txt`（空白文件），**请先填入你自己的 tushare API token**，否则无法获取 tushare 数据。\n\n获取方式：访问 https://tushare.pro/register 注册，登录后在个人中心复制 token，粘贴到 `API_tushare.txt` 中保存。\n\n> 即使不填 token，脚本仍可通过 baostock（免费，无需注册）获取部分数据。\n\n### 2. 安装 Python 依赖\n\n在技能目录下运行：\n\n```bash\npip install -r requirements.txt\n```\n\n所需依赖：\n- `pandas` — 数据处理\n- `numpy` — 数值计算\n- `duckdb` — DuckDB 数据库引擎\n- `tushare` — A 股数据接口（需注册获取 API token）\n- `baostock` — 备用数据源（免费，无需 token）\n- `mcp` — MCP Python SDK（提供 FastMCP）\n- `pydantic` — 参数校验\n\n### 3. 配置 MCP（stdio 模式）\n\n在 `~/.workbuddy/mcp.json` 的 `mcpServers` 中添加：\n\n```json\n\"UpdateStock\": {\n  \"command\": \"python\",\n  \"args\": [\"<skill-dir>/scripts/UpdateStock_skill.py\"],\n  \"disabled\": false\n}\n```\n\n> `<skill-dir>` 替换为技能实际路径，如 `C:/Users/CMF/.workbuddy/skills/update-stock-mcp/scripts/UpdateStock_skill.py`\n> 若系统 `python` 命令指向不正确，可替换为完整路径，如 `C:/Python312/python.exe`\n\n配置完成后需重启 WorkBuddy 使 MCP 服务生效。\n\n## 可用工具\n\n### mcp__UpdateStock__ping — 连接检测\n\n无参数。返回 `Pong` 表示服务正常。\n\n调用方式：\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__ping\", params={})\n```\n\n### mcp__UpdateStock__Creat_DB — 创建数据库\n\n| 参数 | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| DB_path | string | `\"\"` | 数据库路径，留空则使用同目录下 `Test.duckdb` |\n\n创建的表：stock、stock_index、stock_basic、stock_factor、stock_forecast、stock_dividend、stock_report\n\n调用方式：\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__Creat_DB\", params={\"DB_path\": \"\"})\n```\n\n### mcp__UpdateStock__Update_Stock_Data — 全量更新\n\n> ⚠️ **首次从 0 开始更新数据库耗时非常长（可能需数小时）**，请在空闲时运行，避免中途中断。\n> 需要 tushare 积分 2000+。\n\n| 参数 | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| DB_path | string | `\"\"` | 留空自动查找 `Test.duckdb` |\n| API | string | `\"\"` | tushare token，留空读取同目录 `API_tushare.txt` |\n| ignore_check | boolean | `false` | 是否跳过部分检查 |\n\n调用方式：\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__Update_Stock_Data\", params={\n  \"DB_path\": \"\",\n  \"API\": \"\",\n  \"ignore_check\": false\n})\n```\n\n### mcp__UpdateStock__Update_Stock_Data_easy — 增量更新\n\n> 适合 tushare 积分 120 的用户，仅更新指数行情和股票行情两张表。\n\n| 参数 | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| DB_path | string | `\"\"` | 留空自动查找 `Test.duckdb` |\n| API | string | `\"\"` | tushare token，留空读取同目录 `API_tushare.txt` |\n\n调用方式：\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__Update_Stock_Data_easy\", params={\n  \"DB_path\": \"\",\n  \"API\": \"\"\n})\n```\n\n### mcp__UpdateStock__get_stock — 获取非复权股票行情\n\n从数据库查询指定股票、指定时间范围的非复权行情数据。\n\n| 参数 | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| symbol | string | `\"000001\"` | 股票代码（6位数字） |\n| DB_path | string | `\"\"` | 数据库路径，留空自动查找 `Test.duckdb` |\n| start_date | string | `\"\"` | 开始日期，格式 `YYYY-MM-DD` |\n| end_date | string | `\"\"` | 截止日期，格式 `YYYY-MM-DD` |\n\n返回字段：trade_date, symbol, open, high, low, close, pre_close, vol, voe\n\n调用方式：\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__get_stock\", params={\n  \"symbol\": \"000001\",\n  \"DB_path\": \"\",\n  \"start_date\": \"2026-05-01\",\n  \"end_date\": \"2026-05-19\"\n})\n```\n\n### mcp__UpdateStock__get_adj_stock — 获取前复权股票行情\n\n从数据库查询指定股票、指定时间范围的前复权行情数据（已自动处理分红送股除权）。\n\n| 参数 | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| symbol | string | `\"000001\"` | 股票代码（6位数字） |\n| DB_path | string | `\"\"` | 数据库路径，留空自动查找 `Test.duckdb` |\n| start_date | string | `\"\"` | 开始日期，格式 `YYYY-MM-DD` |\n| end_date | string | `\"\"` | 截止日期，格式 `YYYY-MM-DD` |\n\n返回字段：trade_date, symbol, open, high, low, close, vol, voe\n\n调用方式：\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__get_adj_stock\", params={\n  \"symbol\": \"000001\",\n  \"DB_path\": \"\",\n  \"start_date\": \"2026-05-01\",\n  \"end_date\": \"2026-05-19\"\n})\n```\n\n## 工作流程\n\n### 数据更新流程\n1. 调用 `ping` 确认 MCP 服务已连接\n2. 首次使用先调用 `Creat_DB` 创建数据库\n3. 根据 tushare 积分选择 `Update_Stock_Data`（2000+）或 `Update_Stock_Data_easy`（120）\n   - **首次全量更新耗时极长，请在空闲时段运行，避免中途中断**\n4. 检查返回信息确认操作结果\n\n### 数据查询流程\n1. 调用 `get_stock`（非复权）或 `get_adj_stock`（前复权）获取行情数据\n2. 指定股票代码和时间范围\n3. AI 可直接使用返回的 JSON 数据进行绘图、分析等操作\n\n## 注意事项\n\n- 脚本优先使用【全A解析】的数据库，缺失时才使用 `DB_path` 指定的路径\n- tushare API token 可放入脚本同目录 `API_tushare.txt`，避免每次输入\n- 查询无结果时返回友好提示字符串，而非报错\n- 返回的 trade_date 格式为 `YYYY-MM-DD` 字符串，方便 AI 直接解析\n\n## 版本历史\n\n- **v1.1** - 新增 `get_stock` 和 `get_adj_stock` 工具，支持查询股票行情数据（支持时间范围过滤）\n- **v1.0** - 初始版本，支持数据库创建和全量/增量更新\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn798etnj1hernzd0bqw4cg9yx86fkc9\",\n  \"slug\": \"update-stock-mcp\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1780130760432\n}\n\nFile v1.0.0:skill-card.md\n\n## Description: <br>\nUpdate Stock MCP runs a stdio MCP server that manages a local A-share DuckDB database, including database creation, full or incremental stock-data updates, and stock-price queries. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[mifochen](https://clawhub.ai/user/mifochen) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers, analysts, and agent operators use this skill to configure an UpdateStock MCP server, create or update a local DuckDB database for A-share market data, and query adjusted or unadjusted stock price records. <br>\n\n### Deployment Geography for Use: <br>\nGlobal; the data scope is focused on A-share market data. <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Create and update tools make persistent local changes to DuckDB database files and full updates may run for a long time. <br>\nMitigation: Use a dedicated DB_path, confirm before running create or update tools, and schedule full updates during idle periods. <br>\nRisk: The Tushare API token may be stored in API_tushare.txt or passed as a tool parameter. <br>\nMitigation: Keep API_tushare.txt private, avoid committing or syncing it, and prefer a token with only the access needed for this workflow. <br>\nRisk: Update operations may contact Tushare or Baostock and depend on provider availability, account points, and network access. <br>\nMitigation: Install only when provider access is expected, and choose the full or easy update path based on the available Tushare points. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/mifochen/update-stock-mcp) <br>\n- [Tushare registration](https://tushare.pro/register) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Guidance, Configuration, Shell commands, API Calls, Text] <br>\n**Output Format:** [Markdown instructions with shell snippets, MCP tool-call examples, and JSON-compatible tool responses] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [The MCP tools can create and update local DuckDB files, read a local Tushare token file, contact Tushare or Baostock providers, and return stock records or status strings.] <br>\n\n## Skill Version(s): <br>\n1.0.0 (source: server release metadata; artifact documentation labels the skill content as v1.1) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.0:requirements.txt\n\npandas>=2.0.0\nnumpy>=1.24.0\nduckdb>=0.10.0\ntushare>=1.2.0\nbaostock>=0.8.0\nmcp>=1.0.0\npydantic>=2.0.0","readmeExcerpt":"Skill: Update Stock Mcp Owner: mifochen Summary: UpdateStock MCP 服务技能 —— 通过 stdio 模式调用 UpdateStock 脚本， 提供 A 股 DuckDB 数据库管理功能：创建数据库、全量/增量更新股票数据、查询股票行情。 设计的数据库方案兼容 QuantAll（全A解析）计算引擎。 触发条件：用户提到\"UpdateStock\"、\"创建股票数据库\"、\"更新股票数据\"、\"获取股票数据\"等。 Tags: latest:2.2.0 Version history: v2.2.0 | 2026-07-10T12:32:41.936Z | user update-stock-mcp v2.2.0 - 移除了 skill-card.md 文件（不用的描述文件）。 - 新增 license: MIT 字段到 SKILL.md，补充许可证信息。 - SKILL.md ","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"# 在 scripts 目录下创建虚拟环境\n<你的Python路径> -m venv scripts/.venv\n\n# 用清华镜像源安装依赖\nscripts/.venv/Scripts/python.exe -m pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple"},{"language":"json","snippet":"\"UpdateStock\": {\n  \"command\": \"C:/Users/<用户>/.workbuddy/skills/update-stock-mcp/scripts/.venv/Scripts/python.exe\",\n  \"args\": [\"C:/Users/<用户>/.workbuddy/skills/update-stock-mcp/scripts/UpdateStock_skill.py\"],\n  \"disabled\": false\n}"},{"language":"json","snippet":"{\n  \"db_path\": \"./Test.duckdb\",\n  \"days\": 730,\n  \"stock\": \"stock\",\n  \"map_stock\": { \"trade_date\": \"trade_date\", \"symbol\": \"symbol\", ... },\n  \"stock_index\": \"stock_index\",\n  \"map_stock_index\": { ... },\n  ...\n}"},{"language":"text","snippet":"DeferExecuteTool(toolName=\"mcp__UpdateStock__ping\", params={})"},{"language":"text","snippet":"DeferExecuteTool(toolName=\"mcp__UpdateStock__Creat_DB\", params={\"DB_path\": \"\"})"},{"language":"text","snippet":"DeferExecuteTool(toolName=\"mcp__UpdateStock__Update_Stock_Data\", params={\n  \"ignore_check\": false\n})"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: update-stock-mcp\ndescription: >\n  UpdateStock MCP 服务技能 —— 通过 stdio 模式调用 UpdateStock 脚本，\n  提供 A 股 DuckDB 数据库管理功能：创建数据库、全量/增量更新股票数据、查询股票行情。\n  设计的数据库方案兼容 QuantAll（全A解析）计算引擎。\n  触发条件：用户提到\"UpdateStock\"、\"创建股票数据库\"、\"更新股票数据\"、\"获取股票数据\"等。\nagent_created: true\nlicense: MIT \n---\n\n# UpdateStock MCP 技能\n\n通过 stdio MCP 管理 A 股 DuckDB 数据库——创建、更新、查询股票行情数据。数据库方案兼容 QuantAll（全A解析）计算引擎。\n\n> 💡 **如需使用 QuantAll**：推荐安装 `QuantAll-mcp` 技能（`pip install quantall`），其中包含 QuantAll 的详细使用文档。本技能负责为其准备兼容的数据库。\n\n---\n\n## 安装前准备\n\n### 1. 填写 tushare API token\n\n技能目录下已包含 `API_tushare.txt`（空白文件），**请先填入你自己的 tushare API token**，否则无法获取 tushare 数据。\n\n获取方式：访问 https://tushare.pro/register 注册，登录后在个人中心复制 token，粘贴到 `API_tushare.txt` 中保存。\n\n> 即使不填 token，脚本仍可通过 baostock（免费，无需注册）获取部分数据。\n\n### 2. 安装 Python 依赖\n\n建议使用虚拟环境隔离：\n\n```bash\n# 在 scripts 目录下创建虚拟环境\n<你的Python路径> -m venv scripts/.venv\n\n# 用清华镜像源安装依赖\nscripts/.venv/Scripts/python.exe -m pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple\n```\n\n所需依赖（见 `requirements.txt`）：\n- `mcp` — MCP Python SDK（提供 FastMCP）\n- `pydantic` — 参数校验\n- `pandas` — 数据处理\n- `numpy` — 数值计算\n- `duckdb` — DuckDB 数据库引擎\n- `tushare` — A 股数据接口（需注册获取 API token）\n- `baostock` — 备用数据源（免费，无需 token）\n\n### 3. 配置 MCP（stdio 模式）\n\n在 `~/.workbuddy/mcp.json` 的 `mcpServers` 中添加：\n\n```json\n\"UpdateStock\": {\n  \"command\": \"C:/Users/<用户>/.workbuddy/skills/update-stock-mcp/scripts/.venv/Scripts/python.exe\",\n  \"args\": [\"C:/Users/<用户>/.workbuddy/skills/update-stock-mcp/scripts/UpdateStock_skill.py\"],\n  \"disabled\": false\n}\n```\n\n> 路径使用正斜杠 `/`，避免反斜杠转义问题。\n> 配置完成后需在 WorkBuddy 连接器管理中断开重连（或重启智能体），首次连接需点击「信任」。\n\n### 4. DB_setting.json（自动创建）\n\n技能包**不携带** `DB_setting.json`。UpdateStock 首次启动时检测到缺失会自动创建默认配置文件，默认连接同目录下的 `Test.duckdb`。\n\n> ⚠️ **Test.duckdb 仅供测试**：首次调用 `Creat_DB` 留空路径时自动创建，仅含基础表结构（无数据）。正式使用时请通过 `Creat_DB` 指定独立路径创建数据库。\n\n`DB_setting.json` 结构：\n\n```json\n{\n  \"db_path\": \"./Test.duckdb\",\n  \"days\": 730,\n  \"stock\": \"stock\",\n  \"map_stock\": { \"trade_date\": \"trade_date\", \"symbol\": \"symbol\", ... },\n  \"stock_index\": \"stock_index\",\n  \"map_stock_index\": { ... },\n  ...\n}\n```\n\n每个 `map_*` 字段定义了对应表的列名映射，用户使用自有数据库时修改这些映射即可适配实际字段名。\n\n---\n\n## 可用工具\n\n### mcp__UpdateStock__ping — 连接检测\n\n无参数。返回 `Pong` 表示服务正常。\n\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__ping\", params={})\n```\n\n### mcp__UpdateStock__Creat_DB — 创建数据库\n\n| 参数 | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| DB_path | string | `\"\"` | 数据库路径，留空则使用同目录下 `Test.duckdb` |\n\n创建的表：stock、stock_index、stock_basic、stock_factor、stock_forecast、stock_dividend、stock_report\n\n```\nDeferExecuteTool(toolName=\"mcp__UpdateStock__Creat_DB\", params={\"DB_path\": \"\"})\n```\n\n### mcp__UpdateStock__Update_Stock_Data — 全量更新\n\n> ⚠️ **首次从 0 开始更新数据库耗时非常长（可能需数小时）**，请在空闲时运行，避免中途中断。\n> 需要 tushare 积分 2000+。\n\n| 参数 | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| ignore_check | boolean | `false` | 是否跳过部分检查 |\n\n数据库路径和 API key 自动从 `DB_setting.json` 和 `API_tushare.txt` 读取，无需手动传入。\n\n**7 个更新阶段**（每阶段持续发送 MCP 进度通知）：\n1. 指数数据（上证指数、深证成指）\n2. 股票行情（全市场日线）\n3. 基础数据（股票列表、公司信息）\n4. 行情因子（PE/PB/换手率/市值等每日指标）\n5. 业绩预告\n6."},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn798etnj1hernzd0bqw4cg9yx86fkc9\",\n  \"slug\": \"update-stock-mcp\",\n  \"version\": \"2.2.0\",\n  \"publishedAt\": 1783686761936\n}"},{"path":"skill-card.md","content":"## Description:\n\nUpdateStock MCP manages A-share DuckDB stock databases over stdio, including database creation, full or incremental data updates, stock-market data queries, and QuantAll-compatible database setup.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[mifochen](https://clawhub.ai/user/mifochen)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers, quantitative analysts, and agent users use this skill to create and maintain local DuckDB databases for Chinese A-share market data, then query that data or prepare it for QuantAll analysis workflows.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The scanner reports real security and control issues that should be reviewed before installation.\n\nMitigation: Install and run the skill only in an isolated environment until the issues have been reviewed.\n\nRisk: The Tushare token is stored in a local plaintext file.\n\nMitigation: Keep the token out of shared folders and backups, and restrict file access to the user running the MCP server.\n\nRisk: The MCP server can expose or modify local DuckDB stock databases.\n\nMitigation: Use a dedicated database path with least-privilege filesystem access and avoid exposing sensitive DuckDB files through the server.\n\nRisk: Starting QuantAll launches a local HTTP MCP service.\n\nMitigation: Start QuantAll only when that local service is intended and trusted for the current session.\n\nRisk: Query inputs are not confirmed safe by the scanner guidance.\n\nMitigation: Treat query inputs as unsafe until SQL construction has been fixed, and avoid connecting the tool to untrusted callers.\n\nRisk: Dependencies are specified with lower bounds rather than pinned versions.\n\nMitigation: Prefer pinned dependencies in a virtual environment before deployment.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/mifochen/skills/update-stock-mcp)\n- [Tushare registration](https://tushare.pro/register)\n\n## Skill Output:\n\n**Output Type(s):** [text, JSON, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown guidance with MCP tool calls, JSON snippets, shell commands, and text or JSON tool responses]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May create or update local DuckDB databases and JSON configuration files when the MCP tools are executed.]\n\n## Skill Version(s):\n\n2.2.0 (source: server release metadata and release changelog)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."},{"path":"requirements.txt","content":"mcp>=1.26.0\npydantic>=2.0.0\npandas>=2.3.3\nnumpy>=1.24.0\nduckdb>=1.5.2\ntushare>=1.4.29\nbaostock>=0.9.1"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"UpdateStock MCP 服务技能 —— 通过 stdio 模式调用 UpdateStock 脚本， 提供 A 股 DuckDB 数据库管理功能：创建数据库、全量/增量更新股票数据、查询股票行情。 设计的数据库方案兼容 QuantAll（全A解析）计算引擎。 触发条件：用户提到\"UpdateStock\"、\"创建股票数据库\"、\"更新股票数据\"、\"获取股票数据\"等。 Skill: Update Stock Mcp Owner: mifochen Summary: UpdateStock MCP 服务技能 —— 通过 stdio 模式调用 UpdateStock 脚本， 提供 A 股 DuckDB 数据库管理功能：创建数据库、全量/增量更新股票数据、查询股票行情。 设计的数据库方案兼容 QuantAll（全A解析）计算引擎。 触发条件：用户提到\"UpdateStock\"、\"创建股票数据库\"、\"更新股票数据\"、\"获取股票数据\"等。 Tags: latest:2.2.0 Version history: v2.2.0 | 2026-07-10T12:32:41.936Z | user update-stock-mcp v2.2.0 - 移除了 skill-card.md 文件（不用的描述文件）。 - 新增 license: MIT 字段到 SKILL.md，补充许可证信息。 - SKILL.md","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":972,"uniquenessScore":52,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T09:23:20.787Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-11T09:23:20.787Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-11T11:24:27.609Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}