io.github.Chaixueyuan

weapp-agent-mcp

Agent-first MCP server for WeChat Mini Program debugging & automation via WeChat DevTools.

stdiocommunityapplication

Package Details

Transportstdio

Environment Variables

WEAPP_WS_ENDPOINT(str)

Automation WebSocket endpoint for the 'connect' flow (e.g. ws://localhost:9420). When a local endpoint is not listening and auto-launch is enabled, mp_ensureConnection may start DevTools if it can resolve a project.

WEAPP_AUTOMATOR_MODE(str)

Force 'launch' or 'connect' mode. Defaults to 'launch' unless WEAPP_WS_ENDPOINT is set.

WEAPP_PROJECT_PATH(str)

Optional Mini Program project directory used by launch and local auto-launch flows. The server can also resolve a persisted default, a recent project, or the current working directory.

WECHAT_DEVTOOLS_CLI_PATH(str)

Optional override for the WeChat DevTools CLI binary path (e.g. /Applications/wechatwebdevtools.app/Contents/MacOS/cli on macOS).

WEAPP_DEVTOOLS_PORT(str)

Automation websocket port passed to 'cli auto --auto-port' in launch mode (default 9420).

WEAPP_DEVTOOLS_TIMEOUT(str)

Milliseconds passed to miniprogram-automator when launching WeChat DevTools.

WEAPP_AUTO_ACCOUNT(str)
Secret

Optional account passed to miniprogram-automator launch.

WEAPP_DEVTOOLS_TICKET(str)
Secret

Optional DevTools launch ticket.

WEAPP_TRUST_PROJECT(str)

Whether launch mode should trust the project. Accepts true/false, 1/0, yes/no, or on/off.

WEAPP_DEVTOOLS_ARGS(str)

Additional whitespace-separated CLI arguments passed during launch.

WEAPP_DEVTOOLS_CWD(str)

Optional working directory passed to the DevTools launch process.

WEAPP_AUTOCLOSE(str)

Whether to close or disconnect the automator session after each tool call. Accepts true/false, 1/0, yes/no, or on/off.

WEAPP_AUTOLAUNCH(str)

Allow mp_ensureConnection to launch local WeChat DevTools with cli auto when the configured local automation port is not listening. Defaults to enabled; set false to disable.

WEAPP_LAUNCH_TIMEOUT(str)

Milliseconds to wait for a locally auto-launched automation port (default 45000).

WEAPP_CONNECT_TIMEOUT(str)

Milliseconds to wait for an automator websocket connection (default 45000).