WeChat MCP Server — let AI query your WeChat messages directly
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"wechat-claudecode-mcp","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# WeChat × Claude Code MCP 让 Claude Code 直接读取你的微信聊天记录。支持 macOS 和 Windows。 提取微信 (WeChat) 数据库密钥,解密 SQLCipher 加密的本地数据库,导出聊天记录。内置 MCP Server,让 AI 直接查询微信数据——不需要截图,不需要复制粘贴,你的 Claude 可以直接搜索、浏览、分析你的所有微信对话。 ## 功能 - 🔑 **密钥提取**:macOS 通过 LLDB 内存扫描,Windows 通过 pymem 进程内存搜索 - 🔓 **数据库解密**:使用 SQLCipher 解密所有本地数据库(消息、联系人、会话等) - 💬 **消息导出**:按联系人/群聊导出,支持模糊匹配、关键词搜索、日期筛选 - 🤖 **MCP Server**:注册到 Claude Code 后,AI 可直接查询微信数据 - 📡 **消息轮询**:实时监听指定对话的新消息,适配 Claude Code 的微信聊天模式 ## 安装 ### 通过 pip 安装(推荐) ```bash pip install wechat-claudecode-mcp ``` 安装后可用以下命令: | 命令 | 功能 | |------|------| | `wechat-mcp` | 启动 MCP Server | | `wechat-mcp-keygen` | 提取密钥(macOS) | | `wechat-mcp-keygen-win` | 提取密钥(Windows) | | `wechat-mcp-decrypt` | 解密数据库 | | `wechat-mcp-export` | 导出聊天记录 | | `wechat-mcp-verify` | 验证密钥 | | `wechat-mcp-poll` | 轮询新消息 | ### 从源码安装 ```bash git clone https://github.com/SsssssSynqa/WeChat-ClaudeCode-MCP.git cd WeChat-ClaudeCode-MCP pip install -e . ``` ### 系统依赖 macOS 还需要: ```bash brew install llvm sqlcipher ``` ## 快速开始(macOS) ### 1. 前置条件 - macOS arm64,微信 4.x - 禁用 SIP:`csrutil disable`(提取密钥时需要,解密和查询不需要) - 安装系统依赖:`brew install llvm sqlcipher` ### 2. 提取密钥 确保微信已登录并正在运行: ```bash PYTHONPATH=$(lldb -P) wechat-mcp-keygen ``` 密钥保存到 `~/.wechat-mcp/wechat_keys.json`。提取一次即可,微信大版本更新后需重新提取。 ### 3. 注册 MCP Server 到 Claude Code ```bash claude mcp add wechat -- wechat-mcp ``` 就这么简单!注册后 AI 可以直接调用以下能力: | Tool | 功能 | |------|------| | `get_recent_sessions` | 获取最近会话列表 | | `get_chat_history` | 查看聊天记录(支持模糊匹配、日期筛选) | | `search_messages` | 跨会话搜索关键词 | | `get_contacts` | 搜索联系人 | MCP Server 直接查询加密数据库(通过 sqlcipher3),无需预先解密,始终读取最新消息。 ### 4. 其他工具(可选) ```bash # 解密数据库(离线分析用) wechat-mcp-decrypt # 导出聊天记录 wechat-mcp-export # 列出所有会话 wechat-mcp-export -c "联系人名字" # 导出指定会话 wechat-mcp-export -s "关键词" # 搜索关键词 wechat-mcp-export --all # 导出所有会话 # 轮询新消息(实时监听) wechat-mcp-poll wxid_xxx # 每8秒检查一次 wechat-mcp-poll wxid_xxx 5 # 自定义间隔 wechat-mcp-po…
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.