Skip to main content
MCP server CX Codex

weapp-agent-mcp — Claude Code MCP server: setup

This MCP server lets coding agents drive WeChat DevTools for Mini Program debugging, page interaction, and small regression checks.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env WEAPP_WS_ENDPOINT=<WEAPP_WS_ENDPOINT> --env WEAPP_AUTOMATOR_MODE=<WEAPP_AUTOMATOR_MODE> --env WEAPP_PROJECT_PATH=<WEAPP_PROJECT_PATH> --env WECHAT_DEVTOOLS_CLI_PATH=<WECHAT_DEVTOOLS_CLI_PATH> --env WEAPP_DEVTOOLS_PORT=<WEAPP_DEVTOOLS_PORT> --transport stdio weapp-agent-mcp -- npx -y @chaixueyuan/weapp-agent-mcp
Open on GitHub

What weapp-agent-mcp does

weapp-agent-mcp exposes WeChat DevTools actions to an agent through MCP. It can capture screenshots and page state, navigate between routes, find elements, interact with them, and check visible UI conditions. Short test flows can run through mp_runScenario, with a Markdown result produced by mp_generateScenarioReport.

The server wraps miniprogram-automator and includes connection checks plus recovery tools such as mp_healthCheck and mp_recoverConnection. Stable qa-* selectors help keep page checks usable after UI changes. Screenshot handling is serial, so concurrent capture is outside its intended use; long flows are better split into shorter scenarios.

You need WeChat DevTools with automation and its service port enabled, Node.js 18+, npm, and a Mini Program project that DevTools can open. Without those DevTools settings, the MCP server cannot control the app.

What it helps with

  • inspect whether Mini Program elements are visible
  • capture the current page and its UI state
  • run a short regression flow after a UI change
  • create a Markdown report from a scenario
  • recover a dropped DevTools connection

Example prompts for the agent

  • Check the sign-in screen with mp_screenshot, then verify the main button with page_expectVisible.
  • Capture page_snapshot for the current route and assert the expected navigation.
  • Run a short flow with mp_runScenario and create its Markdown report with mp_generateScenarioReport.

How to install weapp-agent-mcp

Platform CLI

claude mcp add --env WEAPP_WS_ENDPOINT=<WEAPP_WS_ENDPOINT> --env WEAPP_AUTOMATOR_MODE=<WEAPP_AUTOMATOR_MODE> --env WEAPP_PROJECT_PATH=<WEAPP_PROJECT_PATH> --env WECHAT_DEVTOOLS_CLI_PATH=<WECHAT_DEVTOOLS_CLI_PATH> --env WEAPP_DEVTOOLS_PORT=<WEAPP_DEVTOOLS_PORT> --transport stdio weapp-agent-mcp -- npx -y @chaixueyuan/weapp-agent-mcp

Replace <…> with your own values. 10 more environment variables are in the server README

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 weapp-agent-mcp

How do I install weapp-agent-mcp in Claude Code?

Run `claude mcp add weapp-agent-mcp -e WEAPP_AUTO_ACCOUNT=<WEAPP_AUTO_ACCOUNT> -e WEAPP_DEVTOOLS_TICKET=<WEAPP_DEVTOOLS_TICKET> -- npx -y @chaixueyuan/weapp-agent-mcp`. Then configure access to WeChat DevTools and its connection settings.

What does weapp-agent-mcp do?

It gives an agent MCP tools for driving WeChat DevTools, including page navigation, screenshots, element actions, UI assertions, and short scenario runs.

What is required before using the MCP server?

Install WeChat DevTools, enable automation and its service port, and have Node.js 18+, npm, and a Mini Program project that can be opened in DevTools.

Similar MCP servers

All MCP servers for Mobile →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor