Windows desktop WeChat message monitoring and sending, achieved through window automation.
The WeChat window must remain open
Python dependencies installed: bash
pip install pyautogui pygetwindow pillow pyperclip opencv-python
FeatureDescriptionScreenshotCapture a screenshot of the WeChat windowSearch ContactsSearch for and open a contact's chat windowSend MessagesSend messages to a specified contactDetached WindowsSupport identification of detached chat windows (Dragon windows)
python
from scripts.server import send_message_to_contact
# Complete flow: Search -> Open chat -> Send
send_message_to_contact("Contact Name", "Message content")
python
from scripts.server import send_message_to_current
send_message_to_current("Message content")
python
from scripts.server import get_wechat_status
status = get_wechat_status()
# Returns: {'status': 'running', 'title': 'WeChat', 'position': {'x': 0, 'y': 0}, 'size': {'width': 1920, 'height': 1080}}
When called via the MCP protocol, the following tools are provided:
Tool NameDescriptionParameterswechat_get_statusGet the WeChat window statusNonewechat_send_messageSend a message to the current chat windowmessage: Message content