weixin-devtools-mcp MCP Serverのロゴ

weixin-devtools-mcp MCP Server

コミュニティ
wooter-s

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

公開者wooter-s
リポジトリweixin-devtools-mcp
言語TypeScript
フォーク
14
スター
78
利用可能なツール
37
通信方式stdio
カテゴリ
ライセンスMIT
リンク
  • ツールをAIワークフローに接続

    weixin-devtools-mcp MCP Serverは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 37個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには78件のスターと14件のフォークがあります。

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.

インストール

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

利用可能なツール

  • 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を複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度weixin-devtools-mcp MCP Serverに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

weixin-devtools-mcp MCP Serverをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. weixin-devtools-mcp MCP ServerのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "weixin-devtools-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "weixin-devtools-mcp"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてweixin-devtools-mcp MCP ServerのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. weixin-devtools-mcp MCP ServerのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
weixin-devtools-mcp MCP Serverを使ってこのタスクを手伝ってもらえますか?
weixin-devtools-mcp MCP Server
はい、読みました。
weixin-devtools-mcp MCP Serverで調べた結果をお伝えします。

よくある質問

weixin-devtools-mcp MCP Server MCPサーバーは何に使いますか?

weixin-devtools-mcp MCP Serverは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでweixin-devtools-mcp MCP Server MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでweixin-devtools-mcp MCP Serverを利用できます。

TypingMindでweixin-devtools-mcp MCP Server MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。weixin-devtools-mcp MCP Serverを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

weixin-devtools-mcp MCP Server MCPをTypingMindに接続するにはどうすればよいですか?

weixin-devtools-mcp MCP ServerはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでweixin-devtools-mcp MCP Server MCPのどのようなツールを利用できますか?

weixin-devtools-mcp MCP Serverは37個のMCPツールを提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

weixin-devtools-mcp MCP Server MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。weixin-devtools-mcp MCP Serverで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

连接状态

微信开发者工具连接状态

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇