Logotipo de weixin-devtools-mcp MCP Server

weixin-devtools-mcp MCP Server

Comunidad
wooter-s

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

Editorwooter-s
Repositorioweixin-devtools-mcp
IdiomaTypeScript
Forks
14
Estrellas
78
Herramientas disponibles
37
Tipo de transportestdio
Categorías
LicenciaMIT
Enlaces
  • Conecta herramientas a flujos de trabajo con IA

    weixin-devtools-mcp MCP Server ofrece funciones MCP que pueden usar los clientes y agentes de IA compatibles.

  • 37 herramientas disponibles

    Explora a continuación las acciones que se pueden invocar, con sus nombres y descripciones cuando el servidor los proporcione.

  • Configuración lista para copiar

    Usa los ejemplos de instalación para configurar este servidor en tu cliente MCP preferido.

  • Indicadores de interés en el código abierto

    78 estrellas y 14 forks en el repositorio enlazado.

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.

Instalación

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

Herramientas disponibles

  • 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 el MCP de weixin-devtools-mcp MCP Server con varios modelos de IA

TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que, una vez conectado weixin-devtools-mcp MCP Server, puedes usarlo con distintos modelos de IA en TypingMind sin tener que configurarlo por separado para cada modelo. Esta integración MCP se ejecuta localmente en tu dispositivo a través del conector MCP de TypingMind.

Guía de configuración para usar el conector local

Usa esta opción si el servidor MCP necesita acceder a archivos locales, aplicaciones o recursos privados de tu ordenador.

1

Abre los ajustes de MCP

En TypingMind, ve a Ajustes, luego a Ajustes avanzados y a Model Context Protocol, y elige Configurar conector.

  1. Abre TypingMind en tu navegador.
  2. Haz clic en el icono de Ajustes.
  3. Ve a Ajustes avanzados.
  4. Abre la sección Model Context Protocol.
  5. Haz clic en Configurar conector y elige Este dispositivo.
Pantalla de configuración del conector MCP de TypingMind con «Este dispositivo» seleccionado
2

Ejecuta el comando del conector

Elige Este dispositivo, copia el comando de TypingMind y ejecútalo en Terminal. Mantén el proceso en ejecución mientras uses MCP.

  1. Copia el comando de configuración que muestra TypingMind.
  2. Abre Terminal en macOS o Windows Terminal en Windows.
  3. Pega y ejecuta el comando.
  4. Acepta la instalación del paquete si Terminal te pide confirmación para continuar.
  5. Mantén el proceso en ejecución en la ventana de Terminal mientras uses las herramientas MCP.
3

Añade weixin-devtools-mcp MCP Server como servidor

Cuando el estado del conector sea «Listo», haz clic en «Edita servidores» y pega la configuración del servidor MCP.

  1. Espera hasta que el estado del conector indique «Listo».
  2. Haz clic en Edita servidores.
  3. Pega la configuración del servidor MCP de weixin-devtools-mcp MCP Server.
  4. Guarda la lista de servidores.
  5. Actualiza para comprobar que el conector sigue listo.
Ajustes de MCP de TypingMind con un servidor activo y el botón «Edita servidores»
{
  "mcpServers": {
    "weixin-devtools-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "weixin-devtools-mcp"
      ]
    }
  }
}
4

Úsala con distintos modelos

Guarda la lista de servidores, abre Plugins, activa las herramientas MCP de weixin-devtools-mcp MCP Server y selecciona cualquier modelo de IA compatible en TypingMind para usar las herramientas en el chat o asignárselas a un agente de IA.

  1. Abre la página Plugins en TypingMind.
  2. Activa las herramientas MCP de weixin-devtools-mcp MCP Server.
  3. Inicia un chat y elige el modelo de IA que quieras usar.
  4. Usa las herramientas MCP en el chat o asígnalas a un agente de IA.
  5. Cambia a otro modelo de IA cuando lo necesites sin volver a conectar MCP.
Chat de TypingMind que usa herramientas MCP activadas con un modelo de IA seleccionado
¿Puedes usar weixin-devtools-mcp MCP Server para ayudarme con esta tarea?
weixin-devtools-mcp MCP Server
Claro. Lo he leído.
Esto he encontrado usando weixin-devtools-mcp MCP Server.

Preguntas frecuentes

¿Para qué sirve el servidor MCP weixin-devtools-mcp MCP Server?

weixin-devtools-mcp MCP Server es un servidor MCP que permite a los clientes de IA compatibles conectarse a herramientas y contexto externos. En TypingMind, basta con añadir este servidor MCP una vez para que sus herramientas estén disponibles en tu espacio de trabajo de IA.

¿Puedo usar el servidor MCP weixin-devtools-mcp MCP Server con varios modelos de IA en TypingMind?

Sí. TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que puedes usar weixin-devtools-mcp MCP Server con distintos modelos de IA, como Claude, ChatGPT, Gemini u otros que hayas configurado en TypingMind, sin configurar el servidor MCP por separado para cada modelo.

¿Por qué usar el conector MCP de weixin-devtools-mcp MCP Server con TypingMind?

TypingMind es una de las mejores interfaces de chat con LLM porque reúne varios modelos de IA, prompts, plugins, agentes de IA, claves de API y herramientas MCP en un solo espacio de trabajo. Con weixin-devtools-mcp MCP Server conectado, puedes usar sus herramientas MCP con tus modelos preferidos y mantener organizado tu flujo de trabajo de chat en TypingMind.

¿Cómo conecto el servidor MCP weixin-devtools-mcp MCP Server a TypingMind?

weixin-devtools-mcp MCP Server funciona a través del conector MCP local de TypingMind. Es la mejor opción cuando el servidor MCP necesita acceder a archivos locales, aplicaciones de escritorio, herramientas de línea de comandos o recursos privados de tu ordenador.

¿Qué herramientas ofrece el servidor MCP weixin-devtools-mcp MCP Server en TypingMind?

weixin-devtools-mcp MCP Server ofrece 37 herramientas MCP que puedes activar desde la página Plugins de TypingMind y usar en el chat o asignar a agentes de IA.

¿Tengo que compartir mis claves de API con TypingMind para usar el servidor MCP weixin-devtools-mcp MCP Server?

No. TypingMind prioriza el funcionamiento local y te permite mantener el control de tus proveedores de modelos, claves de API, prompts y configuración MCP. Si weixin-devtools-mcp MCP Server requiere autenticación, añade las cabeceras, los ajustes de OAuth o la configuración local necesarios para ese servidor MCP al crear la conexión.

连接状态

微信开发者工具连接状态

Servidores MCP relacionados

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇