Install
openclaw skills install wechat-mcpClawHub Security found sensitive or high-impact capabilities. Review the scan results before using.
Windows 电脑端微信消息监控与发送 MCP,实现在微信上给指定联系人发送消息
openclaw skills install wechat-mcpWindows 电脑端微信消息监控与发送 MCP。
需要先安装 Python 依赖:
pip install pyautogui pygetwindow pillow pyperclip opencv-python
from server import send_message_to_contact
# 给指定联系人发送消息(完整流程:搜索->打开聊天->发送)
send_message_to_contact("联系人名称", "消息内容")
from server import send_message_to_current
# 给当前已打开的聊天窗口发送消息
send_message_to_current("消息内容")
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 协议调用:
{
"tools": [
{
"name": "wechat_get_status",
"description": "获取微信窗口状态"
},
{
"name": "wechat_send_message",
"description": "给当前聊天窗口发送消息",
"inputSchema": {
"type": "object",
"properties": {
"message": {"type": "string", "description": "消息内容"}
},
"required": ["message"]
}
}
]
}
wechat-mcp/
├── server.py # MCP 服务器主程序
├── test_wechat.py # 测试工具
├── requirements.txt # Python 依赖
└── README.md # 说明文档