Wechat Devtools MCP logo

Wechat Devtools MCP

Community
WaterTian

微信开发者工具 MCP & Skills

PublisherWaterTian
Repositorywechat-devtools-mcp
LanguagePython
Forks
15
Stars
148
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Wechat Devtools MCP exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    148 stars and 15 forks from the linked repository.

微信开发者工具 MCP Server (v0.9.18)

PyPI version MCP Registry License: MIT English

把微信开发者工具封装为 MCP 服务,让编辑器里的 AI 直接完成小程序的编译、预览、调试、自动化测试闭环。Windows / macOS,已上架官方 MCP Registry。

[!IMPORTANT] 「瘦 MCP + 胖 Skill」:MCP Server 只提供 7 个聚合工具,操作流程与最佳实践都在配套的 wechat-devtools Skill 里。两者必须一起装。


🤝 与官方能力的关系

微信开发者工具 2.x 自 2026-08-18 起为官方 Stable(1.06 已下架),IDE 内建 MCP Server(47 个原子工具)。两者互补,不是替代:

场景用谁
打开项目 / 编译 / 预览 / 上传 / 点击输入 / 云开发2.x 优先官方内建 MCP(wechat_ide(action='status') 的 official_mcp.available 为 true 即可用)
长图拼接截图(固定头尾识别,拍不全如实上报)本项目。官方只截视口并压到长边 1280 JPEG
CDP 结构化日志(回放采集前的历史、按页面归类、去噪)本项目。官方只读缓存
任务级 SOP(一句话跑完巡检 / 异常排查 / 跨页面校验)本项目 Skill
存量 1.06.x(NW.js)本项目继续兼容;官方内建 MCP 仅 2.x 有

⚠ 官方 IDE 把自家 bridge 注册为 wechat-devtools。本文示例统一用 wechat-devtools-mcp 避免撞名;旧名配置仍可用,只在同一 agent 同时接入两者时才需区分。


🚀 快速开始

Step 1 — 安装 MCP Server

bash
pip install uv                                  # 如已装可跳过
uv tool install wechat-devtools-mcp --force
wechat-devtools-mcp --version                   # 确认实际运行版本

[!WARNING] 曾用 pip install 装过旧版的,先 pip uninstall wechat-devtools-mcp,否则旧路径优先于 uv。 ≤0.9.10 与 mcp SDK ≥2.0 不兼容(报 ModuleNotFoundError: mcp.server.fastmcp),请升到 ≥0.9.11。

升级前先停掉编辑器里正在跑的 MCP 进程,再 uv tool upgrade wechat-devtools-mcp。

Step 2 — 开启开发者工具服务端口

开发者工具 → 设置 → 安全设置 → 服务端口 → 开启。不开则所有操作报 CLI_TIMEOUT。

Step 3 — 准备两个绝对路径

路径WindowsmacOS
开发者工具 CLIC:\Program Files (x86)\Tencent\微信web开发者工具\cli.bat/Applications/wechatwebdevtools.app/Contents/MacOS/cli
小程序项目根目录D:\MyProjects\mini-app/Users/<you>/Projects/mini-app

JSON 里 Windows 路径的 \ 要写成 \\;macOS 的 / 不用转义。

Step 4 — 编辑器配置

标准配置(Claude Desktop / Antigravity / Kiro / Trae / Claude Code .mcp.json 通用):

json
{
  "mcpServers": {
    "wechat-devtools-mcp": {
      "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"
      }
    }
  }
}
编辑器配置位置差异
Claude Desktop / Antigravityclaude_desktop_config.json / mcp_config.json无
Claude Code(项目级)仓库根目录 .mcp.jsonmacOS 下 command 用绝对路径 /opt/homebrew/bin/uvx,并在 env 加 "PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin" 与 "NODE_PATH": "/opt/homebrew/bin/node"(GUI 子进程不带 Homebrew PATH)
Kiro~/.kiro/settings/mcp.json可加 "autoApprove": ["wechat_ide","wechat_build","wechat_automator","wechat_inspector","wechat_screenshot","wechat_navigate","wechat_file"]
Trae ≥1.3AI 面板 → 设置 → MCP → 手动配置;或 %APPDATA%\Trae\User\globalStorage\mcp.json / ~/Library/Application Support/Trae/User/globalStorage/mcp.json聊天须选 Builder with MCP 智能体;macOS 同 Claude Code 的绝对路径写法
Cursor / VS CodeMCP 面板新增 serverName wechat-devtools-mcp,Command uvx wechat-devtools-mcp,环境变量同上
OpenAI Codex~/.codex/config.tomlTOML,见下
toml
[mcp_servers.wechat-devtools-mcp]
command = "uvx"
args = ["wechat-devtools-mcp"]

[mcp_servers.wechat-devtools-mcp.env]
WECHAT_DEVTOOLS_CLI = "C:\\Program Files (x86)\\Tencent\\微信web开发者工具\\cli.bat"
WECHAT_PROJECT_PATH = "D:\\Your\\Project\\Path"

Step 5 — 安装 Skill(必须)

bash
npx -y skills add WaterTian/wechat-devtools-mcp/.agents/skills/wechat-devtools

不走 npx skills 的客户端(如 Trae):把仓库的 .agents/skills/wechat-devtools/ 整个复制到小程序项目的 .agents/skills/ 下即可。Skill 含 9 条 SOP、7 工具全 action 速查、CDP 渐进排查策略与故障手册,详见 SKILL.md。


🛠️ 工具箱

工具用途action / 关键参数
wechat_ideIDE 生命周期与环境诊断open login is_login close quit status
wechat_build构建与发布compile preview upload build_npm cache_clean
wechat_automator自动化交互与运行时查询start tap input element_info set_data call_method call_wx mock_wx evaluate page_stack page_data system_info storage
wechat_inspector运行时日志采集console cdp
wechat_screenshot长图拼接截图full_page page_path scroll_top
wechat_navigate跳转并采集 CDP 日志page_path
wechat_file项目文件读取project_info list_pages read_page read_file

完整参数见 MCP_DOC.md。云函数与云数据库请用 CloudBase MCP。


💡 环境变量

变量说明默认
WECHAT_DEVTOOLS_CLI开发者工具 CLI 路径(必填)—
WECHAT_PROJECT_PATH默认项目根目录(必填)—
WECHAT_CLI_TIMEOUTCLI 超时秒数30
NODE_PATHNode.js 可执行文件node

❓ 常见问题

症状处理
一直报 CLI_TIMEOUT服务端口没开,见 Step 2;wechat_ide(action='status') 的 service_port_enabled 可自查
CDP 采集失败 / 采到的全是 Chrome9222 被占用。open(cdp_port=9223),且 inspector / navigate / build 用同一个 cdp_port
Windows 中文乱码或 UnicodeDecodeErrorenv 加 "PYTHONIOENCODING": "utf-8"
装了新版仍跑旧版pip uninstall wechat-devtools-mcp,再用 wechat-devtools-mcp --version 确认
IDE 2.x 下工具行为异常注册名与官方 wechat-devtools 撞车,改用 wechat-devtools-mcp

📋 版本历史

版本日期摘要
0.9.182026-09-04Windows 2.x 真机闭环:状态目录 User Data 层、就绪判据、quit 等退出、噪音过滤;新增真机冒烟脚本
0.9.172026-09-03适配开发者工具 2.x Stable;evaluate 新增 fn_source;open 提速约 4 倍;Windows 1.x/2.x 双轨判定
0.9.162026-08-27长页面截图全面修复;源码开源
0.9.152026-08-20适配开发者工具 2.x(Electron);修复 CDP 采集自 0.9.0 起恒为 0 条
0.9.142026-08-20wechat_file 路径口径统一;cdp_port 透传修复
0.9.132026-08-18--version 早退;文档核对修复

完整逐版本说明见 CHANGELOG.md。


参考

Installation

TypingMind
{
  "mcpServers": {
    "wechat-devtools-mcp": {
      "command": "wechat-devtools-mcp",
      "args": []
    }
  }
}

Use Wechat Devtools MCP MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Wechat Devtools MCP is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Wechat Devtools MCP as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Wechat Devtools MCP MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "wechat-devtools-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Wechat Devtools MCP MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Wechat Devtools MCP MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Wechat Devtools MCP to help me with this task?
Wechat Devtools MCP
Sure. I read it.
Here is what I found using Wechat Devtools MCP.

Frequently asked questions

What is the Wechat Devtools MCP MCP server used for?

Wechat Devtools MCP is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Wechat Devtools MCP MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Wechat Devtools MCP with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Wechat Devtools MCP MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Wechat Devtools MCP connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Wechat Devtools MCP MCP to TypingMind?

Wechat Devtools MCP runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Wechat Devtools MCP MCP provide in TypingMind?

Wechat Devtools MCP exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Wechat Devtools MCP MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Wechat Devtools MCP requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇