Connects Claude to WeChat on macOS through the Accessibility API and screen capture, letting you fetch recent messages from any chat, send automated replies, publish Moments posts, and add contacts by WeChat ID. You'd reach for this when building WeChat automation workflows or having Claude manage your WeChat interactions. Includes five specialized sub-agents for tasks like chat summarization, auto-replies, and message search. Requires macOS with Accessibility permissions and a running WeChat app, making it ideal for developers who want programmatic WeChat control without official API access.
An MCP server that automates WeChat on macOS using the Accessibility API and screen capture. It enables LLMs to interact with WeChat chats programmatically.
pip install wechat-mcp-server
# If installed via pip
claude mcp add --transport stdio wechat-mcp -- wechat-mcp
# If using uv for development
claude mcp add --transport stdio wechat-mcp -- uv --directory $(pwd) run wechat-mcp
// If installed via pip
{
"mcpServers": {
"wechat-mcp": {
"type": "stdio",
"command": "wechat-mcp"
}
}
}
// If using uv for development
{
"mcpServers": {
"wechat-mcp": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"{path/to/wechat-mcp}",
"run",
"wechat-mcp"
],
}
}
}
# If installed via pip
codex mcp add wechat-mcp -- wechat-mcp
# If using uv for development
codex mcp add wechat-mcp -- uv --directory $(pwd) run wechat-mcp
⚠️ Important: Grant Accessibility permissions to your terminal:
# Run with default stdio transport
wechat-mcp --transport stdio
# Run with HTTP transport
wechat-mcp --transport streamable-http
# Run with SSE transport
wechat-mcp --transport sse
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 via publish=FalseSee detailed API documentation for full tool specifications.
This project includes 5 intelligent sub-agents designed specifically for WeChat automation. They enable natural language control of WeChat through Claude Code.
📖 View complete sub-agents guide
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone and setup
git clone https://github.com/yourusername/WeChat-MCP.git
cd WeChat-MCP
uv sync
# Run locally
uv run wechat-mcp --transport stdio
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details