wechat-devtools-mcp
It exposes 7 aggregate MCP tools that let AI assistants drive WeChat DevTools for Mini Program development.
Manage IDE lifecycle: open projects, login/check login, close/quit, and diagnose environment/status.
Build and release: compile, preview, upload, build npm, and clean caches.
Automate interactions: tap, input, inspect elements, set data, call methods/WX APIs, mock WX, evaluate JS, and query page stack/data/system info/storage.
Collect runtime logs: automator console/JS exceptions and CDP warnings/render errors/deprecated API notices.
Capture screenshots: viewport or auto-scrolled stitched full-page screenshots.
Navigate to pages and collect CDP logs for lifecycle/error checks.
Read project files and structure: project info, page list, page source, and individual files.
Provides integration with WeChat Developer Tools to automate WeChat Mini Program development, testing, debugging, UI inspection, screenshot capture, navigation, and project file management.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@wechat-devtools-mcp打开项目并预览"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
WeChat DevTools MCP Server (v0.9.15)
Wraps the WeChat DevTools CLI as an MCP (Model Context Protocol) service, allowing AI in editors to directly invoke WeChat CLI commands, enabling a closed loop for mini program development, testing, debugging, and automation.
[!IMPORTANT] This project adopts a "thin MCP + fat Skill" architecture: the MCP Server provides 7 aggregated APIs, and the accompanying wechat-devtools Skill provides SOP workflows, parameter quick references, and best practices. Both must be used together — without the Skill, the AI will not be able to operate mini programs following the correct workflow.
Published to the official MCP Registry, with one-click installation across platforms (Windows / macOS).
🚀 Installation and Quick Start
Step 1 — Install the MCP Server
uv is recommended, as it automatically handles Python dependencies and provides an isolated execution environment.
pip install uv # 安装 uv(如已安装可跳过)
uv tool install wechat-devtools-mcp --force # 一键安装到全局隔离环境[!WARNING] If you previously installed an older version via
pip install, uninstall it first to avoid version conflicts:pip uninstall wechat-devtools-mcpThe
pip installpath (e.g.Python313/Scripts/) may take precedence over theuv tool installpath (~/.local/bin/), causing the old version to actually run. You can confirm the current version via themcp_versionfield returned bywechat_ide(action='status').
[!WARNING] Version compatibility: ≥0.9.11 supports both mcp 1.x and 2.x (dependency declared as
mcp[cli]>=1.9,<3). ≤0.9.10 is incompatible with mcp ≥2.0 (fresh installs will reportModuleNotFoundError: mcp.server.fastmcp, see #9) — pinned users should upgrade to ≥0.9.11, or append--with "mcp<2"when installing.
[!TIP]
Check the actually running version (≥0.9.13):
wechat-devtools-mcp --version # 零依赖打印实际安装版本;uvx 复用已装环境不自拉最新,此命令可直接确认 uv tool list | grep wechat # 离线确认已安装版本Upgrading the tool: if the editor is running the MCP service, terminate the process before upgrading:
# Bash / CMD taskkill /F /IM "wechat-devtools-mcp*" 2>/dev/null; uv tool upgrade wechat-devtools-mcp# Windows PowerShell Get-Process | Where-Object { $_.ProcessName -like "*wechat-devtools*" } | Stop-Process -Force uv tool upgrade wechat-devtools-mcpOne-click upgrade via Agent:
taskkill /F /IM "wechat-devtools-mcp*" 2>/dev/null; uv tool upgrade wechat-devtools-mcp && npx -y skills add WaterTian/wechat-devtools-mcp/.agents/skills/wechat-devtools
Step 2 — Enable the DevTools Service Port
[!WARNING] This must be enabled manually, otherwise the AI will not be able to send any commands.
Path: DevTools → Settings → Security Settings → Service Port → Enable
💡 You can verify whether the port is enabled via
wechat_ide(action='status')— if it returns a connection failure, the service port has not been enabled yet.
Step 3 — Confirm Required Paths
Obtain the following two absolute paths in advance; you will need to fill them into the editor configuration later:
Path | Windows example | macOS example |
WeChat DevTools CLI |
|
|
Mini program project root |
|
|
macOS users: no need to escape slashes (
/) in JSON config; Windows users must write\as\\.
Step 4 — Editor Configuration
Modify claude_desktop_config.json or mcp_config.json (Antigravity):
{
"mcpServers": {
"wechat-devtools": {
"command": "uvx",
"args": ["wechat-devtools-mcp"],
"env": {
"WECHAT_DEVTOOLS_CLI": "C:\\Program Files (x86)\\Tencent\\微信web开发者工具\\cli.bat",
"WECHAT_PROJECT_PATH": "D:\\Your\\Project\\Path"
}
}
}
}Edit ~/.kiro/settings/mcp.json:
{
"mcpServers": {
"wechat-devtools": {
"command": "uvx",
"args": ["wechat-devtools-mcp"],
"env": {
"WECHAT_DEVTOOLS_CLI": "C:\\Program Files (x86)\\Tencent\\微信web开发者工具\\cli.bat",
"WECHAT_PROJECT_PATH": "D:\\Your\\Project\\Path",
"PYTHONIOENCODING": "utf-8"
},
"autoApprove": [
"wechat_ide", "wechat_build", "wechat_automator", "wechat_inspector",
"wechat_screenshot", "wechat_navigate", "wechat_file"
]
}
}
}Edit ~/.codex/config.toml (global) or .codex/config.toml (project-level):
[mcp_servers.wechat-devtools]
command = "uvx"
args = ["wechat-devtools-mcp"]
[mcp_servers.wechat-devtools.env]
WECHAT_DEVTOOLS_CLI = "C:\\Program Files (x86)\\Tencent\\微信web开发者工具\\cli.bat"
WECHAT_PROJECT_PATH = "D:\\Your\\Project\\Path"You can also add it quickly via CLI:
codex mcp add wechat-devtools \
--env WECHAT_DEVTOOLS_CLI="C:\\Program Files (x86)\\Tencent\\微信web开发者工具\\cli.bat" \
--env WECHAT_PROJECT_PATH="D:\\Your\\Project\\Path" \
-- uvx wechat-devtools-mcpAdd a new Server in the MCP console:
Name:
wechat-devtoolsType:
commandCommand:
uvx wechat-devtools-mcpEnvironment Variables: add
WECHAT_DEVTOOLS_CLIandWECHAT_PROJECT_PATHas above
On Windows, backslashes in paths need to be escaped (
\\).
If you use Claude Code to develop inside a mini program repository, you can create a project-level .mcp.json (automatically follows the repository and applies to collaborators).
Windows — .mcp.json at the repository root:
{
"mcpServers": {
"wechat-devtools": {
"command": "uvx",
"args": ["wechat-devtools-mcp"],
"env": {
"WECHAT_DEVTOOLS_CLI": "C:\\Program Files (x86)\\Tencent\\微信web开发者工具\\cli.bat",
"WECHAT_PROJECT_PATH": "D:\\Your\\Project\\Path"
}
}
}
}macOS — .mcp.json at the repository root:
{
"mcpServers": {
"wechat-devtools": {
"command": "/opt/homebrew/bin/uvx",
"args": ["wechat-devtools-mcp"],
"env": {
"PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin",
"WECHAT_DEVTOOLS_CLI": "/Applications/wechatwebdevtools.app/Contents/MacOS/cli",
"WECHAT_PROJECT_PATH": "/Users/<you>/WeChatProjects/<project>",
"NODE_PATH": "/opt/homebrew/bin/node"
}
}
}
}Three key differences on macOS:
commandmust use the absolute path/opt/homebrew/bin/uvx(Claude Code'sPATHdoes not include Homebrew when spawning child processes)
env.PATHmust be explicitly injected (especially needed when also configuringnpx-based MCPs such as cloudbase / chrome-devtools, otherwisenpx's#!/usr/bin/env nodecannot find Node)
NODE_PATHis recommended to be explicitly specified as a fallback when starting as a daemon
When configuring multiple MCPs at once (cloudbase / chrome-devtools, etc.), handle the
commandabsolute path andenv.PATHfor each server in the same pattern.
Trae v1.3.0+ supports MCP. AI panel → Settings icon in the top right → MCP → Add → Manual configuration, paste the JSON below and save.
Windows:
{
"mcpServers": {
"wechat-devtools": {
"command": "uvx",
"args": ["wechat-devtools-mcp"],
"env": {
"WECHAT_DEVTOOLS_CLI": "C:\\Program Files (x86)\\Tencent\\微信web开发者工具\\cli.bat",
"WECHAT_PROJECT_PATH": "D:\\Your\\Project\\Path"
}
}
}
}macOS:
{
"mcpServers": {
"wechat-devtools": {
"command": "/opt/homebrew/bin/uvx",
"args": ["wechat-devtools-mcp"],
"env": {
"PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin",
"WECHAT_DEVTOOLS_CLI": "/Applications/wechatwebdevtools.app/Contents/MacOS/cli",
"WECHAT_PROJECT_PATH": "/Users/<you>/WeChatProjects/<project>",
"NODE_PATH": "/opt/homebrew/bin/node"
}
}
}
}You can also edit the config file directly:
Windows:
%APPDATA%\Trae\User\globalStorage\mcp.jsonmacOS:
~/Library/Application Support/Trae/User/globalStorage/mcp.json
[!IMPORTANT] You must select the 「Builder with MCP」 agent in the chat box; regular agents do not call MCP tools. It is also recommended to install the wechat-devtools Skill (Step 5) so the AI calls tools in SOP order.
Step 5 — Install the Skill (Required)
[!IMPORTANT] This MCP must be used together with the wechat-devtools Skill. The Skill contains all the SOP workflows, parameter quick references, and troubleshooting guides the AI needs to operate mini programs. Without the Skill installed, the AI can only call bare APIs and cannot automatically execute standardized testing and debugging workflows.
Option 1: npx skills add (Claude Code users)
npx -y skills add WaterTian/wechat-devtools-mcp/.agents/skills/wechat-devtoolsThis pulls it into ~/.claude/skills/, and Claude Code loads it automatically.
Option 2: Manually place it in .agents/skills/ (clients that load from .agents/skills/, such as Trae)
Run this in the mini program project root:
git clone --depth 1 https://github.com/WaterTian/wechat-devtools-mcp.git .wdm-tmp
mkdir -p .agents/skills
cp -r .wdm-tmp/.agents/skills/wechat-devtools .agents/skills/
rm -rf .wdm-tmpThe resulting directory structure:
your-project/
└── .agents/skills/
└── wechat-devtools/
├── SKILL.md # 主指令文件(SOP + 能力映射 + 红线规则)
└── references/
└── tool_reference.md # 7 个聚合 API 完整参数参考[!TIP] Trae users: make sure the Settings → Skills & Commands → Enable .agents skills directory toggle is on (on by default). After saving, refresh and you will see
wechat-devtoolsunder the "Skills → Project" tab.
Related MCP server: weapp-agent-mcp
🛠️ Toolbox Overview
The MCP Server provides 7 aggregated tools covering the full mini program lifecycle:
Tool | Function | Supported actions |
| IDE lifecycle management |
|
| Build and publish |
|
| Automated interaction |
|
| Runtime log collection |
|
| UI screenshots (long image stitching) | — |
| Navigate to pages and collect CDP logs | — |
| Project file reading |
|
For cloud functions and cloud database management, use CloudBase MCP (
manageFunctions/readNoSqlDatabaseContent, etc.), which is more complete and has no IDE dependency.wechat_cloudhas been disabled since v0.9.5.
🧠 Skill Content Details
The Skill lets the AI automatically match and execute standardized operation workflows after receiving natural language instructions:
What you say | What the AI executes |
"Check all pages for errors" | SOP D — Full-page inspection |
"Click the login button and take a screenshot" | SOP B — UI debugging |
"The page is blank, help me troubleshoot" | SOP C — Exception troubleshooting |
"Mock the payment API and test the payment flow" | SOP E — Mock integration testing |
"Test the detail page, what are the parameter names?" | SOP G — Sub-page testing |
"Compare whether points are consistent across pages" | SOP I — Cross-page data validation |
The Skill includes
9 SOP workflows — initialization, UI debugging, exception troubleshooting, full-page inspection, Mock integration testing, network debugging and UI adaptation, sub-page testing, cross-page data validation, parallel data comparison
Capability mapping dictionary — quick index of 7 aggregated tools × all actions
CDP progressive troubleshooting strategy — two stages: concise → full, to control token consumption
Complete parameter reference — required/optional parameters, return examples, and common templates for each action
Troubleshooting manual — common error codes and how to fix them
See Step 5 — Install the Skill for installation instructions
💡 Environment Variables
Variable | Description | Default | Required |
| WeChat DevTools CLI path | — | Yes |
| Default mini program project absolute path | — | Yes |
| CLI command timeout (seconds) |
| No |
| Node.js executable path |
| No |
❓ FAQ
Most common cause: the WeChat DevTools "Service Port" is not enabled.
Go to Settings → Security → Service Port and turn it on. Once enabled, the AI can reconnect without restarting the IDE.
If you opened DevTools manually, it may not be listening on the debug port. Close DevTools and let the AI run wechat_ide(action='open', cdp_enabled=True) to start it in debug mode.
The MCP service in the editor is still running. See the upgrade note under Step 1 — you need to terminate the process before upgrading.
An older version installed via pip install may take precedence. Run pip uninstall wechat-devtools-mcp to remove the old version, then confirm the mcp_version field is the latest via wechat_ide(action='status').
Make sure WECHAT_DEVTOOLS_CLI in the editor configuration's env is set to an absolute path:
Windows: use double backslashes (e.g.
C:\\...\\cli.bat)macOS: standard path
/Applications/wechatwebdevtools.app/Contents/MacOS/cli, no need to escape slashes
When GUI clients (such as Claude Desktop) start MCP, PATH may not include /opt/homebrew/bin. Since MCP v0.9.6, the Homebrew standard path is attempted automatically; if it still fails, set it explicitly in env:
"NODE_PATH": "/opt/homebrew/bin/node"📋 Version History
Version | Description |
0.9.15 | Adapt to DevTools 2.x (Electron) + fix long-standing CDP collection failure: DevTools 2.x switched to Electron (1.06.x Stable still uses NW.js, dual-track compatible, no replacement). macOS startup path auto-detects runtime based on presence of |
0.9.14 | File read path fix + parameter invalidation fix: |
0.9.13 |
|
0.9.12 | Handshake response package version + dependency upper bound: Under mcp 2.x, |
0.9.11 | Compatible with mcp 2.0.0: Official MCP Python SDK 2.0 (released 2026-07-28) removed |
0.9.10 | Fix page_path silent failure: screenshot.js verifies page path match after navigation; returns explicit error when |
0.9.9 | Fix screenshot causing mini-program restart: screenshot.js changes navigation for non-TabBar pages from |
0.9.8 | Fix automator connection stability: daemon.js |
0.9.7 | Fix daemon orphan process residue: daemon.js adds parent process watchdog, checks liveness every 5 seconds with |
0.9.6 | macOS adaptation: |
0.9.5 | Fix latent bug where compile health check permanently failed (ui_debug.js has no |
0.9.4 | Fix switchTab navigation not taking effect (switched to |
Version | Description |
0.9.3 | status adds |
0.9.2 | Fix navigate timeout after compile: daemon connection health check adds 3s timeout protection; automatically invalidates old cached connections and reconnects after compile; navigate currentPage polling adds 2s independent timeout per call; distinguishes HEALTH_CHECK_TIMEOUT and CONNECTION_ERROR error codes |
0.9.1 | Fix AttributeError crash when cdp_enabled=true; add WXML runtime error collection (CDP automatically captures warnings such as template not found after compile) |
0.9.0 | Persistent Node daemon architecture: single daemon process stays resident, NDJSON protocol communication, WS connections reused by port; single daemon.bundle.js replaces 8 independent bundles; tool call latency reduced from 500ms+ to ~3ms; daemon automatically rebuilds connections after compile with zero disconnects |
0.8.0 | Automatically reconnect automator after compile; navigate automatically detects TabBar pages and uses switchTab; screenshot adds full_page/scroll_top/page_path parameters and viewport screenshot mode; page_data adds expected_path polling to prevent stale data; long image stitching dynamic step size fixes content gaps; node_bridge unified connection disconnect retry + 500ms call interval; start port verification increased to 20 times |
0.7.0 | navigate variable scope fix (currentPageTimeout); evaluate supports declaration statements (const/let/var fallback); call_method returns current page path; automator start port polling verification replaces blind waiting; SKILL.md adds efficiency principles, recovery levels, page navigation methods, 6 troubleshooting entries |
0.6.0 | navigate supports query parameters (reLaunch timeout fallback); CDP startup noise filtering (console.assert/__route__/ide:// noise reduction + WXML error protection); compile return value three-way classification + automator invalidation prompt; navigate currentPage polling retry; configurable timeout |
0.5.1 |
|
0.5.0 | Skill SOP comprehensive optimization: adds SOP I/J; adds AppID check and path validation; CDP noise filtering; screenshot stitching fuzzy matching fix |
0.4.1 | Screenshot long page stitching rewrite: fixed region detection, DPR adaptation, dynamic overlap calculation |
0.4.0 | CDP log enhancement, cloud function deployment automatic verification, navigate intelligent diagnostics, adds SOP G/H |
0.3.0 | Major refactor: 44 tools consolidated into 8 APIs; CDP log v2; adds SKILL.md knowledge base |
0.2.6 | README adds OpenAI Codex configuration instructions |
0.2.5 | Adds Kiro editor configuration instructions |
0.2.4 | Screenshot scroll stitching fix: |
0.2.3 | Package optimization: excludes |
0.2.2 | Node.js scripts changed to bundle-only mode |
0.2.1 | Version update and documentation improvements |
0.2.0 | navigate switched to CDP high-definition log collection |
0.1.9 | Fix UTF-8 encoding garbled text |
0.1.8 | Fix Windows Chinese path UnicodeDecodeError |
0.1.7 | Adds core/full toolset presets; adds MCP_DOC.md |
0.1.6 |
|
0.1.5 | Fix Windows stdio blocking issue |
0.1.4 | Adds CDP logs, screenshots, automation and other features |
0.1.3 | Initial version |
Reference Documentation
License
MIT
Available Tools
7 toolswechat_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?}。
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare this is not read-only, not idempotent, and not destructive, so the safety profile is partly covered. The description adds the return envelope {success, data, message, error_code?}, which is helpful, but it does not disclose that actions like set_data and mock_wx mutate runtime state or that start launches/attaches to an automation session with timeout behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The purpose is front-loaded in the first line, followed by a compact action inventory and a one-line return contract. Every line conveys actionable information with no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need little elaboration, and the action inventory is complete. However, for a complex multi-action automation tool, the description omits essential operational context: start-before-use sequencing, environment prerequisites, and how this tool differs from the sibling inspector/navigate tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Although the reported top-level coverage is 0%, the nested schema actually documents every field with action-conditional requirements (selector for tap/input, value for input, data_json for set_data, etc.). The description's action list adds only marginal semantics beyond the enum; the detailed parameter meaning is carried by the schema, so baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names the resource (小程序) and gives a concrete action taxonomy with short glosses for each action, so an agent can tell what family of operations the tool performs. It does not, however, distinguish this aggregate automator from siblings like wechat_inspector or wechat_navigate, which likely overlap with element_info and page_stack.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Listing actions such as start(开启自动化) implies that automation must be started before interactive calls, which is useful implied guidance. But there is no explicit when-to-use versus siblings, no statement of prerequisites like DevTools being open or a project being loaded, and no guidance on choosing among the 13 actions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wechat_buildBIdempotent
构建、预览、上传小程序及 npm 管理。 支持 action: compile(编译检查), preview(预览), upload(上传), build_npm(构建NPM), cache_clean(清缓存)。 返回 JSON: {success, data, message, error_code?}。
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare destructiveHint=false, idempotentHint=true and openWorldHint=false, so the safety profile is covered. The description adds the return envelope {success, data, message, error_code?} but does not disclose real side effects: upload publishes a version, cache_clean irreversibly clears state, and most actions require a running IDE. That's useful framing but not full disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short, front-loaded lines: capability, action list, return shape. There is minor redundancy in re-describing the return value when an output schema exists, and the action list is terse enough to be ambiguous, but nothing is padded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 13-field, multi-mode tool this is thin: no statement that the WeChat IDE must be open (or which sibling opens it), no per-action parameter expectations, and no warning about upload's external visibility. The existing output schema covers return values, so that omission is acceptable, but the operational preconditions are missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description restates the action enum with short glosses (compile=编译检查, upload=上传), which adds meaning beyond the bare enum whose schema description is only '操作类型'. However, it says nothing about the cross-field requirements (version/desc only for upload, cdp_port/cache_clean only for compile), leaving the 13 nested fields entirely to the schema. The reported schema coverage of 0% at the top level pushes this toward the baseline rather than above it.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names specific verbs (构建/预览/上传/npm 管理) and a concrete resource (小程序), and enumerates the five actions, so the agent can tell this is the build-and-release tool rather than execution or inspection. It does not explicitly contrast itself with siblings like wechat_ide or wechat_automator, which keeps it at 4.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The action list implies when each mode applies (compile for checking, preview for previewing, upload for release), but there is no explicit 'use this when…, use X instead' guidance and no mention of prerequisites such as the IDE being open. Usage is inferable rather than stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wechat_fileARead-onlyIdempotent
读取小程序项目文件和结构信息。 支持 action: project_info(项目完整信息), list_pages(页面列表), read_page(读取页面源码), read_file(读取单个文件)。 返回 JSON: {success, data, message, error_code?}。
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already disclose readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds the JSON return structure ({success, data, message, error_code?}) and enumerates the supported actions, which gives further behavioral clarity. No contradiction with annotations exists, and the description complements the safety profile without duplicating it.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single paragraph that front-loads the purpose, lists the actions, and states the return format. Every sentence contributes value, and there is no filler. It is concise and well-structured, though slightly compact for the amount of information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With an output schema present, the description need not detail return fields extensively, and it does provide the top-level JSON shape. However, it does not explain parameter relationships or optionality (e.g., which paths are required for which actions), which an agent would need to call the tool correctly. Given the tool's multi-action nature and optional parameters, this is a noticeable gap, though not critical for a read-only tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description explains the meaning of the 'action' enum values (project_info, list_pages, read_page, read_file) but does not clarify the roles of 'file_path', 'page_path', or 'project_path', nor the dependencies (e.g., read_page requires page_path). The schema provides descriptions for each field, but the context signal indicates 0% description coverage, meaning the tool description does not substitute for that. The description only partially compensates for the low coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool reads WeChat mini program project files and structure, and lists four distinct actions (project_info, list_pages, read_page, read_file). This distinguishes it from sibling tools like wechat_navigate or wechat_screenshot, which have different purposes. The verb '读取' and resource '小程序项目文件' make the purpose explicit and unmistakeable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not explicitly state when to use this tool versus alternatives, but the available actions imply its scope (reading project files). It does not mention exclusions or conditions that would steer an agent to a sibling tool. Context is clear but there is no comparative guidance, so it remains adequate rather than optimal.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wechat_ideAIdempotent
微信开发者工具 IDE 生命周期管理。 支持 action: open(打开IDE/项目), login(扫码登录), is_login(检查登录), close(关闭项目), quit(退出IDE), status(环境诊断)。 返回 JSON: {success, data, message, error_code?}。
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover the safety profile (not read-only, idempotent, not destructive). The description adds value by disclosing the return JSON structure and clarifying each action's behavior (e.g., login requires QR scan), but it does not detail side effects, error conditions, or permission requirements beyond what annotations provide.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences plus a compact action list, front-loading the core purpose and return format with zero redundant or filler content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity, the annotations (safety hints) and output schema, the description provides enough context for an agent to select and invoke it correctly: it names the resource, lists actions, and states the return shape. Minor gaps exist around inter-tool dependencies and parameter requirements, but the schema covers parameter details.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description enriches the 'action' parameter by explaining each enum value (e.g., open opens IDE/project, login does QR login), which is not fully covered in the schema's generic 'operation type' description. However, it does not address the other parameters (port, appid, project_path, etc.), leaving the schema to carry that burden; baseline 3 is appropriate given the schema's own descriptions for those fields.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states the tool manages the WeChat DevTools IDE lifecycle and lists the supported actions (open, login, is_login, close, quit, status), making its purpose unambiguous and distinguishable from sibling tools like wechat_build or wechat_screenshot.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage through the action list but does not explicitly state when to use this tool, what prerequisites exist, or how it relates to the other wechat_* tools. An agent must infer that it should use this tool to manage IDE state before other operations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wechat_inspectorARead-onlyIdempotent
采集小程序运行时日志和异常。 支持 action: console(automator端口采集console日志和JS异常), cdp(通过CDP协议采集WXML警告、渲染层报错、废弃API提示等底层日志)。 cdp action 需先以 cdp_enabled=true 打开项目,确保端口 9222 可用。 返回 JSON: {success, data: {logs, summary}, message}。
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false. The description adds useful behavioral context beyond the annotations: the cdp setup requirement and the returned JSON envelope. There is no contradiction with the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the purpose, then gives the action distinctions, cdp prerequisite, and return shape in a compact form. The return-shape line is slightly redundant with the output schema, but it is brief and does not obscure the call guidance.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the annotations and output schema, the description covers the core decision of which action to use and the critical cdp setup requirement. It is complete enough to invoke correctly, though it could add sibling-alternative guidance for a perfect score.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds meaning beyond the action enum by explaining what console and cdp each capture, and it adds the cdp port/setup prerequisite. The schema already documents the individual nested parameters and defaults, though the description does not explain every optional parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: collecting mini-program runtime logs and exceptions. It also distinguishes the two supported capture modes, console and cdp, making the tool clearly separate from siblings like screenshot, navigate, build, and file.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly maps console to automator-port console logs and JS exceptions, and cdp to lower-level WXML warnings, render-layer errors, and deprecated API notices. It also gives the cdp prerequisite: open the project with cdp_enabled=true and ensure port 9222 is available. It does not explicitly say when not to use it or name a sibling alternative, so it is not a full 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wechat_screenshotARead-onlyIdempotent
实时捕获当前小程序模拟器的界面截图。 默认支持截取长图,自动滚动并拼接。 output_path 可选,留空则自动保存到项目目录下 screenshots/ 文件夹。 返回 JSON: {success, data: {path, width, height, segments}, message}。
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the annotations (readOnlyHint, idempotentHint, destructiveHint), the description reveals that the tool auto-scrolls and stitches long screenshots by default, that output_path can be omitted to save to screenshots/, and that the response is a JSON object with success, data.path/width/height/segments, and message. These behavioral details help the agent anticipate side effects and response shape. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four short sentences, each adding new information: purpose, long-screenshot default, output_path default, return format. The most important action and defaults are front-loaded. No redundant or marketing language.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a read-only screenshot tool with a rich schema and an output schema, the description covers the key defaults and return format. It does not mention prerequisites like the simulator being open or the meaning of 'segments', but these are minor given the existing schema and annotations. The description is sufficient for an agent to invoke the tool correctly in most cases.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The context signal reports 0% schema description coverage, so the description must compensate, but it only details output_path's default location and implicitly full_page's default. Parameters like overlap, auto_port, page_path, and scroll_top are not explained in the description, requiring the agent to inspect the nested $defs. The $defs do contain descriptions, which mitigates this, but the description itself adds little parametric meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: '实时捕获当前小程序模拟器的界面截图' (capture the current mini-program simulator interface screenshot in real-time). It further clarifies the long-screenshot default and references the output path and return JSON, leaving no doubt about the tool's function. This clearly distinguishes it from sibling tools like wechat_build or wechat_navigate.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear context that this is for capturing screenshots of the simulator and mentions default long-screenshot behavior. It does not, however, name any sibling tools or state when to prefer this over wechat_inspector or wechat_automator. A brief 'use this when you need a screenshot' would have been stronger, but the context is unambiguous enough.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v0.9.20- Changed
wechat_automator1 field changed- added
Input schema / $defs / WechatAutomatorInput / properties / ready_timeoutAdded value: +{ + "anyOf": [ + { + "maximum": 180, + "minimum": 5, + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "start 时等待 automator 首次应答的总秒数,默认 45(环境变量 WECHAT_AUTOMATOR_READY_TIMEOUT 可改);大项目冷启动可加大。", + "title": "Ready Timeout" +}
- Changed
wechat_build1 field changed- changed
Input schema / $defs / WechatBuildInput / properties / cdp_port / descriptionPrevious value: -"CDP 调试端口,compile 采集 WXML 运行时错误时使用。需与 wechat_ide(open) 的 cdp_port 一致。"New value: +"CDP 调试端口,compile 采集 WXML 运行时错误时使用。不传则沿用本会话 wechat_ide(open) 的端口。"
- Changed
wechat_ide1 field changed- changed
Input schema / $defs / WechatIdeInput / properties / cdp_port / descriptionPrevious value: -"CDP 调试端口,默认 9222。被 Chrome 等占用时可换端口(需与 inspector/navigate 保持一致)。"New value: +"CDP 调试端口,默认取环境变量 WECHAT_CDP_PORT(否则 9222)。open 前会检查端口上是谁,被别的浏览器占着直接报错;open 成功后同会话其它工具不传即沿用。"
- Changed
wechat_inspector1 field changed- changed
Input schema / $defs / WechatInspectorInput / properties / cdp_port / descriptionPrevious value: -"CDP 调试端口。"New value: +"CDP 调试端口,不传则沿用本会话 wechat_ide(open) 的端口。"
- Changed
wechat_navigate2 fields changed- changed
Input schema / $defs / WechatNavigateInput / properties / cdp_port / descriptionPrevious value: -"CDP 调试端口。"New value: +"CDP 调试端口,不传则沿用本会话 wechat_ide(open) 的端口。" - changed
Input schema / $defs / WechatNavigateInput / properties / project_path / descriptionPrevious value: -"小程序项目路径(仅用于提示)。"New value: +"小程序项目路径,用于读 app.json 判断 tabBar 页;默认 WECHAT_PROJECT_PATH。"
1 tool update
v0.9.18- Changed
wechat_automator3 fields changed- changed
Input schema / $defs / WechatAutomatorInput / properties / args_json / descriptionPrevious value: -"方法参数 JSON 数组,call_method/call_wx 时可选。"New value: +"JSON 数组,call_method/call_wx 的方法参数,或 evaluate(fn_source) 的函数入参;可选。" - changed
Input schema / $defs / WechatAutomatorInput / properties / expression / descriptionPrevious value: -"JS 表达式,evaluate 时必填。"New value: +"单个 JS 表达式,evaluate 时使用;多语句请改用 fn_source。" - added
Input schema / $defs / WechatAutomatorInput / properties / fn_sourceAdded value: +{ + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "evaluate 时可用:完整函数源码字符串,例如 'function(){ return wx.getSystemInfoSync(); }' 或 '(a,b)=>a+b',在小程序 AppService 内以 page.evaluate(fn, ...args) 方式执行,入参来自 args_json。函数体可含任意多条语句,需显式 return。与 expression 二选一,同时给则以 fn_source 为准。", + "title": "Fn Source" +}
7 tool updates
v0.9.16- First observed
wechat_automator - First observed
wechat_build - First observed
wechat_file - First observed
wechat_ide - First observed
wechat_inspector - First observed
wechat_navigate - First observed
wechat_screenshot
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.
Maintenance
Related MCP Connectors
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Official Duck Framework MCP server for AI-assisted development and project scaffolding.
Build your own tools from chat: design, test and host them on a shareable MCP server URL.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceAn MCP server that enables AI assistants to interact with WeChat Mini Programs, allowing developers to publish versions, analyze package size, diagnose compilation errors, and manage projects via natural language.78 npm3MIT
- AlicenseAqualityBmaintenanceMCP server for WeChat Mini Program debugging and automation, enabling agents to perform UI operations, screenshots, and regression testing through natural language commands.44154 npm22MIT
- AlicenseNot gradedqualityDmaintenanceConnects WeChat Mini Program tooling to MCP and automation workflows. Provides scripts for opening, previewing, and uploading projects, as well as automator smoke tests.1MIT
- AlicenseBqualityCmaintenanceEnables AI assistants to control WeChat mini-programs running in WeChat Developer Tools through MCP tools. Provides automation capabilities for launching, navigating, querying, and interacting with pages and elements.6113 npm1MIT