# wechat-devtools-mcp

Connects WeChat DevTools CLI to your coding agent via 7 aggregated tools for compiling mini-programs, taking full-page screenshots, and running UI tests.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 155
- Author: WaterTian
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/WaterTian/wechat-devtools-mcp
- Updated: 2026-09-04
- HTML: https://affpapa.org/en/nevibecode/mcp/wechat-devtools-mcp

## What it 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.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `WECHAT_DEVTOOLS_CLI`, `WECHAT_PROJECT_PATH`, `WECHAT_CLI_TIMEOUT`, `NODE_PATH` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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-mcp
```
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>

### Codex

**Platform CLI**
```bash
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-mcp
```
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>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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>

### Gemini CLI

**Platform CLI**
```bash
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-mcp
```
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>

## When to use it
- 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
- 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

## Similar
- [mobile-mcp](https://affpapa.org/en/nevibecode/mcp/mobile-mcp.md) — MCP server · ★ 9946
- [mobilerun](https://affpapa.org/en/nevibecode/mcp/mobilerun.md) — MCP server · ★ 9751
- [e2e](https://affpapa.org/en/nevibecode/mcp/e2e.md) — MCP server · ★ 11912
- [XcodeBuildMCP](https://affpapa.org/en/nevibecode/mcp/xcodebuildmcp.md) — MCP server · ★ 6505
- [ShipSwift](https://affpapa.org/en/nevibecode/mcp/shipswift.md) — MCP server · ★ 3244
- [agent-device](https://affpapa.org/en/nevibecode/mcp/agent-device.md) — MCP server · ★ 5149

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
