{"_id":"@charles_zmw/wechat-automator","_rev":"4-8cdd1fe2121311be7d09d86bb528db61","name":"@charles_zmw/wechat-automator","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@charles_zmw/wechat-automator","version":"1.0.0","keywords":[],"author":"","license":"ISC","_id":"@charles_zmw/wechat-automator@1.0.0","maintainers":[{"name":"charles_zmw","email":"zdf312192599@163.com"}],"bin":{"wechat-automator":"index.js"},"dist":{"shasum":"54f2be795e3cc3a6d9ac2018e31bc251137e0732","tarball":"https://registry.npmjs.org/@charles_zmw/wechat-automator/-/wechat-automator-1.0.0.tgz","fileCount":2,"integrity":"sha512-Sh/Sg+n90lRtpfYbv9Tu4S8uSJpzYLQdHKNFI0YRsNBjnjG8Z/7203TVNP6iBkWmEBXSfECEqrOOZfjyJGcXQA==","signatures":[{"sig":"MEYCIQCofvqMt+Hg444oGPdI5QGHgMsE3wgggwY4PVmQDKQvowIhANM9Ljh6HGgqcgoeh4G/EdcMujq2mReqMyfA2Axw1YAQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5233},"main":"index.js","type":"commonjs","gitHead":"c7e962c2186734558b50c0d4006baf650a15e41e","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"charles_zmw","email":"zdf312192599@163.com"},"_npmVersion":"11.10.1","description":"","directories":{},"_nodeVersion":"23.11.0","dependencies":{"miniprogram-automator":"^0.12.1","@modelcontextprotocol/sdk":"^1.27.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/wechat-automator_1.0.0_1773168584818_0.17452468042839842","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@charles_zmw/wechat-automator","version":"1.0.1","keywords":[],"author":"","license":"ISC","_id":"@charles_zmw/wechat-automator@1.0.1","maintainers":[{"name":"charles_zmw","email":"zdf312192599@163.com"}],"bin":{"wechat-automator":"index.js"},"dist":{"shasum":"2690fc11ca906402398159875c8e31835757d0e0","tarball":"https://registry.npmjs.org/@charles_zmw/wechat-automator/-/wechat-automator-1.0.1.tgz","fileCount":3,"integrity":"sha512-v+g+smUOsFQ7SeSjb7J23r6ja8HQZlf9zXKNUvnWjs6XCJ3zZSy5c+HYVlkZGiSHBNNVb28EALwYXGQlowhSKg==","signatures":[{"sig":"MEUCIEs7UR8zPLM1j1Sy6UGcyc/l8DEt5eqNzu9g5lQMDOajAiEAuI/ktYJpz2eQjV5AIbgVX8RvtAd3tDLFuiBiBEqAlWM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7536},"main":"index.js","type":"commonjs","gitHead":"c7e962c2186734558b50c0d4006baf650a15e41e","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"charles_zmw","email":"zdf312192599@163.com"},"_npmVersion":"11.10.1","description":"这是一个基于 **Model Context Protocol (MCP)** 的微信小程序自动化服务器。它允许 AI 助手（如 Gemini CLI）直接操作微信开发者工具、获取模拟器状态、执行自动化测试或进行辅助调试。","directories":{},"_nodeVersion":"23.11.0","dependencies":{"miniprogram-automator":"^0.12.1","@modelcontextprotocol/sdk":"^1.27.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/wechat-automator_1.0.1_1773168695675_0.3873026789844505","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@charles_zmw/wechat-automator","version":"1.0.2","keywords":[],"author":"","license":"ISC","_id":"@charles_zmw/wechat-automator@1.0.2","maintainers":[{"name":"charles_zmw","email":"zdf312192599@163.com"}],"bin":{"wechat-automator":"index.js"},"dist":{"shasum":"965be1f0d81bcde7c64323d5cd730b2c0ae815d6","tarball":"https://registry.npmjs.org/@charles_zmw/wechat-automator/-/wechat-automator-1.0.2.tgz","fileCount":3,"integrity":"sha512-aULz7d2zsi9FYE5SKvZX0j54TG9ZYcUfkwhthCyvClgFeUH5tV2csWNQLzkQNoQLvSIXuqBo3lNVpSph6y7/1Q==","signatures":[{"sig":"MEQCIGIu67NcQQtYIewr5xP/OhLxJV96cixDttQ+UKNCLumvAiAmoPmD8xyoRhPtam8fnpLMDRzJFE4P3VU+FLkfiuMWJg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7532},"main":"index.js","type":"commonjs","gitHead":"c7e962c2186734558b50c0d4006baf650a15e41e","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"charles_zmw","email":"zdf312192599@163.com"},"_npmVersion":"11.10.1","description":"这是一个基于 **Model Context Protocol (MCP)** 的微信小程序自动化服务器。它允许 AI 助手（如 Gemini CLI）直接操作微信开发者工具、获取模拟器状态、执行自动化测试或进行辅助调试。","directories":{},"_nodeVersion":"23.11.0","dependencies":{"miniprogram-automator":"^0.12.1","@modelcontextprotocol/sdk":"^1.27.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/wechat-automator_1.0.2_1773168783580_0.7508580605115185","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@charles_zmw/wechat-automator","version":"1.0.3","description":"这是一个基于 **Model Context Protocol (MCP)** 的微信小程序自动化服务器。它允许 AI 助手（如 Gemini CLI）直接操作微信开发者工具、获取模拟器状态、执行自动化测试或进行辅助调试。","main":"index.js","bin":{"wechat-automator":"index.js"},"publishConfig":{"access":"public"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":[],"author":"","license":"Apache-2.0","type":"commonjs","dependencies":{"@modelcontextprotocol/sdk":"^1.27.1","miniprogram-automator":"^0.12.1"},"gitHead":"c7e962c2186734558b50c0d4006baf650a15e41e","_id":"@charles_zmw/wechat-automator@1.0.3","_nodeVersion":"23.11.0","_npmVersion":"11.10.1","dist":{"integrity":"sha512-D8swtN3R4p5Rs0yCsJYer5HPoWoQOBSq3dM59Yz5In66Tq1SDA9LSdKyNirQPjvEw8/CHwBD2dBlSC0JKmjyeQ==","shasum":"e7240723ec6581758e3019e1f22d773c48b1ee4f","tarball":"https://registry.npmjs.org/@charles_zmw/wechat-automator/-/wechat-automator-1.0.3.tgz","fileCount":4,"unpackedSize":18883,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAZvD3iHqT6wzhef8BjqNozboooKI/9yo4OvHukXD+dXAiEAqxG8rtxmnEQZ6dKmfn2VHY0PbmykDEyhoRbw4gFtxDY="}]},"_npmUser":{"name":"charles_zmw","email":"zdf312192599@163.com"},"directories":{},"maintainers":[{"name":"charles_zmw","email":"zdf312192599@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/wechat-automator_1.0.3_1773168966304_0.06542067092996495"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-10T18:49:44.705Z","modified":"2026-03-10T18:56:06.578Z","1.0.0":"2026-03-10T18:49:44.970Z","1.0.1":"2026-03-10T18:51:35.816Z","1.0.2":"2026-03-10T18:53:03.721Z","1.0.3":"2026-03-10T18:56:06.456Z"},"license":"Apache-2.0","keywords":[],"description":"这是一个基于 **Model Context Protocol (MCP)** 的微信小程序自动化服务器。它允许 AI 助手（如 Gemini CLI）直接操作微信开发者工具、获取模拟器状态、执行自动化测试或进行辅助调试。","maintainers":[{"name":"charles_zmw","email":"zdf312192599@163.com"}],"readme":"# @charles_zmw/wechat-automator\n\n这是一个基于 **Model Context Protocol (MCP)** 的微信小程序自动化服务器。它允许 AI 助手（如 Gemini CLI）直接操作微信开发者工具、获取模拟器状态、执行自动化测试或进行辅助调试。\n\n## 🚀 功能特性\n\n- **项目管理**：自动启动微信开发者工具并打开指定的小程序项目。\n- **页面交互**：模拟点击、切换 Tab 页、输入等操作。\n- **数据洞察**：直接获取当前页面的 `data` 模型数据，比截图更精准地分析逻辑状态。\n- **真机同步**：支持真机调试模式下的同步操作（需手动开启真机调试）。\n- **视觉反馈**：捕获模拟器当前界面的截图。\n\n## 📦 安装\n\n推荐使用全局安装，以便在任何地方调用：\n\n```bash\nnpm install -g @charles_zmw/wechat-automator\n```\n\n## 🛠 配置 Gemini CLI\n\n在您的 `.gemini/settings.json` 中添加以下配置：\n\n```json\n{\n  \"mcpServers\": {\n    \"wechat-automator\": {\n      \"command\": \"wechat-automator\",\n      \"env\": {\n        \"WECHAT_DEVTOOLS_CLI\": \"/Applications/wechatwebdevtools.app/Contents/MacOS/cli\"\n      }\n    }\n  }\n}\n```\n\n*注：`WECHAT_DEVTOOLS_CLI` 路径请根据您的操作系统实际情况修改（macOS 默认为 `/Applications/wechatwebdevtools.app/Contents/MacOS/cli`）。*\n\n## 🔧 可用工具 (Tools)\n\n### 1. `wechat_launch`\n启动微信开发者工具并打开项目。\n- `projectPath`: 项目绝对路径（必填）。\n- `cliPath`: 命令行路径（可选，默认使用环境变量）。\n\n### 2. `wechat_switch_tab`\n切换小程序底部的 Tab。\n- `pagePath`: 页面路径，如 `/pages/index/index`。\n\n### 3. `wechat_tap`\n通过 CSS 选择器点击元素。\n- `selector`: 选择器，如 `.submit-btn`。\n\n### 4. `wechat_get_data`\n获取当前页面的 `data` 模型数据（JSON 格式）。\n\n### 5. `wechat_screenshot`\n保存模拟器截图。\n- `outputPath`: 截图保存的绝对路径。\n\n## 💡 使用说明\n\n1. **服务端口**：请确保在微信开发者工具的“设置 -> 安全设置”中开启了“服务端口”。\n2. **真机操作**：若要操作真机，请先在工具中手动开启“真机调试”并扫码连接，之后该工具发出的指令将同步至真机。\n\n## 📄 开源协议\n\nApache-2.0\n","readmeFilename":"README.md"}