wechat-devtools-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| NODE_PATH | No | Node.js 执行文件路径 (Node.js executable path) | node |
| WECHAT_CLI_TIMEOUT | No | CLI 命令超时时间(秒)(CLI command timeout in seconds) | 30 |
| WECHAT_DEVTOOLS_CLI | Yes | 微信开发者工具 CLI 路径 (WeChat DevTools CLI path) | |
| WECHAT_PROJECT_PATH | Yes | 默认小程序项目绝对路径 (Default mini program project absolute path) |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| wechat_ideA | 微信开发者工具 IDE 生命周期管理。 支持 action: open(打开IDE/项目), login(扫码登录), is_login(检查登录), close(关闭项目), quit(退出IDE), status(环境诊断)。 返回 JSON: {success, data, message, error_code?}。 |
| wechat_buildB | 构建、预览、上传小程序及 npm 管理。 支持 action: compile(编译检查), preview(预览), upload(上传), build_npm(构建NPM), cache_clean(清缓存)。 返回 JSON: {success, data, message, error_code?}。 |
| wechat_automatorA | 小程序自动化交互与运行时查询。 支持 action: start(开启自动化), tap(点击), input(输入), element_info(元素信息), set_data(设置数据), call_method(调用方法), call_wx(调用wx API), mock_wx(Mock wx), evaluate(执行JS), page_stack(页面栈), page_data(页面数据), system_info(系统信息), storage(缓存)。 返回 JSON: {success, data, message, error_code?}。 |
| wechat_inspectorA | 采集小程序运行时日志和异常。 支持 action: console(automator端口采集console日志和JS异常), cdp(通过CDP协议采集WXML警告、渲染层报错、废弃API提示等底层日志)。 cdp action 需先以 cdp_enabled=true 打开项目,确保端口 9222 可用。 返回 JSON: {success, data: {logs, summary}, message}。 |
| wechat_screenshotA | 实时捕获当前小程序模拟器的界面截图。 默认支持截取长图,自动滚动并拼接。 output_path 可选,留空则自动保存到项目目录下 screenshots/ 文件夹。 返回 JSON: {success, data: {path, width, height, segments}, message}。 |
| wechat_navigateA | 跳转到指定页面,等待指定时间,通过 CDP 采集高清日志。 适用于页面生命周期日志检查(onLoad/onShow)、页面错误验证。 需先调用 wechat_automator(action='start') 并以 cdp_enabled=true 打开项目。 返回 JSON: {success, data: {current_page, cdp_logs}, message}。 |
| wechat_fileA | 读取小程序项目文件和结构信息。 支持 action: project_info(项目完整信息), list_pages(页面列表), read_page(读取页面源码), read_file(读取单个文件)。 返回 JSON: {success, data, message, error_code?}。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
The tools are mostly distinct by domain: IDE lifecycle, build/upload, automation, logging, navigation, file reading, and screenshots each have a clear role. There is some overlap between wechat_inspector and wechat_navigate because both collect CDP logs, and wechat_navigate depends on wechat_automator being started, but the descriptions make the intended boundaries reasonably clear.
All tools use a consistent wechat_ prefix and snake_case style, which makes the set predictable. The suffixes are mostly domain nouns (ide, build, automator, inspector, file) with one verb-like name (navigate), a minor deviation from an otherwise stable pattern.
Seven tools is well-scoped for a WeChat DevTools MCP server. Each tool represents a meaningful capability group with sub-actions, avoiding both a fragmented one-action-per-tool surface and an oversized tool list.
The surface covers the main developer workflow: IDE lifecycle, project/file inspection, build/preview/upload, screenshots, automation, navigation, and log collection. Minor gaps exist, such as no explicit automator stop/teardown action and no targeted element screenshot, but core workflows are well covered.