Get the FREE Ultimate OpenClaw Setup Guide →

MCP-WeChat-ADB

一个基于 ADB 的微信自动化 MCP 服务器,为 AI 助手提供微信消息发送和截图功能。适配雷电模拟器(LDPlayer 9),通过 MCP 协议暴露工具接口。

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio dabaigoose-mcp-wechat-adb-server python main.py

How to use

This MCP server provides automation tools to control WeChat inside the LDPlayer Android emulator via ADB. It exposes two primary tools registered by the MCP service: send_wechat_message(name: str, message: str) -> str, which sends a message to a specified contact or chat in WeChat, and screen_save() -> str, which captures a screenshot from the emulator and saves it to a local directory. The server is optimized for LDPlayer 9 and supports Chinese input, enabling seamless interaction with WeChat through MCP-enabled AI assistants such as Cursor or Claude Desktop. After starting the server (via python main.py), MCP clients can invoke the tools by name, passing arguments as shown in the usage examples. For integration, you typically connect to the SSE endpoint exposed by the server and configure Cursor or other MCP-capable assistants to call these tools in conversation flows.

How to install

Prerequisites

  • Windows 10/11 with Python 3.13 or newer
  • LDPlayer 9 (雷电模拟器) with WeChat installed and logged in
  • ADB debugging enabled on the emulator

Install steps

  1. Install Python dependencies

    • Create a Python environment and install the MCP CLI package (as described below) or install the project dependencies if a requirements.txt is provided.
  2. Prepare the environment

    • Ensure LDPlayer directory is known and accessible by the script (ldplayer_dir in main.py).
    • Ensure the ADB device address (DEVICE) is known, e.g. 127.0.0.1:5555.
  3. Run the MCP server

    • Start the server which registers the MCP tools and runs the SSE service:
    python main.py
    
  4. Optional: Configure Cursor MCP

    • In Cursor, add a Custom MCP with the URL pointing to the SSE endpoint, e.g. http://127.0.0.1:8000/sse, to enable tool access from the Cursor Agent dialog.

Prerequisites recap

  • Python 3.13 or newer
  • LDPlayer 9 with WeChat and ADB keyboard support (ADBKeyboard.apk) installed in the emulator
  • ADB accessible via the emulator port (127.0.0.1:5555 as an example)

Additional notes

Tips and common issues:

  • ADBKeyboard.apk must be present in the LDPlayer directory to enable Chinese input via ADB; the server may auto-install/enable it on first run.
  • Screenshots are saved to the screens/ directory; ensure this folder exists or is created by the server.
  • If device connection fails or times out, verify that the adb path is correct and the device address matches the emulator’s ADB port. Use commands like: D:\Program\leidian\LDPlayer9\adb.exe devices D:\Program\leidian\LDPlayer9\adb.exe connect 127.0.0.1:5555 D:\Program\leidian\LDPlayer9\adb.exe -s 127.0.0.1:5555 shell screencap -p /sdcard/screen.png
  • Ensure the ldplayer_dir and DEVICE variables in main.py reflect your actual LDPlayer installation path and the active ADB port.
  • The MCP server uses SSE for streaming tool outputs; ensure your firewall allows the SSE endpoint if needed.

Related MCP Servers

Sponsor this space

Reach thousands of developers