---
type: entity
title: Wechat Mcp
created: 2026-05-04
updated: 2026-05-04
tags: [wechat, windows, automation, mcp, messaging, bot, pyautogui, openclaw]
---

## 基本信息

| 项目 | 内容 |
|------|------|
| 全称 | Wechat Mcp（微信 MCP 工具） |
| 来源 | [clawhub.ai/dragon015/wechat-mcp](https://clawhub.ai/dragon015/wechat-mcp) |
| 安装命令 | `openclaw skills install wechat-mcp` |
| 依赖 | Python + `pyautogui pygetwindow pillow pyperclip opencv-python` |
| 平台 | Windows（仅支持 Windows） |
| 安全提示 | ⚠️ ClawHub Security 检测到敏感/高影响功能，请谨慎使用 |

## 功能概览

- 📸 **截图**：截取微信窗口截图
- 👤 **搜索联系人**：通过名称搜索并打开聊天窗口
- ✉️ **发送消息**：向指定联系人或当前聊天窗口发送消息
- 🔍 **窗口状态**：获取微信窗口位置、尺寸、运行状态

## Python API

```python
from server import send_message_to_contact, send_message_to_current, get_wechat_status

# 给指定联系人发消息（自动搜索+打开窗口+发送）
send_message_to_contact("联系人名称", "消息内容")

# 向当前聊天窗口发消息
send_message_to_current("消息内容")

# 获取微信窗口状态
status = get_wechat_status()
print(status)
# {'status': 'running', 'title': '微信', 'position': {'x': 0, 'y': 0}, 'size': {'width': 1920, 'height': 1080}}
```

## 注意事项

1. 微信窗口必须保持打开状态
2. 发送消息时会自动激活微信窗口
3. 中文输入依赖系统中文输入环境正常工作
4. 龙窗口（独立聊天窗口）也可识别和发送

## 相关概念

- [[wiki/concepts/mcp|MCP（Model Context Protocol）]]（底层协议）
- [[wiki/entities/gog|Gog]]（同类 CLI/Tool 实体）

## 参考来源

- [[wiki/library/wechat-mcp|Wechat Mcp（官方文档）]]
