wechat-devtools
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "wechat-devtools":https://skillpi.com/zh/skills/deepskill-503b7328365e3b68f2cd0d235827d6f48ea782aba4b57e3ba16e0b591a73464e。安装前核对上游来源和版本:https://github.com/WaterTian/wechat-devtools-mcp。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
微信开发者工具 MCP:用于小程序的构建、预览、调试与自动化测试。
介绍来源: third_party · WaterTian · 0.9.20 参考来源
SkillPi 解读
- 能完成的任务
- 微信开发者工具 MCP —— 小程序构建、预览、调试与自动化测试
- 输入和输出
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: wechat-devtools
version: 0.9.20
description: 微信开发者工具 MCP —— 小程序构建、预览、调试与自动化测试Wechat DevTools MCP Skill (v0.9.20)
前置条件
Step 0:安装与配置
pip install uv
uv tool install wechat-devtools-mcp # 升级:uv tool install wechat-devtools-mcp --force --refresh
{
"mcpServers": {
"wechat-devtools-mcp": {
"command": "uvx",
"args": ["wechat-devtools-mcp"],
"env": {
"WECHAT_DEVTOOLS_CLI": "C:\\Program Files (x86)\\Tencent\\微信web开发者工具\\cli.bat",
"WECHAT_PROJECT_PATH": "D:\\Your\\Project\\Path"
}
}
}
}
- 注册名用
wechat-devtools-mcp(开发者工具 2.x 把自家 MCP bridge 注册成wechat-devtools,同名会被覆盖)。macOS CLI 路径/Applications/wechatwebdevtools.app/Contents/MacOS/cli。各编辑器配置见 README。 - 必须开启服务端口:
设置 → 安全设置 → 服务端口。未开启则所有 CLI 操作报CLI_TIMEOUT。 - 9222 常被 Chrome 占用的机器在
env加"WECHAT_CDP_PORT": "9333";Node.js 须 ≥ 18。
Step 1:运行时环境检查
先调 wechat_ide(action='status') 一次确认全部前置条件:
| 检查项 | 字段 | 失败时 |
|---|---|---|
| CLI 已安装 | cli_exists: true |
配置 WECHAT_DEVTOOLS_CLI |
| 服务端口已开启 | service_port_enabled: true |
false 必然 CLI_TIMEOUT,去设置里打开;null 是读不到,不等于关闭 |
| 项目路径有效 | project_exists: true |
配置 WECHAT_PROJECT_PATH,须指向含 project.config.json 的根目录 |
| Node.js 可用 | node_available: true |
安装 Node.js ≥ 18 |
| CDP 端口没被别人占 | cdp_port_occupant.kind 为 none / ide |
foreign(常见是 Chrome)→ open(cdp_port=9333) 或设 WECHAT_CDP_PORT |
| 项目窗口活着 | project_window_open: true(IDE 带 CDP 跑着时才有值,否则 null) |
false → start 会顺手重开窗口 |
| 版本一致 | skill_version == mcp_version(status 自动读项目内 skill 副本,不一致 message 会提示) |
uv tool upgrade wechat-devtools-mcp 或同步 skill 副本 |
| 已登录 | is_login → logged_in: true |
login(qr_format='terminal') 扫码 |
| 官方内建 MCP | official_mcp.available |
见下方分流规则 |
环境分流规则(IDE 2.x 内建 MCP)
开发者工具 2.x(2026-08-18 起为官方 Stable)在 http://127.0.0.1:<ide_port>/mcp 内建 MCP Server(47 个原子工具,2 个已废弃)。official_mcp.available: true 且官方 MCP 已接入当前 agent 时:
| 操作 | 交给谁 |
|---|---|
| 开关项目、登录、编译、预览、上传、build npm、点击/输入/滚动、云开发 | 官方工具优先,同一操作不要两边各做一遍 |
| 长图拼接截图 | 本 skill。官方 simulator_screenshot 只截视口且压到长边 1280 JPEG |
CDP 结构化日志(inspector cdp / navigate) |
本 skill。能回放采集前的历史消息并过滤噪音 |
| SOP C / D / I / J 任务级流程 | 本 skill 编排,基础步骤可调官方工具 |
available: false(1.06、IDE 未启动、端口漂移)或官方 MCP 未接入时,本 skill 承接全部能力,不要让用户为基础操作去装官方 MCP。
效率原则
- IDE 只在会话开始
open一次;改了代码只需compile→page_data(自动重连 automator),不要重新 open。 - 没改代码换页面用
evaluate(fn_source="function(){ wx.reLaunch({url:'/pages/x/index'}); return 'ok' }")→page_data。 - 连接断开时 automator 动作 /
navigate/screenshot会自动start一次并重试(返回auto_recovered;有副作用的tap/input/call_method只在连接阶段失败时重试)。仍失败再手动start→page_data,不要直接走完整恢复。
API 速查表
完整参数与返回字段见 tool_reference.md。
wechat_ide
| action | 功能 | 关键参数 / 返回 |
|---|---|---|
open |
启动 IDE 并打开项目。cdp_enabled=true(默认)先检查 cdp_port 上是谁:被别的浏览器占着直接报错不杀 IDE;否则 kill 已运行的 IDE、带 CDP 端口重启,等小程序 target 就绪后做启动健康检查 |
cdp_port(默认 WECHAT_CDP_PORT 或 9222;成功后同会话 inspector/navigate/compile 不传即沿用);返回 ide_runtime、cdp_ready、project_opened;有 error 时 success:false + startup_errors |
login / is_login |
扫码登录 / 查登录态 | qr_format;logged_in |
close / quit |
关项目窗口 / 退出 IDE(等进程真正消失,上限 10s) | quit 返回 exited |
status |
环境诊断 | service_port_enabled、ide_port、official_mcp、mcp_version、skill_version(项目内副本,不一致给 hint)、cdp_port / cdp_port_occupant(端口上是 IDE 还是别的浏览器)、project_window_open |
wechat_build
| action | 功能 | 关键参数 / 返回 |
|---|---|---|
compile |
编译并捕获 Error/Warning,成功后自动重连 automator(仅默认 9420) | cdp_port;返回 errors、warnings、wxml_errors、npm_warning、automator_verified、fatal_errors、cdp_skipped(CDP 端口被别的浏览器占着,未采 WXML 运行时错误) |
preview |
生成预览二维码 | qr_format、qr_output(相对路径相对项目根);返回 qr_stale_warning 表示 bundle 可能没刷新 |
upload |
上传到微信后台,生产操作 | version 必填,desc |
build_npm |
构建 npm。新增/更新依赖后必做,否则运行时报 module ... is not defined |
无 |
cache_clean |
清缓存 | clean_type(默认 compile;all 慎用) |
compile_condition 对 tabBar 页可能被 app 路由守卫覆盖,跳转用 evaluate 更可靠。
wechat_automator
先调 start 开启自动化端口,整个会话一次。
| action | 功能 | 必填 / 返回 |
|---|---|---|
start |
开自动化端口,CLI + TCP + WS 三重验证;窗口未加载完时自动重跑 cli auto(最多 3 轮);WS 级最多等 45s(ready_timeout 可调,真机约 7~11s 才首次应答) |
返回 verified、ready_after_ms;false 时先再 start 一次,不要先 open |
tap / input |
点击 / 输入 | selector(input 另需 value) |
element_info |
元素 tagName/text/wxml/size/offset,style_prop 时带 style |
selector |
set_data |
热更新页面 data,无需重编译 | data_json;返回 updated_keys |
call_method |
调页面方法 | method、args_json?;返回 return_value、path |
call_wx / mock_wx |
调 wx API / Mock 返回值(当前会话有效)。同步返回的 API(*Sync、getWindowInfo 等)自动经 evaluate 直调,返回 sync: true |
method(mock 另需 result_json) |
evaluate |
逻辑层执行 JS | fn_source(推荐)或 expression;返回 result、mode |
page_stack |
页面栈 | 返回 depth、pages |
page_data |
当前页 data | expected_path? 会轮询等页面匹配;返回 path、data、path_mismatch |
system_info / storage |
系统信息 / 本地缓存 | storage 传 key 取值,不传列 keys |
evaluate 用法:
fn_source传完整函数源码(function(){...}或箭头函数),入参放args_json(JSON 数组)。多语句、声明、return都由函数体决定,mode: "function"。expression只传单个表达式。多语句会退回语句模式(全部执行,mode: "statement"),没有return时结果为null并附hint。- 例:
fn_source="function(){ const p=getCurrentPages(); return p[p.length-1].route }"。
wechat_inspector
| action | 功能 | 关键参数 |
|---|---|---|
cdp |
CDP 采集 WXML 警告、渲染层报错、Runtime 错误。能回放采集前的历史消息 | duration=10、detail_level、max_logs、cdp_port |
console |
automator 事件采集 console 与 JS 异常。只收连接后的事件 | duration(排查异常 ≥8s)、log_type、tap_selector |
排查「刚才报的错」用 cdp;要与交互严格对齐时间线才用 console。
wechat_screenshot
full_page(默认 true)长图拼接,false只截视口,可配scroll_top;page_path不匹配时自动跳转;output_path留空存到项目screenshots/。- 只在用户要求或需要视觉确认时截图;fixed/absolute 弹窗蒙层可能拍不到,以
page_data为准。
先看 message 有无 ⚠。以下情况图看着连续但不完整:
| 返回字段 | 含义 | 应对 |
|---|---|---|
is_scroll_view_page: true |
页面靠 scroll-view 滚动,只截到视口 | 用 evaluate 读数据代替视觉确认 |
truncated: true |
超分段上限,底部没拍到 | full_page=false + scroll_top 分段截 |
content_gaps: N |
固定头尾吃光重叠,N 处内容丢失 | 调大 overlap(如 150)重试 |
detection_confident: false |
固定头尾识别不可靠 | 结果仅供参考 |
fixed_header / fixed_footer 是识别到的固定区高度(物理像素)。
wechat_navigate
page_path必填,可带 query;tabBar 页自动走switchTab,其余reLaunch(返回navigation_method)。wait_ms默认 2000,含网络请求的页面建议 3000。clear_logs=true过滤跳转前的历史 CDP 日志。- 返回
current_page、cdp_logs、navigation_mismatch;带 query 且check_data=true时数据大面积为空会给warning(疑似参数名错);CDP 端口被别的浏览器占着时照常跳转但cdp_available: false并附cdp_warning;失联自动恢复后附auto_recovered。 - 前提:
start已调用且项目以cdp_enabled=true打开。reLaunch 进入的页面云函数调用可能丢上下文,非 tabBar 页优先 evaluate +wx.navigateTo。
wechat_file
| action | 功能 | 必填 / 返回 |
|---|---|---|
project_info |
project_config、app_config、directory、app.js/app.wxss 节选 |
无 |
list_pages |
app.json 全部页面,含文件完整性 | 返回 pages[{path, complete, missing}]、total |
read_page |
页面四件套源码 | page_path;返回 files{文件名: 内容}、resolved_base |
read_file |
任意单文件,最多 800 行 | file_path;返回 content、resolved_path、truncated |
路径口径统一:先按 miniprogramRoot 解析再回退项目根,list_pages 的输出可直接喂给 read_page。
云函数与云数据库请用 CloudBase MCP。
SOP 标准操作流程
SOP A:初始化
wechat_ide(action='status') # 环境诊断
wechat_ide(action='is_login') # 未登录 → login(qr_format='terminal')
wechat_ide(action='open', cdp_enabled=True) # 端口被别的浏览器占着会直接报错,换 cdp_port=9333(之后其它工具自动沿用)
↳ success=false + startup_errors → 先修复再继续
wechat_automator(action='start') # 自带最多 45s 就绪等待;verified=false → 再 start 一次,不要先 open
wechat_build(action='compile') # 建立干净基线,自动重连 automator
wechat_automator(action='page_data') # 验证连接;AppID undefined → project_path 指到子目录了
project_path 必须是含 project.config.json 的根目录,云开发项目的 miniprogram/ 是子目录。
SOP A-2:改代码后
wechat_build(action='compile') → wechat_automator(action='page_data')
不需要重新 open,也不需要 cache_clean。
页面跳转
| 场景 | 方式 |
|---|---|
| 普通页 | evaluate(fn_source="function(){ wx.navigateTo({url:'/pages/x/x?id=1'}); return 'ok' }") |
| tabBar 页 | wechat_navigate(page_path='pages/x/index') |
| 强制重置 | 同上用 wx.reLaunch |
| 跳转后 | page_data(expected_path='pages/x/x'),校验 path |
SOP B:UI 调试
wechat_file(action='list_pages') # 拿有效路径
wechat_navigate(page_path='pages/x/index', wait_ms=3000) # 跳转 + CDP 日志
wechat_automator(action='page_data') # path 必须等于目标页
↳ 数据异常 → set_data 热更新验证;元素问题 → element_info;需要看图才 screenshot
SOP C:异常排查(报错 / 白屏 / JS 异常)
wechat_automator(action='page_data') # ① 关键字段 null → 数据没加载
wechat_automator(action='evaluate', fn_source='function(){ return wx.cloud.callFunction({name:"x",data:{}}) }')
# ② 直接调 API 拿完整返回,[object Object] 时必用
wechat_inspector(action='cdp', duration=5) # ③ 能回放刚才的错误
wechat_build(action='compile') # ④ 看 errors / wxml_errors
SOP D:全页面巡检
wechat_build(action='compile')
wechat_file(action='list_pages')
# 逐页顺序执行(禁止并行):
wechat_navigate(page_path=page, wait_ms=3000)
wechat_automator(action='page_data', expected_path=page) # path 不匹配 → 标记重定向;字段空 → evaluate 诊断
# 汇总:按 page_data 结果输出报告;只在异常页补截图
SOP E:Mock 集成测试(支付 / 权限 / 网络 / 适配)
mock_wx(method='requestPayment', result_json='{"errMsg":"requestPayment:ok"}')
mock_wx(method='getLocation', result_json='{"latitude":23.1,"longitude":113.3}')
mock_wx(method='request', result_json='{"errMsg":"request:fail timeout"}') # 模拟超时
mock_wx(method='getSystemInfo', result_json='{"theme":"dark","windowWidth":1024}') # 暗色 / 宽屏适配
tap(selector='.pay-btn') → page_data # 触发并验证
Mock 仅当前会话有效。拦截请求可用 fn_source="function(){ var o=wx.request; wx.request=function(p){ console.log(p.url); return o.apply(wx,arguments) }; return 'ok' }"。
SOP G:带 query 参数的子页面
wechat_file(action='read_page', page_path='pages/x/x') # 看 onLoad(options) 的参数名
wechat_navigate(page_path='pages/x/x?id=123', wait_ms=3000)
wechat_automator(action='page_data') # 大部分为 null → 参数名错,回到第一步
SOP I:跨页面数据一致性
wechat_file(action='list_pages')
# 逐页:navigate → page_data(expected_path=page),提取公共字段(如 points / level)记入比对表
# 比对同名字段:不一致 → evaluate 直接调 API 对比,检查子页面是否走了独立数据链路
SOP J:小程序 + 管理后台并行比对
管理后台走 Playwright MCP,小程序走本 MCP,两者端口不同可并行提取,比对在主进程串行做。automator 9420 独占,同一时刻只能有一个 agent 操作本 MCP。
CDP 日志策略
| 场景 | 参数 |
|---|---|
| 快速诊断 | duration=5, detail_level='concise', max_logs=20 |
| 深度排查 | duration=10, detail_level='full', max_logs=100 |
| 页面巡检 | duration=3, detail_level='concise', max_logs=30 |
concise只回 errors + warnings;summary.errors > 0再用full拿source定位,配合read_file。cdp会回放采集前的缓冲区(12 秒前的错误也能拿到),console只收连接后的事件。- 已自动过滤:
[system]、WAService.js、WAWebview.js、IDE 外壳页;open的启动检查还过滤devtools://与ide:///extensions/。 - 需要自己排除:
devtools://来源的console.assert、SharedArrayBufferIssue、wx.saveFile 即将废弃类框架预警。 ide:///extensions/inject/…来源的 warning 不是噪音,是框架报的真实问题(无效 app.json 字段、API 废弃、WXSS 选择器不合法)。- 计数可能被噪音抬高,最终以
page_data为准。
page_data 必须校验 data.path 等于导航目标;不一致的常见原因:未登录被拦到登录页、云函数失败 fallback 首页、page_path 拼错、onLoad 条件跳转。传 expected_path 可轮询等待匹配,path_mismatch: true 时用 page_stack 看完整栈。
返回值与恢复
成功 {"success": true, "data": {...}, "message": "..."},失败 {"success": false, "error_code": "...", "message": "...", "hint": "..."}。
error_code 只有 6 种:PARAM_MISSING、CLI_NOT_FOUND、PROJECT_PATH_MISSING、NODE_NOT_FOUND、CLI_TIMEOUT、UNKNOWN_ERROR。连接失败、跳转失败等都归 UNKNOWN_ERROR,看 message 与 hint。
连接断开恢复分三级:
0. 自动:动作本身会 start 一次再重试,成功时 data.auto_recovered 带 ready_after_ms。
- 快速:
start→page_data。 - 完整:
open(cdp_enabled=True)→start→compile→page_data。
故障速查
| 症状 | 原因 | 解决 |
|---|---|---|
CLI_TIMEOUT |
服务端口未开 / IDE 未运行 | status 看 service_port_enabled;开端口;open |
open 返回 startup_errors |
小程序启动阶段有致命错误 | 先修代码再 open |
start 返回 verified=false(端口在听、小程序未应答) |
IDE 仍在编译/加载项目;或项目窗口刚被其它会话的 cli close 关掉又重开(SessionEnd 钩子、常驻 bot 等) |
直接再 start(可加大 ready_timeout);连续 3 次失败才 open(cdp_enabled=True)。open 会杀 IDE、冷启动更慢,别把它当第一反应 |
CLI auto 连续 3 次返回成功但端口未监听 |
项目窗口没加载完或已关闭(cli auto 会假成功;纯 CLI open 后约需 15s) |
稍等再 start;仍失败 open(cdp_enabled=True) 重启后再 start |
动作仍返回 Failed connecting to ws://localhost:9420 / Connection closed |
项目窗口被关(其它会话 cli close、手动关窗)或 automator 闲置后不应答;动作已自动 start 一次仍没救回 |
看 status 的 project_window_open;手动 start(cli auto 会重开窗口)→ page_data;再失败才 open(cdp_enabled=True) |
| CDP 采集失败 / 采到的全是别的东西 | 未以 cdp_enabled 打开,或 9222 被 Chrome 占用(status 的 cdp_port_occupant.kind 为 foreign 即是) |
open(cdp_port=9333),之后 inspector / navigate / compile 不传 cdp_port 自动沿用;长期设 WECHAT_CDP_PORT |
Using AppID: undefined / appid missing |
project_path 指向子目录 / 未登录 | 改为含 project.config.json 的根目录;is_login |
navigate 后 page_data.path 与目标不一致 |
page_path 拼错、被重定向(未登录 / 参数错 / 云函数失败)、switchTab 未完成 | list_pages 核对;查登录态与 onLoad 逻辑;增大 wait_ms |
evaluate 返回 null 且 mode: "statement" |
expression 走了语句模式没 return |
改用 fn_source 并显式 return |
元素未找到 / Element is obfuscated |
不在当前页、selector 错、被遮挡 | page_stack 确认页面;element_info 验证;换父节点 |
| scroll-view 页长图只有一屏 | automator 无法捕获 scroll-view 内部滚动 | 返回 is_scroll_view_page: true,改用 evaluate 读数据 |
| 长图看着连续但少一截 | 固定头尾吃光重叠 | 看 content_gaps,增大 overlap |
| 截图看不到弹窗 / 拍到错误页面 | overlay 不在同一渲染层 / 截图前页面被重置 | 以 page_data 为准;传 page_path |
| compile 成功但 IDE 显示红色 WXML 错误 | WXML 错误走 IDE 内部通道 | 看 wxml_errors;检查中文引号、未闭合标签 |
运行时报 @babel/runtime/helpers/xxx is not defined |
npm 依赖更新后未 build_npm | build_npm → compile,console(duration≥8, log_type='exception') 验证 |
| 工具行为异常 / 参数对不上(IDE 2.x) | 注册名撞车:官方 bridge 也叫 wechat-devtools |
注册名改 wechat-devtools-mcp;status 的 mcp_version 可确认调到谁 |
Windows 上 open 后项目没打开 / CDP 连不上(IDE 2.x) |
旧版 Windows 分支没有 1.x/2.x 判定 | 升级到最新版;仍失败附 ide_runtime 反馈 |
ide:///extensions/inject/… 的 warning |
框架报的真实应用问题 | 当真实告警处理,不要过滤 |
绝对红线
- ❌
open返回startup_errors后继续测试 - ❌ 未确认
logged_in: true就preview/upload - ❌ 对生产项目
cache_clean(clean_type='all') - ❌ 脑补运行状态;同一失败操作重试超过 3 次(应转为诊断根因)
- ❌ 硬 sleep 等待,用
wait_ms或page_data(expected_path)轮询 - ❌
start返回verified=false就立刻open重启 IDE(先重试start) - ❌ SOP 里主动截图,只在用户要求或需要视觉确认时截
- ❌ 没改代码就 compile
- ❌ navigate 后不校验
page_data.path - ❌ 多个 agent 并行使用
wechat_automator(9420 独占) - ❌ 用
miniprogram/子目录作 project_path;WXML 属性值里用中文引号(工具无法检测) - ✅ 自动化 / 截图前先
start;tap/input前先element_info确认元素 - ✅
upload前确认版本号递增、build_npm已执行 - ✅ compile 后用
page_data确认 automator 连接
版本历史
-
v0.9.22
GitHub ↗
原版更新说明
## Highlights - **`wechat_screenshot` 新增 `wait_for_selector`**(配 `wait_timeout_ms`,默认 5000):数据异步加载的页面,先等指定元素出现,再量页面高度、再截图,避免拍到骨架屏。 - **等不到不判失败**:超时照常出图,返回 `selector_found: false` 与 `selector_waited_ms`,message 以 ⚠ 明示图里可能是加载中或空状态。 - **`wechat_build` 工具描述补全**:逐 action 写明行为与副作用(`compile` 返回什么并自动重连 automator、`upload` 属生产操作、`build_npm` 何时必须跑、`cache_clean` 的 `all` 慎用)。 ## Tests - pytest 322 passed - macOS 真机冒烟 21/21(Stable 2.02.2609250) ## Install ```bash uvx wechat-devtools-mcp # 或 uv tool install wechat-devtools-mcp==0.9.22 ``` Skill 同步更新,已安装的项目请重跑 `npx -y skills add WaterTian/wechat-devtools-mcp/.agents/skills/wechat-devtools`。 完整说明见 [CHANGELOG.md](./CHANGELOG.md) / [CHANGELOG_EN.md](./CHANGELOG_EN.md)。
-
v0.9.21
GitHub ↗
原版更新说明
## Highlights - **`CDP_PORT_OCCUPIED`**:`wechat_ide(open)` 与 `wechat_inspector(cdp)` 在 CDP 端口被别的浏览器(典型是常驻 Chrome 的 9222)占着时返回专属错误码,调用方不必再解析 `message` 分流;`compile` / `navigate` 原有的「跳过采集 + ⚠」降级不变。 - **官方内建 MCP 强制 Token 提醒**:开发者工具 Stable 2.02.2609240 起官方 MCP 需到「设置 → 安全」重新复制配置取 Token;`status.official_mcp.available: true` 只表示服务在跑。本项目不经过该接口,不受影响。README 中英与 SKILL 已写明,官方工具数更新为 49。 - **Stable 2.02.2609250 真机回归**:`tests/manual/smoke_ide.py` 19/19,`open` / `compile` / `quit` 耗时与 2608060 同参数基线持平;经典 CLI 入口文件逐字节未变。 ## Tests - pytest 316 passed - macOS 真机冒烟 19/19(Stable 2.02.2609250) ## Install ```bash uvx wechat-devtools-mcp # 或 uv tool install wechat-devtools-mcp==0.9.21 ``` 完整说明见 [CHANGELOG.md](./CHANGELOG.md) / [CHANGELOG_EN.md](./CHANGELOG_EN.md)。
-
v0.9.20
GitHub ↗
原版更新说明
## Highlights - `call_wx` now routes synchronous wx APIs (`*Sync`, `create*`, `*Manager`, and info getters such as `getSystemSetting` / `getAppBaseInfo` / `getWindowInfo` / `getDeviceInfo` / `canIUse`) through `evaluate` in the logic layer and returns `sync: true`. Previously the automator's `callWxMethod` waited for a success callback that never comes and timed out after a fixed 10s. Verified live: the three sync APIs went from 10.0s timeouts to 0.0s; async APIs are unchanged. For sync APIs outside the list, a timeout now carries a hint pointing to `evaluate`. - Documentation audited field by field against the code: README (prerequisites including Node.js ≥ 18, separate install and upgrade commands, a self-check step, FAQ in current terms), MCP_DOC (screenshot parameters, navigate `project_path`, `expected_path`, return fields of status / open / compile / screenshot / navigate), SKILL (self-check rows, recovery guidance). Schema descriptions for `cdp_port` and `project_path` now match behaviour. The Node.js floor message goes from 8 to 18. - A 10-minute idle observation with no clients attached showed a stable project window and zero close events on DevTools 2.x; window closes always have an external cause. ## Tests - 316 pytest cases pass; the 5 standalone JS scripts pass (61 assertions). - Verified live on WeChat DevTools 2.02.2608060 (macOS). ## Install ```bash uv tool install wechat-devtools-mcp --force --refresh ``` PyPI: https://pypi.org/project/wechat-devtools-mcp/0.9.20/
-
v0.9.19
GitHub ↗
原版更新说明
## Highlights - `start` now waits for automator readiness with a deadline (45s by default, `ready_timeout` parameter, `WECHAT_AUTOMATOR_READY_TIMEOUT`), re-runs `cli auto` after 15s of silence, and returns `ready_after_ms`. This fixes the long-standing "TCP listening but WebSocket handshake incomplete" failures: on DevTools 2.02.2608060 the IDE answers `currentPage` about 7s after the socket opens, which the old 10s budget missed under load. - Automatic recovery: automator actions, `navigate` and `screenshot` run `start` once and retry after a connection-class failure, reported as `auto_recovered`. Actions with side effects retry only when the failure happened before the action ran. - CDP port guard: `open` refuses to launch when another browser holds `cdp_port` (`cdp_port_occupant`) instead of killing the IDE and reporting that browser's errors as startup errors. The port sticks for the session, `WECHAT_CDP_PORT` sets the default, and `inspector` / `navigate` / `compile` no longer capture a foreign browser's logs. - `status` reports `cdp_port_occupant`, `project_window_open` and the project's `skill_version` (with a hint when it differs from `mcp_version`). - Daemon health check polls at 1.5s/0.5s; the post-compile reconnect is deadline-based; node_bridge forwards handler `code` on failure. ## Tests - 313 pytest cases pass; the 4 standalone JS scripts pass (46 assertions). - Verified live on WeChat DevTools 2.02.2608060 (macOS): cold `start` after closing the project window succeeds on the first probe, `page_data` self-recovers after the window is closed, and `open` on a Chrome-held port fails fast without touching the IDE. ## Install ```bash uv tool install wechat-devtools-mcp --force --refresh ``` PyPI: https://pypi.org/project/wechat-devtools-mcp/0.9.19/
-
v0.9.18
GitHub ↗
原版更新说明
## Highlights - **Windows 2.x verified end-to-end on a real machine** (Windows 11, DevTools Stable 2.02.2608060): four smoke rounds at 19/19 plus the full pytest suite. The installer was also unpacked statically to confirm the layout; see `docs/windows-internals.md`. - **State-file directory on Windows 2.x**: the IDE keeps `.ide` / `.cli` / `.ide-status` under `%LOCALAPPDATA%\微信开发者工具\User Data\<hash>\Default\`. `ide_state` now probes each candidate root with and without the `User Data` layer. - **`open` readiness on Windows Electron**: the stale `.ide` port is no longer a readiness criterion. Readiness is "CDP listening + an IDE shell target in `/json/list`", and `open` proceeds even if that port never listens, deferring to the actual `cli open` result. `open` also returns `miniprogram_targets_ready`; when no mini-program target appears on the CDP port within 8s the message carries a warning (single-instance-lock race probe) without failing. - **Noise filters**: the startup health check ignores the 2.x extension-injected `inspectee MPPage` errors and `access_token expired`; the compile warning filter matches the `--trace-deprecation` hint by content instead of executable name (it is `微信开发者工具` on Windows). - **`quit` / kill on Windows** now poll `tasklist /FO CSV` until the process is gone, independent of the console code page; `quit` returns `exited`. - **Tooling**: new cross-platform real-machine smoke script `tests/manual/smoke_ide.py` (JSON report with checkpoints); two Windows unit tests decoupled from the real install directory. ## Tests - 266 Python tests passed (`pytest tests/ -q`), on macOS and Windows 11 - 4 Node scripts, 46 assertions passed ## Install ```bash uv tool install "wechat-devtools-mcp==0.9.18" --force --refresh ``` PyPI: https://pypi.org/project/wechat-devtools-mcp/0.9.18/
此处仅展示最近 5 个版本。 在原站查看完整版本历史 ↗
当前收录版本
0.9.20
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 面向小程序开发者的高频刚需工具,显著提升开发调试效率
- 提供完整的构建、预览、调试与自动化测试能力
- 支持 CDP 日志采集、Mock 测试、跨页面数据一致性检查等高级功能
亮点
- 触发描述精准完整,明确指向微信开发者工具 MCP 集成
- 覆盖多种使用场景,边界清晰无歧义
待提升项
-
文档过长 原报告严重程度:轻微
SKILL.md 文件超过 500 行,影响阅读体验
改进建议:建议将部分详细说明拆分为独立文档,主文档保留核心流程
-
description 写错位置 原报告严重程度:轻微
description 在 frontmatter 和 body 中重复出现
改进建议:保留 frontmatter 中的 description,移除 body 中的重复内容
亮点
- Phase/步骤清晰,提供 SOP A-J 标准操作流程
- 包含完整的故障速查表和恢复机制
- frontmatter 完整,参数说明详细
亮点
- 工具来源明确,提供完整的安装配置说明
- 覆盖主要异常场景,有三级连接恢复机制
- 不可逆操作有确认机制,提供详细的错误码体系
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
-
安装或获取外部依赖
使用官方来源并锁定版本,在隔离环境检查安装脚本。当前文档检查不覆盖后续下载的代码。
主文档提及 · 第 14, 15 行
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- 127.0.0.1
- github.com
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。