微信MCP
v1.0.0Windows 电脑端微信消息监控与发送 MCP,实现在微信上给指定联系人发送消息
MIT-0
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description (WeChat message monitoring and sending on Windows) align with included files: server.py, auto_reply.py, find_windows.py, test_ocr.py and test_wechat.py implement GUI automation (pyautogui, pygetwindow, ImageGrab) to find the WeChat window, capture screenshots, determine contact names, and paste/press Enter to send messages. No unrelated credentials, cloud services, or unexpected binaries are required.
Instruction Scope
SKILL.md correctly documents usage and required Python packages. The runtime instructions and code perform GUI automation: activating windows, taking screenshots, copying to clipboard, and pasting text. The code saves multiple screenshots to the skill directory (contact_name.png, last_chat.png, verify.png, input_verify.png, result.png) — SKILL.md does not explicitly call out that these images are written to disk. The automation also overwrites clipboard contents when sending (pyperclip.copy). These behaviors are consistent with the stated purpose but are privacy-sensitive and can affect the user's clipboard and visible UI.
Install Mechanism
This is effectively an instruction/code-only skill that expects standard Python packages (requirements.txt lists common packages). There is no network download or obscure install URL, and dependencies are standard PyPI packages. One minor mismatch: some files import win32gui but requirements.txt does not explicitly list pywin32; this is an implementation/packaging omission rather than a security red flag.
Credentials
The skill requests no environment variables, credentials, or config paths. It operates locally via GUI automation and local screenshots. No external endpoints or tokens are present in code. This is proportionate to the described capability.
Persistence & Privilege
Skill is not marked always:true and does not modify other skills or system configurations. It implements an MCP-style stdin/stdout tool loop allowing autonomous tool calls (default platform behavior). Because it can be invoked programmatically to send messages, consider that an agent or script with access to the tool could send messages without additional interactive confirmation — this is a functional property, not an incoherence, but relevant to risk.
Assessment
This skill appears to do what it claims: automating the WeChat desktop app via GUI interactions. Before installing or running it, consider: 1) It will take and save screenshots of chat areas to files in the skill folder — those may contain sensitive message content. 2) It overwrites the system clipboard when sending messages. 3) It requires running on Windows with GUI access and likely needs pywin32 (not listed in requirements.txt); ensure dependencies are installed in an isolated environment. 4) Because the MCP tool can be called programmatically, an automated agent could send messages without manual confirmation — only enable autonomous use if you trust the caller. If you have sensitive chats open, run the tool in a controlled environment and review the code yourself (especially where screenshots are saved) before use.Like a lobster shell, security has layers — review code before you run it.
latest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
SKILL.md
WeChat MCP
Windows 电脑端微信消息监控与发送 MCP。
功能
- 📸 截取微信窗口截图
- 👤 搜索并打开联系人聊天窗口
- ✉️ 给指定联系人发送消息
- 🔍 支持独立聊天窗口识别和消息发送
安装
需要先安装 Python 依赖:
pip install pyautogui pygetwindow pillow pyperclip opencv-python
使用方法
1. 发送消息到指定联系人
from server import send_message_to_contact
# 给指定联系人发送消息(完整流程:搜索->打开聊天->发送)
send_message_to_contact("联系人名称", "消息内容")
2. 给当前聊天窗口发送消息
from server import send_message_to_current
# 给当前已打开的聊天窗口发送消息
send_message_to_current("消息内容")
3. 获取微信状态
from server import get_wechat_status
status = get_wechat_status()
print(status)
# {'status': 'running', 'title': '微信', 'position': {'x': 0, 'y': 0}, 'size': {'width': 1920, 'height': 1080}}
MCP 工具
如果通过 MCP 协议调用:
{
"tools": [
{
"name": "wechat_get_status",
"description": "获取微信窗口状态"
},
{
"name": "wechat_send_message",
"description": "给当前聊天窗口发送消息",
"inputSchema": {
"type": "object",
"properties": {
"message": {"type": "string", "description": "消息内容"}
},
"required": ["message"]
}
}
]
}
注意事项
- 微信窗口需要保持打开状态
- 发送消息时会自动激活微信窗口
- 中文输入需要确保系统中文输入法正常工作
- 自动识别联系人: 不传
contact参数时,会自动从当前微信窗口标题获取联系人名称,确保回复发给正确的人
文件结构
wechat-mcp/
├── server.py # MCP 服务器主程序
├── test_wechat.py # 测试工具
├── requirements.txt # Python 依赖
└── README.md # 说明文档
Files
7 totalSelect a file
Select a file to preview.
Comments
Loading comments…
