Logo di weixin-devtools-mcp MCP Server

weixin-devtools-mcp MCP Server

Community
wooter-s

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

Autorewooter-s
Repositoryweixin-devtools-mcp
LinguaTypeScript
Fork
14
Stelle
78
Strumenti disponibili
37
Tipo di trasportostdio
Categorie
LicenzaMIT
Link
  • Collega gli strumenti ai flussi di lavoro IA

    weixin-devtools-mcp MCP Server mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • 37 strumenti disponibili

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni quando forniti dal server.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse open source

    78 stelle e 14 fork nel repository collegato.

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.

Installazione

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

Strumenti disponibili

  • 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

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

Usa MCP weixin-devtools-mcp MCP Server con più modelli IA

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso weixin-devtools-mcp MCP Server, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura MCP.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura MCP e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con Questo dispositivo selezionato
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi weixin-devtools-mcp MCP Server come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di weixin-devtools-mcp MCP Server.
  4. Salva l'elenco dei server.
  5. Aggiorna per verificare che il connettore sia ancora pronto.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "weixin-devtools-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "weixin-devtools-mcp"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di weixin-devtools-mcp MCP Server, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di weixin-devtools-mcp MCP Server.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare weixin-devtools-mcp MCP Server per aiutarmi con questa attività?
weixin-devtools-mcp MCP Server
Certo. Ho letto.
Ecco cosa ho trovato con weixin-devtools-mcp MCP Server.

Domande frequenti

A cosa serve il server MCP weixin-devtools-mcp MCP Server?

weixin-devtools-mcp MCP Server è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare weixin-devtools-mcp MCP Server MCP con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare weixin-devtools-mcp MCP Server con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP weixin-devtools-mcp MCP Server con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando weixin-devtools-mcp MCP Server, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego weixin-devtools-mcp MCP Server MCP a TypingMind?

weixin-devtools-mcp MCP Server funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre weixin-devtools-mcp MCP Server MCP in TypingMind?

weixin-devtools-mcp MCP Server mette a disposizione 37 strumenti MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare weixin-devtools-mcp MCP Server MCP?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se weixin-devtools-mcp MCP Server richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

连接状态

微信开发者工具连接状态

Server MCP correlati

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇