wechat-devtools-mcp — Claude Code MCP server: setup & features
Connects WeChat DevTools CLI to your coding agent via 7 aggregated tools for compiling mini-programs, taking full-page screenshots, and running UI tests.
claude mcp add --env WECHAT_DEVTOOLS_CLI=<WECHAT_DEVTOOLS_CLI> --env WECHAT_PROJECT_PATH=<WECHAT_PROJECT_PATH> --env WECHAT_CLI_TIMEOUT=<WECHAT_CLI_TIMEOUT> --env NODE_PATH=<NODE_PATH> --transport stdio wechat-devtools-mcp -- uvx wechat-devtools-mcpWhat wechat-devtools-mcp does
The server wraps WeChat DevTools CLI into 7 aggregated tools: wechat_ide, wechat_build, wechat_automator, wechat_inspector, wechat_screenshot, wechat_navigate, and wechat_file. This setup lets agents start the IDE, compile code, read project files, emulate taps, and capture structured CDP logs with noise filtering.
You must enable the service port under Security Settings in the DevTools UI. Without this port open, every CLI call fails with CLI_TIMEOUT. Configuration requires absolute paths for WECHAT_DEVTOOLS_CLI and WECHAT_PROJECT_PATH.
The author recommends pairing this server with their companion wechat-devtools skill. The MCP server handles execution, while the skill provides step-by-step troubleshooting routines and inspection workflows.
What it helps with
- compile and upload WeChat mini-programs from the editor
- stitch full-page screenshots of long mobile views
- record structured CDP logs during page navigation
- automate tap gestures and input values in runtime tests
Example prompts for the agent
- Check the WeChat DevTools status and trigger a project build
- Capture a stitched full-page screenshot of the active view
- Navigate to the target page and collect runtime CDP logs
How to install wechat-devtools-mcp
Platform CLI
claude mcp add --env WECHAT_DEVTOOLS_CLI=<WECHAT_DEVTOOLS_CLI> --env WECHAT_PROJECT_PATH=<WECHAT_PROJECT_PATH> --env WECHAT_CLI_TIMEOUT=<WECHAT_CLI_TIMEOUT> --env NODE_PATH=<NODE_PATH> --transport stdio wechat-devtools-mcp -- uvx wechat-devtools-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from wechat-devtools-mcp <command>
Platform CLI
codex mcp add wechat-devtools-mcp --env WECHAT_DEVTOOLS_CLI=<WECHAT_DEVTOOLS_CLI> --env WECHAT_PROJECT_PATH=<WECHAT_PROJECT_PATH> --env WECHAT_CLI_TIMEOUT=<WECHAT_CLI_TIMEOUT> --env NODE_PATH=<NODE_PATH> -- uvx wechat-devtools-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from wechat-devtools-mcp <command>
Config file
{
"mcpServers": {
"wechat-devtools-mcp": {
"command": "uvx",
"args": [
"wechat-devtools-mcp"
],
"env": {
"WECHAT_DEVTOOLS_CLI": "<WECHAT_DEVTOOLS_CLI>",
"WECHAT_PROJECT_PATH": "<WECHAT_PROJECT_PATH>",
"WECHAT_CLI_TIMEOUT": "<WECHAT_CLI_TIMEOUT>",
"NODE_PATH": "<NODE_PATH>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from wechat-devtools-mcp <command>
Config file
{
"servers": {
"wechat-devtools-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"wechat-devtools-mcp"
],
"env": {
"WECHAT_DEVTOOLS_CLI": "<WECHAT_DEVTOOLS_CLI>",
"WECHAT_PROJECT_PATH": "<WECHAT_PROJECT_PATH>",
"WECHAT_CLI_TIMEOUT": "<WECHAT_CLI_TIMEOUT>",
"NODE_PATH": "<NODE_PATH>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from wechat-devtools-mcp <command>
Platform CLI
gemini mcp add -e WECHAT_DEVTOOLS_CLI=<WECHAT_DEVTOOLS_CLI> -e WECHAT_PROJECT_PATH=<WECHAT_PROJECT_PATH> -e WECHAT_CLI_TIMEOUT=<WECHAT_CLI_TIMEOUT> -e NODE_PATH=<NODE_PATH> wechat-devtools-mcp uvx wechat-devtools-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from wechat-devtools-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about wechat-devtools-mcp
How do I install wechat-devtools-mcp in Claude Code?
Run `claude mcp add wechat-devtools-mcp -e WECHAT_DEVTOOLS_CLI=<WECHAT_DEVTOOLS_CLI> -e WECHAT_PROJECT_PATH=<WECHAT_PROJECT_PATH> -- uvx wechat-devtools-mcp`, replacing placeholders with your local absolute paths.
How does this compare to the built-in MCP in WeChat DevTools 2.x?
The official IDE server provides 47 atomic actions, while this tool aggregates workflows, captures full-length stitched screenshots, and organizes historical CDP logs.
Why does every command return CLI_TIMEOUT?
The IDE service port is disabled. Open WeChat DevTools, go to Settings -> Security Settings, and enable Service Port.