Logo weixin-devtools-mcp MCP Server

weixin-devtools-mcp MCP Server

Cộng đồng
wooter-s

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

Nhà phát hànhwooter-s
Kho mãweixin-devtools-mcp
Ngôn ngữTypeScript
Bản fork
14
Sao
78
Công cụ có sẵn
37
Phương thức truyền tảistdio
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    weixin-devtools-mcp MCP Server cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 37 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    78 sao và 14 bản fork từ kho mã được liên kết.

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.

Cài đặt

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

Công cụ có sẵn

  • 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

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

Dùng MCP weixin-devtools-mcp MCP Server với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối weixin-devtools-mcp MCP Server, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm weixin-devtools-mcp MCP Server làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của weixin-devtools-mcp MCP Server.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "weixin-devtools-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "weixin-devtools-mcp"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của weixin-devtools-mcp MCP Server, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của weixin-devtools-mcp MCP Server.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng weixin-devtools-mcp MCP Server giúp tôi làm việc này không?
weixin-devtools-mcp MCP Server
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng weixin-devtools-mcp MCP Server.

Câu hỏi thường gặp

Máy chủ MCP weixin-devtools-mcp MCP Server dùng để làm gì?

weixin-devtools-mcp MCP Server là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP weixin-devtools-mcp MCP Server với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng weixin-devtools-mcp MCP Server với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP weixin-devtools-mcp MCP Server với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối weixin-devtools-mcp MCP Server, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP weixin-devtools-mcp MCP Server với TypingMind?

weixin-devtools-mcp MCP Server hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP weixin-devtools-mcp MCP Server cung cấp những công cụ nào trong TypingMind?

weixin-devtools-mcp MCP Server cung cấp 37 công cụ MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP weixin-devtools-mcp MCP Server không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu weixin-devtools-mcp MCP Server yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

连接状态

微信开发者工具连接状态

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇