Automates WeChat on macOS using the Accessibility API and screen capture, enabling tools to fetch recent messages from contacts and send replies based on conversation history.
Click on "Install 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., "@WeChat MCP Serverfetch recent messages from John"
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.
WeChat MCP Server
δΈζ | English
An MCP server that automates WeChat on macOS using the Accessibility API and screen capture. It enables LLMs to interact with WeChat chats programmatically.
Features
π¨ Fetch recent messages from any chat (contact or group)
βοΈ Send automated replies based on chat history
π· Publish text-only Moments posts, with optional draft-only mode
π₯ Add contacts using WeChat ID with configurable privacy
π Smart chat search with exact name matching
π€ 5 specialized Claude Code sub-agents for smart WeChat automation
Quick Start
Installation
Setup with Claude Code
macOS Permissions
β οΈ Important: Grant Accessibility permissions to your terminal:
Open System Settings β Privacy & Security β Accessibility
Add your terminal application (Terminal.app, iTerm2, etc.)
Ensure WeChat is running before using the server
Usage
Basic Commands
Available MCP Tools
fetch_messages_by_chat- Get recent messages from a chatreply_to_messages_by_chat- Send a reply to a chatadd_contact_by_wechat_id- Add a new contact using a WeChat ID and send a friend requestpublish_moment_without_media- Publish a text-only Moments post (no photos or videos); optionally only prepare a draft without posting viapublish=False
See detailed API documentation for full tool specifications.
Claude Code Sub-Agents
This project includes 5 intelligent sub-agents designed specifically for WeChat automation. They enable natural language control of WeChat through Claude Code.
Available Sub-Agents
Chat-summarizer - Summarize chat history and extract key information
Auto-replier - Auto-generate and send appropriate replies
Message-searcher - Search chat history for specific content
Multi-chat-checker - Monitor multiple chats and prioritize messages
Chat-insights - Analyze relationship dynamics and communication patterns
π View complete sub-agents guide
Development
Local Setup with uv
Documentation
π Detailed Guide - Complete API documentation and architecture
π€ Sub-Agents Guide - How to use Claude Code sub-agents
Requirements
macOS (uses Accessibility API)
WeChat for Mac installed and running
Python 3.12+
Accessibility permissions for terminal
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see LICENSE file for details