WeChat DevTools MCP
Lets your AI agent compile, preview, debug and auto-test WeChat Mini Programs through WeChat DevTools.
163 stars on GitHubby WaterTianLicense MITUpdated 28 days ago
How to install
This MCP is local: it runs on your computer.
It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Code…). Choose your app:
Paste in the terminal:
claude mcp add wechat-devtools -e WECHAT_DEVTOOLS_CLI="<your value>" -e WECHAT_PROJECT_PATH="<your value>" -- uvx wechat-devtools-mcp
What to fill in
| Name | What it is | Required |
|---|---|---|
WECHAT_DEVTOOLS_CLI | 微信开发者工具 CLI 路径。Windows: C:\Program Files (x86)\Tencent\微信web开发者工具\cli.bat;macOS: /Applications/wechatwebdevtools.app/Contents/MacOS/cli | Yes |
WECHAT_PROJECT_PATH | 默认小程序项目绝对路径,例如 D:\Projects\MyMiniApp | Yes |
WECHAT_CLI_TIMEOUT | CLI 命令超时时间(秒) | No |
NODE_PATH | Node.js 可执行文件路径 | No |
WECHAT_CDP_PORT | CDP 调试端口默认值;9222 被 Chrome 占用时设为 9333 | No |
WECHAT_AUTOMATOR_READY_TIMEOUT | automator start 等待首次应答的秒数 | No |
Ready! Now test it
Restart the app and paste one of these requests in the chat:
Open my mini program, compile it and show me the console errors.
Take a full-page screenshot of the cart page.
What it is
This server wraps WeChat DevTools so your AI agent can build and test Mini Programs. It has seven tools for opening the IDE, compiling, previewing, running automated actions, collecting logs, taking long screenshots and reading project files. It should be installed together with the matching skill.
What it can do
wechat_ide: open, log in, close and check the environmentwechat_build: compile, preview, upload, build npmwechat_automator: tap, input, read page data, call wx APIswechat_inspector: collect console and CDP logswechat_screenshot: stitched full-page screenshotswechat_navigate: go to a page and collect logswechat_file: read project info, pages and files
When to use
- ›When you build a Mini Program and want your agent to run it and check the result
- ›When you need logs and screenshots from a page after a change
- ›When you want an automated test pass across several pages
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
browser-testing-with-devtoolsLets your agent test browser apps using advanced tools. It can see code, logs, and performance to ensure quality.chrome-devtools-cliLets your agent control Chrome from the terminal to open pages, click, fill in forms, and take page snapshots for browser automation and testing.chrome-devtoolsHelps your agent automate and debug in the browser. It can interact with pages, analyze network traffic, and check performance.Frequently asked questions
Is it free?
Yes. It is MIT licensed.
Which platforms work?
Windows and macOS.
Do I need the skill too?
Yes. The readme says the thin MCP and the skill must be installed together, because the workflows live in the skill.
How does it relate to the official MCP?
WeChat DevTools 2.x has a built-in MCP. This project adds stitched screenshots, structured CDP logs and task-level procedures, and still supports older 1.06.x.
Why do I get CLI_TIMEOUT?
The DevTools service port is probably off. Turn it on under Settings, Security.
What if port 9222 is busy?
Set WECHAT_CDP_PORT to another port, for example 9333.
If it does not work
- ›Turn on the service port in DevTools: Settings, Security Settings, Service Port.
- ›Run wechat_ide with action status and check that cli_exists, project_exists and node_available are all true.
- ›On Windows, add PYTHONIOENCODING=utf-8 to env if text is garbled.
5 new skills a week. 1 minute to read.