home / mcp / wechat mcp server

WeChat MCP Server

WeChat-MCP: let Openclaw/Claude/ChatGPT and other AI assistants read and reply to WeChat for you

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "biboyqg-wechat-mcp": {
      "command": "wechat-mcp",
      "args": []
    }
  }
}

You can automate WeChat on macOS using an MCP server that integrates with language models. It fetches messages, sends replies, posts Moments, and manages contacts through a structured MCP interface, enabling you to build conversational automations and workflows around WeChat chats.

How to use

You connect to the MCP server from your MCP client and issue high-level tool calls to interact with WeChat. Typical workflows include fetching recent messages from a chat, generating context-aware replies, sending those replies, and optionally publishing text-only Moments posts. You can also search chats, add contacts by WeChat ID, and run specialized sub-agents to assist with automation tasks. Start by running the server with a local stdio transport, then use your client to call the available tools to drive conversations and actions.

How to install

Prerequisites you need to have before installing:

  • macOS with Accessibility API support
  • WeChat for Mac installed and running
  • Python 3.12 or newer

Step 1: Install the MCP server package via Python’s package manager.

pip install wechat-mcp-server

Step 2: Start the MCP server using the stdio transport for local development.

wechat-mcp --transport stdio

Step 3: If you prefer other transports, you can start the server with the HTTP or SSE transports by changing the transport flag.

wechat-mcp --transport streamable-http
```
```
wechat-mcp --transport sse

Additional setup notes

Grant macOS Accessibility permissions so the MCP server can interact with WeChat and your terminal. Make sure WeChat is running before you start issuing commands.

Available tools

fetch_messages_by_chat

Retrieve recent messages from a specified chat, enabling context for replies or analysis.

reply_to_messages_by_chat

Send generated or scripted replies to a specific chat, automating conversation flow.

add_contact_by_wechat_id

Add a new contact using a WeChat ID and send a friend request, enabling expanded communication.

publish_moment_without_media

Publish a text-only Moments post with an option to draft first without posting; supports text-only content.

(Claude Code) Chat-summarizer

Summarize chat history and extract key information to inform replies.

(Claude Code) Auto-replier

Auto-generate and send appropriate replies based on chat context.

(Claude Code) Message-searcher

Search chat history for specific content or keywords.

(Claude Code) Multi-chat-checker

Monitor multiple chats and prioritize messages across conversations.

(Claude Code) Chat-insights

Analyze relationship dynamics and communication patterns within chats.