← Back to directory
W

WeChat MCP Server

Community
MCP server that lets AI assistants read and reply to WeChat
GitHub source repository ↗
★ 244 Stars Category · Other Popular Source revision cc470367ca66
49FMRS · D
Reliability
8/20
Security and permissions
8/20
Maintenance
8/20
Documentation
12/20
Setup experience
13/20

WeChat MCP Server is a feature-rich MCP server designed for macOS users, leveraging the Accessibility API to control WeChat. It offers practical tools for fetching messages, replying, adding contacts, and publishing moments, and includes 5 Claude Code sub-agents to enhance automation. Installation is straightforward but requires careful permission configuration.

Read the FMRS scoring method →

WeChat MCP Server is 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 include fetching recent messages from any chat (contact or group), sending automated replies, publishing text-only Moments posts (with optional draft-only mode), adding contacts using WeChat ID with configurable privacy, smart chat search with exact name matching, and 5 specialized Claude Code sub-agents for smart WeChat automation.

Tools

fetch_messages_by_chat
Get recent messages from a chat
reply_to_messages_by_chat
Send a reply to a chat
add_contact_by_wechat_id
Add a new contact using a WeChat ID and send a friend request
publish_moment_without_media
Publish a text-only Moments post (no photos or videos); optionally only prepare a draft without posting via publish=False

Setup

  1. Install: pip install wechat-mcp-server
  2. For Claude Code: claude mcp add --transport stdio wechat-mcp -- wechat-mcp (if installed via pip) or claude mcp add --transport stdio wechat-mcp -- uv --directory $(pwd) run wechat-mcp (if using uv for development).
  3. Alternatively, configure Claude Desktop with the provided JSON example.
  4. For Codex: codex mcp add wechat-mcp -- wechat-mcp.
  5. Grant Accessibility permissions to your terminal: System Settings → Privacy & Security → Accessibility, add your terminal app.
  6. Ensure WeChat for Mac is installed and running.

Fit and risk

Best for

  • macOS users
  • Developers using Claude Code or Claude Desktop
  • Individuals or teams needing WeChat automation integration
  • Users comfortable with command line and Python environments

Not for

  • Non-macOS platforms (Windows, Linux)
  • Users without WeChat for Mac or accessibility permissions
  • Publishing Moments with media (photos, videos)
  • Users needing cross-device or mobile support

Required permissions

  • macOS Accessibility permissions (to control WeChat)
  • WeChat for Mac installed and running

Risks and side effects

  • Relies on macOS Accessibility API, which may be affected by system updates
  • Granting accessibility permissions to terminal poses security risks
  • Changes to WeChat's interface may cause tools to fail
  • Automated actions may violate WeChat's terms of service
  • Accessibility-based control may be detected by WeChat as automation

Troubleshooting

  1. Ensure accessibility permissions are granted (System Settings → Privacy & Security → Accessibility)
  2. Ensure WeChat for Mac is installed and running
  3. Check Python version meets requirements (3.12+)
  4. If using uv, ensure `uv sync` has been executed
  5. Try different transport methods (stdio, sse, streamable-http)

Use cases

Automate replies to WeChat messages
Monitor chats and summarize information
Search chat history intelligently
Publish Moments drafts
Manage contacts via AI

Supported clients

Claude DesktopFull support
Claude CodeFull support
CodexFull support
OpenclawPartial support
ChatGPTPartial support