Skip to content
Back to search

WeChat-MCP

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

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/biboyqg--wechat-mcp/badge.svg)](/listings/biboyqg--wechat-mcp)

HTML

<a href="/listings/biboyqg--wechat-mcp"><img src="/api/listings/biboyqg--wechat-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Installation

pip install wechat-mcp-server

Setup with Claude Code

# 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

<details> <summary>Setup with Claude Desktop</summary>

// 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"
      ],
    }
  }
}

</details>

<details> <summary>Setup with Codex</summary>

# 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

</details>

macOS Permissions

⚠️ **Important**: Grant Accessibility permissions to your terminal:

1. Open **System Settings → Privacy & Security → Accessibility** 2. Add your terminal application (Terminal.app, iTerm2, etc.) 3. Ensure WeChat is running before using the server

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 169 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <div align="center">
  2. # WeChat MCP Server
  3. [![Python 3.12+](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/downloads/)
  4. [![PyPI version](https://img.shields.io/pypi/v/wechat-mcp-server.svg)](https://pypi.org/project/wechat-mcp-server/)
  5. [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  6. [中文](docs/README_zh.md) | English
  7. </div>
  8. An MCP server that automates WeChat on macOS using the Accessibility API and screen capture. It enables LLMs to interact with WeChat chats programmatically.
  9. ## Features
  10. - 📨 Fetch recent messages from any chat (contact or group)
  11. - ✍️ Send automated replies based on chat history
  12. - 📷 Publish text-only Moments posts, with optional draft-only mode
  13. - 👥 Add contacts using WeChat ID with configurable privacy
  14. - 🔍 Smart chat search with exact name matching
  15. - 🤖 5 specialized Claude Code sub-agents for smart WeChat automation
  16. ## Quick Start
  17. ### Installation
  18. ```bash
  19. pip install wechat-mcp-server
  20. ```
  21. ### Setup with Claude Code
  22. ```bash
  23. # If installed via pip
  24. claude mcp add --transport stdio wechat-mcp -- wechat-mcp
  25. # If using uv for development
  26. claude mcp add --transport stdio wechat-mcp -- uv --directory $(pwd) run wechat-mcp
  27. ```
  28. <details>
  29. <summary>Setup with Claude Desktop</summary>
  30. ```json
  31. // If installed via pip
  32. {
  33. "mcpServers": {
  34. "wechat-mcp": {
  35. "type": "stdio",
  36. "command": "wechat-mcp"
  37. }
  38. }
  39. }
  40. // If using uv for development
  41. {
  42. "mcpServers": {
  43. "wechat-mcp": {
  44. "type": "stdio",
  45. "command": "uv",
  46. "args": [
  47. "--directory",
  48. "{path/to/wechat-mcp}",
  49. "run",
  50. "wechat-mcp"
  51. ],
  52. }
  53. }
  54. }
  55. ```
  56. </details>
  57. <details>
  58. <summary>Setup with Codex</summary>
  59. ```bash
  60. # If installed via pip
  61. codex mcp add wechat-mcp -- wechat-mcp
  62. # If using uv for development
  63. codex mcp add wechat-mcp -- uv --directory $(pwd) run wechat-mcp
  64. ```
  65. </details>
  66. ### macOS Permissions
  67. ⚠️ **Important**: Grant Accessibility permissions to your terminal:
  68. 1. Open **System Settings → Privacy & Security → Accessibility**
  69. 2. Add your terminal application (Terminal.app, iTerm2, etc.)
  70. 3. Ensure WeChat is running before using the server
  71. ## Usage
  72. ### Basic Commands
  73. ```bash
  74. # Run with default stdio transport
  75. wechat-mcp --transport stdio
  76. # Run with HTTP transport
  77. wechat-mcp --transport streamable-http
  78. # Run with SSE transport
  79. wechat-mcp --transport sse
  80. ```
  81. ### Available MCP Tools
  82. - **`fetch_messages_by_chat`** - Get recent messages from a chat
  83. - **`reply_to_messages_by_chat`** - Send a reply to a chat
  84. - **`add_contact_by_wechat_id`** - Add a new contact using a WeChat ID and send a friend request
  85. - **`publish_moment_without_media`** - Publish a text-only Moments post (no photos or videos); optionally only prepare a draft without posting via `publish=False`
  86. See [detailed API documentation](docs/detailed-guide.md) for full tool specifications.
  87. ## Claude Code Sub-Agents
  88. This project includes 5 intelligent sub-agents designed specifically for WeChat automation. They enable natural language control of WeChat through Claude Code.
  89. ### Available Sub-Agents
  90. 1. **Chat-summarizer** - Summarize chat history and extract key information
  91. 2. **Auto-replier** - Auto-generate and send appropriate replies
  92. 3. **Message-searcher** - Search chat history for specific content
  93. 4. **Multi-chat-checker** - Monitor multiple chats and prioritize messages
  94. 5. **Chat-insights** - Analyze relationship dynamics and communication patterns
  95. 📖 [View complete sub-agents guide](.claude/agents/README.md)
  96. ## Development
  97. ### Local Setup with uv
  98. ```bash
  99. # Install uv
  100. curl -LsSf https://astral.sh/uv/install.sh | sh
  101. # Clone and setup
  102. git clone https://github.com/yourusername/WeChat-MCP.git
  103. cd WeChat-MCP
  104. uv sync
  105. # Run locally
  106. uv run wechat-mcp --transport stdio
  107. ```
  108. ## Documentation
  109. - 📘 [Detailed Guide](docs/detailed-guide.md) - Complete API documentation and architecture
  110. - 🤖 [Sub-Agents Guide](.claude/agents/README.md) - How to use Claude Code sub-agents
  111. ## Requirements
  112. - macOS (uses Accessibility API)
  113. - WeChat for Mac installed and running
  114. - Python 3.12+
  115. - Accessibility permissions for terminal
  116. ## Contributing
  117. Contributions are welcome! Please feel free to submit a Pull Request.
  118. ## License
  119. MIT License - see [LICENSE](LICENSE) file for details

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.