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
uv tool install wechat-devtools-mcp --force --refresh
PyPI: https://pypi.org/project/wechat-devtools-mcp/0.9.19/