Logo vun weixin-devtools-mcp MCP Server

weixin-devtools-mcp MCP Server

Communautéit
wooter-s

Let Codex and other coding agents inspect, interact with, and debug running WeChat Mini Programs through the Model Context Protocol.

Editeurwooter-s
Repositoryweixin-devtools-mcp
SproochTypeScript
Forks
14
Stären
78
Disponibel Tools
37
Transporttypstdio
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    weixin-devtools-mcp MCP Server stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 37 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    78 Stären an 14 Forks aus dem verlinkte Repository.

WeChat DevTools MCP

English | 简体中文

Let Codex and other coding agents inspect, interact with, and debug running WeChat Mini Programs through the Model Context Protocol.

Version Tests Quality License

Why this project

A coding agent needs feedback from the running Mini Program to verify its changes. This server exposes scoped page snapshots, element interactions, assertions, navigation, screenshots, console messages, and network requests through a local MCP connection to WeChat DevTools.

  • Explicit connections: choose a project, WebSocket endpoint, browser URL, or discovery request.
  • Scoped elements: opaque ref tokens and locator path segments traverse custom components.
  • Predictable results: all tools return a schemaVersion: "2.0" success/error envelope.
  • Optional collectors: console and network monitoring start only when their categories are enabled.
  • Small default surface: core exposes 20 tools; minimal exposes 10; full exposes 31.

Release status

The source tree is a 0.7.0 release candidate. npm latest is currently 0.6.0. Use the source configuration below for the 0.7 API until its Release is published. The version badge identifies this source tree, not a completed publication.

0.7 changes connection arguments, element targets, and result envelopes. Read the 0.6 → 0.7 migration guide before upgrading.

Requirements

  • Node.js 22 or newer.
  • WeChat DevTools installed, signed in, with CLI service access enabled.
  • A Mini Program project that compiles and opens in DevTools.
  • An MCP client supporting local stdio, such as Codex or Claude Desktop.

Unit CI covers Linux, Windows, and macOS on Node 22/24. That does not certify real DevTools operation on all those platforms. Real runtime verification is performed separately on a maintainer's desktop; see validation status.

Quick start with Codex

Build the source:

bash
git clone https://github.com/wooter-s/weixin-devtools-mcp.git
cd weixin-devtools-mcp
npm ci
npm run build

Register the built server, replacing the absolute path:

bash
codex mcp add weixin-devtools -- node /absolute/path/to/weixin-devtools-mcp/build/server.js --enable-categories=console,network,debug

Run codex mcp list, then start a Codex session in your Mini Program project. Open /mcp to check availability. Ask:

Connect to the Mini Program at /absolute/path/to/project. Read its page snapshot, identify the visible controls, and report the current page. Use explicit project connection; do not discover another project.

For a self-contained example, use tests/fixtures/monitoring-app from this repository. Follow the fixture setup first.

For an already published npm version, configure npx -y weixin-devtools-mcp@VERSION instead of the local Node entry. Do not assume an unpublished source version is available on npm. Detailed Codex configuration and reproducible demo includes the first tool calls and expected results.

Claude Desktop

Use the same built entry in your client configuration:

json
{
  "mcpServers": {
    "weixin-devtools-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/weixin-devtools-mcp/build/server.js"]
    }
  }
}

Tool profiles

Profile/categoryTools and behavior
core (default, 20)Connection, page snapshots, locating, interactions, assertions, navigation, scripts
minimal (10)Reduced tool surface
full (31)All tools, including console, network, and debug
consoleList console messages; inspect one message
networkList/inspect requests; stop monitoring; clear requests
debugScreenshots and environment/connection/page diagnostics

Set --tools-profile=full, or add categories with --enable-categories=console,network,debug. Disable categories with --disable-categories=.... Environment equivalents are WEIXIN_MCP_TOOLS_PROFILE, WEIXIN_MCP_ENABLE_CATEGORIES, and WEIXIN_MCP_DISABLE_CATEGORIES.

Snapshots contain a scopes/edges graph. Use returned refs without parsing them; refresh observations after page changes. A path identifies elements through page/component scopes. See the public API examples.

Verification and limitations

bash
npm run typecheck
npm run typecheck:test
npm test
npm run lint
npm run build
npm run lint:links
npm run test:coverage
npm run test:package

Coverage counts all production TypeScript under src/. CI retains HTML, JSON, and LCOV reports. Thresholds are 75% statements/functions/lines and 70% branches; we do not claim an unmeasured 80% coverage rate.

Real tests require a working, logged-in DevTools installation:

bash
npm run test:integration:public
npm run test:integration

The public fixture is independent of private business projects. npm run test:integration:mpx is a separate, explicitly configured Mpx compatibility check. Native, Mpx, synthetic, and unit results are reported separately. A runtime prerequisite failure is a failure, not a passing skipped test.

Known release blocker: independent project startup on the previously tested DevTools 2.02.2607271 reports missing SDKVersion. A recording of a successful end-to-end demo is not yet available. Current evidence and release readiness live in the validation report; historical reports retain their original scope.

Documentation and contributing

Report reproducible bugs at GitHub Issues. Contributions from any supported client are welcome; keep AI assistance and human verification accurately attributed.

MIT licensed. Built on MCP, miniprogram-automator, with architectural inspiration from chrome-devtools-mcp.

Installatioun

TypingMind
{
  "mcpServers": {
    "weixin-devtools-mcp": {
      "command": "node",
      "args": [
        "build/index.js"
      ]
    }
  }
}

Disponibel Tools

  • connect_devtools

    连接到微信开发者工具(传统模式,兼容性)

  • connect_devtools_enhanced

    智能连接到微信开发者工具,支持多种模式和自动回退(推荐)

  • get_current_page

    获取当前页面信息并设置为活动页面

  • get_page_snapshot

    获取当前页面的元素快照,包含所有元素的uid信息

  • $

    通过CSS选择器查找页面元素,返回匹配元素的详细信息

  • waitFor

    等待条件满足,支持等待元素出现、消失、文本匹配等

  • click

    点击指定uid的页面元素

  • input_text

    向input/textarea元素输入文本

  • get_value

    获取元素的值或文本内容

  • set_form_control

    设置表单控件的值(如picker、switch、slider等)

  • select_picker

    选择picker控件的选项

  • toggle_switch

    切换switch开关的状态

  • set_slider

    设置slider滑块的值

  • assert_exists

    断言元素存在或不存在

  • assert_visible

    断言元素可见或不可见

  • assert_text

    断言元素文本内容

  • assert_attribute

    断言元素属性值

  • assert_state

    断言元素的各种状态

  • navigate_to

    跳转到指定页面

  • navigate_back

    返回上一页或指定层数

  • switch_tab

    切换到指定Tab页

  • relaunch

    重新启动小程序并跳转到指定页面

  • get_page_info

    获取当前页面的详细信息

  • redirect_to

    重定向到指定页面(关闭当前页面并跳转)

  • screenshot

    对当前页面截图,支持返回base64数据或保存到文件

  • start_console_monitoring

    启动对微信开发者工具console和exception的监听

  • stop_console_monitoring

    停止对微信开发者工具console和exception的监听

  • get_console

    获取收集到的console日志和exception异常信息

  • clear_console

    清除已收集的console日志和exception异常信息

  • start_network_monitoring

    启动对微信小程序网络请求的监听,拦截 wx.request、wx.uploadFile、wx.downloadFile

  • stop_network_monitoring

    停止对微信小程序网络请求的监听,恢复原始的网络方法

  • get_network_requests

    获取收集到的网络请求记录,支持按类型、URL、状态过滤

  • clear_network_requests

    清除已收集的网络请求记录

  • diagnose_interceptor

    诊断网络拦截器安装状态和运行情况

  • diagnose_connection

    诊断微信开发者工具连接问题,检查配置和环境

  • check_environment

    检查微信开发者工具自动化环境配置

  • debug_page_elements

    调试页面元素获取问题,测试不同的选择器策略

weixin-devtools-mcp MCP Server MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal weixin-devtools-mcp MCP Server verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

weixin-devtools-mcp MCP Server als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu weixin-devtools-mcp MCP Server an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "weixin-devtools-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "weixin-devtools-mcp"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu weixin-devtools-mcp MCP Server. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu weixin-devtools-mcp MCP Server.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat weixin-devtools-mcp MCP Server?
weixin-devtools-mcp MCP Server
Jo. Ech hunn et gelies.
Dat hunn ech mat weixin-devtools-mcp MCP Server fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server weixin-devtools-mcp MCP Server benotzt?

weixin-devtools-mcp MCP Server ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech weixin-devtools-mcp MCP Server MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir weixin-devtools-mcp MCP Server mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat weixin-devtools-mcp MCP Server MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann weixin-devtools-mcp MCP Server verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech weixin-devtools-mcp MCP Server MCP mat TypingMind?

weixin-devtools-mcp MCP Server leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt weixin-devtools-mcp MCP Server MCP an TypingMind zur Verfügung?

weixin-devtools-mcp MCP Server stellt 37 MCP-Tools zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir weixin-devtools-mcp MCP Server MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann weixin-devtools-mcp MCP Server eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

连接状态

微信开发者工具连接状态

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇