Skip to content
Skillpedia
● Free and open source💻 Local🔓 No API keyProgramming

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

NameWhat it isRequired
WECHAT_DEVTOOLS_CLI微信开发者工具 CLI 路径。Windows: C:\Program Files (x86)\Tencent\微信web开发者工具\cli.bat;macOS: /Applications/wechatwebdevtools.app/Contents/MacOS/cliYes
WECHAT_PROJECT_PATH默认小程序项目绝对路径,例如 D:\Projects\MyMiniAppYes
WECHAT_CLI_TIMEOUTCLI 命令超时时间(秒)No
NODE_PATHNode.js 可执行文件路径No
WECHAT_CDP_PORTCDP 调试端口默认值;9222 被 Chrome 占用时设为 9333No
WECHAT_AUTOMATOR_READY_TIMEOUTautomator 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 environment
  • wechat_build: compile, preview, upload, build npm
  • wechat_automator: tap, input, read page data, call wx APIs
  • wechat_inspector: collect console and CDP logs
  • wechat_screenshot: stitched full-page screenshots
  • wechat_navigate: go to a page and collect logs
  • wechat_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

WeChat DevTools (2.x or 1.06.x) with the service port turned on, Python 3.10 or newer, Node.js 18 or newer, and the paths of the DevTools CLI and your project in WECHAT_DEVTOOLS_CLI and WECHAT_PROJECT_PATH.

Skills that pair well

⭐ Skillpedia MCP · freeYour agent finds the right skill on its ownInstall our MCP and your agent searches 15,000+ skills whenever it needs one.Install for free →

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.