wxauto MCP Server
The wxauto MCP Server enables AI tools to automate WeChat operations through 27 tools across 7 categories.
System Management
Initialize/configure the WeChat connection, check running status and account info
Activate and verify wxautox4 license, list all available tools
Messaging
Send text messages (with optional @mentions), URL/link cards, and bulk messages to multiple recipients
Retrieve current chat messages, historical messages, and new unread messages from chat windows
Contacts & Chat Management
Retrieve friends list (optionally with avatars), switch between chat windows, get current chat details
Navigate to the Contacts page
Sessions
List all sessions, get recently active group chats, filter by unread/mute status, get all unread sessions
File & Media Sharing
Send files, images, or entire directories (with optional file pattern filtering)
Check file existence before sending
Friend Requests
View incoming friend requests, accept them (with optional remark/tags), and add new friends via search keyword with custom message and permissions
Provides comprehensive WeChat automation capabilities including sending messages (text, images, files), managing contacts and friend requests, and retrieving chat history or session lists.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@wxauto MCP Server send a message to Mom saying I'll be home for dinner at 7 PM"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
wxauto MCP Server
微信自动化 MCP (Model Context Protocol) 服务器,为 AI 开发工具提供微信自动化能力。
系统要求
Windows 11/10
Python 3.9+
微信已登录
wxautox4 激活
Related MCP server: wx4py-mcp
快速安装
pip install wxauto-mcp使用
一键自动安装(推荐)
wxauto-mcp --install这将自动配置 MCP Server 到 Claude Desktop 和 Claude Code,无需手动编辑配置文件。
生成配置文件(手动配置)
如果需要手动配置,运行:
# 生成配置文件到默认目录 (./mcp-configs)
wxauto-mcp --config
# 生成配置文件到指定目录
wxauto-mcp --config /path/to/configs
wxauto-mcp --config mcp-configs然后将生成的配置文件内容添加到 AI 应用中:
Claude Desktop 配置文件位置:
Windows:
%APPDATA%\Claude\claude_desktop_config.json
Claude Code 配置文件位置:
%USERPROFILE%\.claude.json
Cursor:在 Settings 的 MCP 配置中添加
可用工具(27个)
系统工具(6个)
wechat_initialize- 初始化微信连接wechat_status- 获取微信运行状态wechat_activate- 激活 wxautox4wechat_check_activation- 检查激活状态wechat_list_tools- 列出所有可用工具get_my_info- 获取我的微信账号信息
消息工具(6个)
send_message- 发送文本消息send_url_card- 发送链接卡片get_messages- 获取当前聊天消息get_history- 获取历史消息get_next_new_message- 获取下一个聊天窗口的新消息send_bulk_messages- 批量发送消息
联系人工具(3个)
get_friends- 获取好友列表get_chat_info- 获取当前聊天信息switch_chat- 切换聊天窗口
会话工具(4个)
get_sessions- 获取会话列表get_recent_groups- 获取最近群聊filter_sessions- 筛选会话列表get_unread_sessions- 获取有未读消息的会话
文件工具(4个)
send_files- 发送文件send_image- 发送图片send_directory_files- 发送整个目录的文件check_file_exists- 检查文件是否存在
好友请求工具(3个)
get_new_friends- 获取新的好友请求列表accept_new_friend- 接受新的好友请求add_friend- 添加新好友
界面工具(1个)
switch_to_contact- 切换到联系人页面
常见问题
1. 激活
wxautox4 需要激活使用。请访问 https://docs.wxauto.org 获取激活密钥,然后:
# 设置环境变量
set WECHAT_LICENSE_KEY=your-license-key
# 或调用激活工具
wxauto-mcp-http
# 然后调用 wechat_activate 工具2. 权限问题
确保 Python 有访问微信进程的权限,建议以管理员身份运行。
3. 微信窗口
某些操作需要微信窗口在前台可见,请确保微信窗口未被最小化。
4. 配置文件位置
不同 AI 工具的配置文件位置:
Claude Desktop:
Windows:
%APPDATA%\Claude\claude_desktop_config.json
Claude Code:
Windows:
%USERPROFILE%\.claude.json
Cursor:
在 Settings → MCP 中添加配置
联系方式
GitHub Issues: louxinghao@gmail.com
Available Tools
27 toolsaccept_new_friendC
接受新的好友请求。参数: content (好友请求内容,必填), exact (是否精确匹配,默认false), remark (备注名,可选), tags (标签列表,可选)
Inputs: content (required), exact, remark, tags.
add_friendB
添加新好友。参数: keywords (搜索关键词,必填), addmsg (验证消息,可选), remark (备注名,可选), tags (标签列表,可选), permission (权限,可选:朋友圈/仅聊天,默认朋友圈), timeout (超时时间,默认5秒)
Inputs: keywords (required), addmsg, remark, tags, +2 more.
check_file_existsC
检查文件是否存在。参数: filepath (文件路径)
Inputs: filepath (required).
filter_sessionsC
筛选会话列表。参数: has_unread (是否有未读), ismute (是否免打扰)
Inputs: has_unread, ismute.
get_chat_infoB
获取当前聊天窗口信息
Inputs: no named parameters.
get_friendsB
获取好友列表。参数: n (获取数量,默认10), save_avatar (是否获取头像,默认false)
Inputs: n, save_avatar.
get_historyC
获取历史消息。参数: n (获取数量,默认50)
Inputs: n.
get_messagesB
获取当前聊天窗口的所有消息
Inputs: no named parameters.
get_my_infoB
获取我的微信账号信息
Inputs: no named parameters.
get_new_friendsB
获取新的好友请求列表。参数: acceptable (是否过滤掉已接受的好友申请,默认true)
Inputs: acceptable.
get_next_new_messageB
获取下一个聊天窗口的新消息。参数: filter_mute (是否过滤消息免打扰,默认false)
Inputs: filter_mute.
get_recent_groupsC
获取最近群聊列表
Inputs: no named parameters.
get_sessionsB
获取微信会话列表(聊天窗口列表)
Inputs: no named parameters.
get_unread_sessionsB
获取所有有未读消息的会话
Inputs: no named parameters.
send_bulk_messagesC
批量发送消息。参数: messages (JSON数组,每项包含msg和who)
Inputs: messages (required).
send_directory_filesC
发送目录下的所有文件。参数: directory (目录路径), who (接收人,可选), pattern (文件匹配模式,默认*)
Inputs: directory (required), who, pattern.
send_filesC
发送文件。参数: filepath (文件路径,支持逗号分隔的多个文件), who (接收人,可选), exact (精确匹配,默认false)
Inputs: filepath (required), who, exact.
send_imageC
发送图片。参数: filepath (图片路径), who (接收人,可选)
Inputs: filepath (required), who.
send_messageB
发送文本消息。参数: msg (消息内容), who (接收人,可选), at (@对象,可选), exact (精确匹配,默认false)
Inputs: msg (required), who, at, exact.
send_url_cardB
发送链接卡片。参数: url (链接地址,必填), friends (发送对象,单个名称或列表,可选), message (附加消息,可选), timeout (等待时间,默认10秒)
Inputs: url (required), friends, message, timeout.
switch_chatB
切换到指定聊天窗口。参数: who (联系人名称), exact (精确匹配,默认false)
Inputs: who (required), exact.
switch_to_contactB
切换微信到联系人页面
Inputs: no named parameters.
wechat_activateB
激活 wxautox4。参数: license_key (激活密钥,留空则使用环境变量 WECHAT_LICENSE_KEY)
Inputs: license_key.
wechat_check_activationB
检查 wxautox4 激活状态
Inputs: no named parameters.
wechat_initializeB
初始化微信连接。参数: resize (是否自动调整窗口,默认true), debug (调试模式,默认false)
Inputs: resize, debug.
wechat_list_toolsB
列出所有可用的微信自动化工具
Inputs: no named parameters.
wechat_statusB
获取微信运行状态,包括在线状态、账号信息和激活状态
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 27 tools
The tool set has clear functional groupings (e.g., friend management, message sending, session handling, system operations), but there is notable overlap within groups. For example, 'get_sessions', 'get_unread_sessions', and 'filter_sessions' all retrieve session lists with slight variations, which could cause confusion. Similarly, multiple send tools ('send_message', 'send_image', 'send_files', 'send_directory_files', 'send_url_card') target different media types but share similar parameters, risking misselection if not carefully reviewed.
Most tools follow a consistent verb_noun pattern (e.g., 'get_friends', 'send_message', 'switch_chat'), which aids predictability. However, there are minor deviations like 'wechat_activate' (verb_adjective) and 'wechat_list_tools' (verb_noun_noun), and some tools use underscores inconsistently (e.g., 'check_file_exists' vs. 'get_my_info'). Overall, the naming is mostly consistent with a few irregularities that do not severely hinder usability.
With 27 tools, the count is borderline high for a WeChat automation server, suggesting potential bloat. While the domain (WeChat automation) is broad, covering friend management, messaging, sessions, and system operations, some tools could be consolidated (e.g., multiple session retrieval tools). The count is not extreme but may overwhelm agents with redundant or overlapping functionality.
The tool set provides comprehensive coverage for core WeChat automation tasks, including friend CRUD (add, accept, list), messaging (send various types, retrieve history), session management, and system operations (initialize, status, activation). Minor gaps exist, such as no tools for deleting friends or managing group settings beyond listing, but agents can likely work around these with available tools for basic workflows.
Maintenance
Related MCP Connectors
WhatsApp for Claude, ChatGPT or any AI agent: search, reply and send. Personal or Business API.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Ask questions across your WhatsApp inbox from Claude, ChatGPT, Cursor or any MCP client.
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to send WeChat messages through automation, supporting both immediate and scheduled message delivery to contacts and groups using the Model Context Protocol standard.39-
- FlicenseNot gradedqualityDmaintenanceMCP server for WeChat PC automation, enabling message sending, voice/video calls, and AI-powered listening through Cursor or WorkBuddy.2-
- FlicenseAqualityCmaintenanceEnables AI assistants to send and receive WeChat messages through the official ClawBot API, supporting text, images, files, and videos.718-
- FlicenseAqualityDmaintenanceEnables AI agents to control WeChat through MCP protocol, including sending messages, managing contacts, and searching messages.10-