W

Weapp Agent MCP

by Chaixueyuan · io.github.Chaixueyuan/weapp-agent-mcp

MCP server for WeChat Mini Program debugging and automation, enabling agents to perform UI operations, screenshots, and regression testing through natural language commands.

npm Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-chaixueyuan-weapp-agent-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@chaixueyuan/weapp-agent-mcp"
      ],
      "env": {
        "WEAPP_WS_ENDPOINT": "<VALUE>",
        "WEAPP_AUTOMATOR_MODE": "<VALUE>",
        "WEAPP_PROJECT_PATH": "<VALUE>",
        "WECHAT_DEVTOOLS_CLI_PATH": "<VALUE>",
        "WEAPP_DEVTOOLS_PORT": "<VALUE>",
        "WEAPP_DEVTOOLS_TIMEOUT": "<VALUE>",
        "WEAPP_AUTO_ACCOUNT": "<YOUR_VALUE>",
        "WEAPP_DEVTOOLS_TICKET": "<YOUR_VALUE>",
        "WEAPP_TRUST_PROJECT": "<VALUE>",
        "WEAPP_DEVTOOLS_ARGS": "<VALUE>",
        "WEAPP_DEVTOOLS_CWD": "<VALUE>",
        "WEAPP_AUTOCLOSE": "<VALUE>",
        "WEAPP_AUTOLAUNCH": "<VALUE>",
        "WEAPP_LAUNCH_TIMEOUT": "<VALUE>",
        "WEAPP_CONNECT_TIMEOUT": "<VALUE>"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-chaixueyuan-weapp-agent-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@chaixueyuan/weapp-agent-mcp"
      ],
      "env": {
        "WEAPP_WS_ENDPOINT": "<VALUE>",
        "WEAPP_AUTOMATOR_MODE": "<VALUE>",
        "WEAPP_PROJECT_PATH": "<VALUE>",
        "WECHAT_DEVTOOLS_CLI_PATH": "<VALUE>",
        "WEAPP_DEVTOOLS_PORT": "<VALUE>",
        "WEAPP_DEVTOOLS_TIMEOUT": "<VALUE>",
        "WEAPP_AUTO_ACCOUNT": "<YOUR_VALUE>",
        "WEAPP_DEVTOOLS_TICKET": "<YOUR_VALUE>",
        "WEAPP_TRUST_PROJECT": "<VALUE>",
        "WEAPP_DEVTOOLS_ARGS": "<VALUE>",
        "WEAPP_DEVTOOLS_CWD": "<VALUE>",
        "WEAPP_AUTOCLOSE": "<VALUE>",
        "WEAPP_AUTOLAUNCH": "<VALUE>",
        "WEAPP_LAUNCH_TIMEOUT": "<VALUE>",
        "WEAPP_CONNECT_TIMEOUT": "<VALUE>"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-chaixueyuan-weapp-agent-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@chaixueyuan/weapp-agent-mcp"
      ],
      "env": {
        "WEAPP_WS_ENDPOINT": "<VALUE>",
        "WEAPP_AUTOMATOR_MODE": "<VALUE>",
        "WEAPP_PROJECT_PATH": "<VALUE>",
        "WECHAT_DEVTOOLS_CLI_PATH": "<VALUE>",
        "WEAPP_DEVTOOLS_PORT": "<VALUE>",
        "WEAPP_DEVTOOLS_TIMEOUT": "<VALUE>",
        "WEAPP_AUTO_ACCOUNT": "<YOUR_VALUE>",
        "WEAPP_DEVTOOLS_TICKET": "<YOUR_VALUE>",
        "WEAPP_TRUST_PROJECT": "<VALUE>",
        "WEAPP_DEVTOOLS_ARGS": "<VALUE>",
        "WEAPP_DEVTOOLS_CWD": "<VALUE>",
        "WEAPP_AUTOCLOSE": "<VALUE>",
        "WEAPP_AUTOLAUNCH": "<VALUE>",
        "WEAPP_LAUNCH_TIMEOUT": "<VALUE>",
        "WEAPP_CONNECT_TIMEOUT": "<VALUE>"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-chaixueyuan-weapp-agent-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@chaixueyuan/weapp-agent-mcp"
      ],
      "env": {
        "WEAPP_WS_ENDPOINT": "<VALUE>",
        "WEAPP_AUTOMATOR_MODE": "<VALUE>",
        "WEAPP_PROJECT_PATH": "<VALUE>",
        "WECHAT_DEVTOOLS_CLI_PATH": "<VALUE>",
        "WEAPP_DEVTOOLS_PORT": "<VALUE>",
        "WEAPP_DEVTOOLS_TIMEOUT": "<VALUE>",
        "WEAPP_AUTO_ACCOUNT": "<YOUR_VALUE>",
        "WEAPP_DEVTOOLS_TICKET": "<YOUR_VALUE>",
        "WEAPP_TRUST_PROJECT": "<VALUE>",
        "WEAPP_DEVTOOLS_ARGS": "<VALUE>",
        "WEAPP_DEVTOOLS_CWD": "<VALUE>",
        "WEAPP_AUTOCLOSE": "<VALUE>",
        "WEAPP_AUTOLAUNCH": "<VALUE>",
        "WEAPP_LAUNCH_TIMEOUT": "<VALUE>",
        "WEAPP_CONNECT_TIMEOUT": "<VALUE>"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-chaixueyuan-weapp-agent-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@chaixueyuan/weapp-agent-mcp"
      ],
      "env": {
        "WEAPP_WS_ENDPOINT": "<VALUE>",
        "WEAPP_AUTOMATOR_MODE": "<VALUE>",
        "WEAPP_PROJECT_PATH": "<VALUE>",
        "WECHAT_DEVTOOLS_CLI_PATH": "<VALUE>",
        "WEAPP_DEVTOOLS_PORT": "<VALUE>",
        "WEAPP_DEVTOOLS_TIMEOUT": "<VALUE>",
        "WEAPP_AUTO_ACCOUNT": "<YOUR_VALUE>",
        "WEAPP_DEVTOOLS_TICKET": "<YOUR_VALUE>",
        "WEAPP_TRUST_PROJECT": "<VALUE>",
        "WEAPP_DEVTOOLS_ARGS": "<VALUE>",
        "WEAPP_DEVTOOLS_CWD": "<VALUE>",
        "WEAPP_AUTOCLOSE": "<VALUE>",
        "WEAPP_AUTOLAUNCH": "<VALUE>",
        "WEAPP_LAUNCH_TIMEOUT": "<VALUE>",
        "WEAPP_CONNECT_TIMEOUT": "<VALUE>"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-chaixueyuan-weapp-agent-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@chaixueyuan/weapp-agent-mcp"
      ],
      "env": {
        "WEAPP_WS_ENDPOINT": "<VALUE>",
        "WEAPP_AUTOMATOR_MODE": "<VALUE>",
        "WEAPP_PROJECT_PATH": "<VALUE>",
        "WECHAT_DEVTOOLS_CLI_PATH": "<VALUE>",
        "WEAPP_DEVTOOLS_PORT": "<VALUE>",
        "WEAPP_DEVTOOLS_TIMEOUT": "<VALUE>",
        "WEAPP_AUTO_ACCOUNT": "<YOUR_VALUE>",
        "WEAPP_DEVTOOLS_TICKET": "<YOUR_VALUE>",
        "WEAPP_TRUST_PROJECT": "<VALUE>",
        "WEAPP_DEVTOOLS_ARGS": "<VALUE>",
        "WEAPP_DEVTOOLS_CWD": "<VALUE>",
        "WEAPP_AUTOCLOSE": "<VALUE>",
        "WEAPP_AUTOLAUNCH": "<VALUE>",
        "WEAPP_LAUNCH_TIMEOUT": "<VALUE>",
        "WEAPP_CONNECT_TIMEOUT": "<VALUE>"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
WEAPP_WS_ENDPOINT No 已运行的开发者工具自动化 WebSocket 端点。设置后,服务器使用 connect 模式而不是启动新实例。示例:ws://localhost:9420
WEAPP_AUTOMATOR_MODE No 强制使用 launch 或 connect 模式。除非提供了 WEAPP_WS_ENDPOINT,否则默认为 launch
WEAPP_PROJECT_PATH No 小程序项目路径(可选)
WECHAT_DEVTOOLS_CLI_PATH No 微信开发者工具 CLI 路径(如果默认路径有效则可选)
WEAPP_DEVTOOLS_PORT No launch 模式下传给 cli auto --auto-port 的自动化端口。不会在失败后自动切到其他端口
WEAPP_DEVTOOLS_TIMEOUT No 启动超时时间(毫秒,默认 30000)
WEAPP_AUTO_ACCOUNT secret No 传递给 --auto-account 用于自动登录
WEAPP_DEVTOOLS_TICKET secret No 启动时传递给 --ticket
WEAPP_TRUST_PROJECT No 设置为 true 以在启动时包含 --trust-project
WEAPP_DEVTOOLS_ARGS No 启动时的额外 CLI 参数(空格分隔)
WEAPP_DEVTOOLS_CWD No 传递给开发者工具进程的工作目录
WEAPP_AUTOCLOSE No 设置为 true 时,每次工具调用后关闭开发者工具会话
WEAPP_AUTOLAUNCH No 本地 connect 目标端口未监听时是否允许 mp_ensureConnection 使用 cli auto 拉起开发者工具;默认允许,设为 false 禁用
WEAPP_LAUNCH_TIMEOUT No 启动超时时间(毫秒,默认 45000)
WEAPP_CONNECT_TIMEOUT No 连接超时时间(毫秒,默认 45000)

Similar servers