BW 

biboyqg/wechat-mcp 是从 https://github.com/biboyqg/wechat-mcp. 导入的 MCP 服务器候选
概览
biboyqg/wechat-mcp 是从 https://github.com/biboyqg/wechat-mcp. 导入的 MCP 服务器候选
概述(AI 翻译)
中文 |英语
一个MCP服务器,利用无障碍API和屏幕截图自动化macOS上的微信。它使LLM能够以程序方式与微信聊天交互。
特色
- 📨 从任何聊天(联系人或群组)获取最近消息
- ✍️ 根据聊天历史发送自动回复
- 📷 发布纯文本的Moments帖子,可选仅草稿模式
- 👥 使用微信ID添加联系人,并可配置隐私
- 🔍 智能聊天搜索,姓名完全匹配
- 🤖 5 智能微信自动化专用Claude代码子代理
快速启动
安装
用Claude Code设置
使用 Claude Desktop 的设置
使用Codex的设置
macOS 权限
⚠️ 重要:授予您的终端无障碍权限:
- 开放 系统设置 →隐私与安全→无障碍
- 添加你的终端应用(Terminal.app、iTerm2等)
- 使用服务器前确保微信运行良好
用途
基本指令
可用MCP工具
fetch_messages_by_chat- 获取聊天中的最新消息reply_to_messages_by_chat- 回复聊天
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
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
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
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
# 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
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 server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
// 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"
],
}
}
}