WeChat Agent Bridge
Provides local, read-only access to PC WeChat 4.x chat data: discovers the WeChat data directory, extracts the SQLCipher key via read-only process memory scanning (no DLL injection), decrypts the databases offline, and exposes 14 MCP tools (list_sessions, search_messages, get_stats, get_timeline, get_keyword_trend, get_year_report, export_chat, etc.) for deep retrieval, statistics and export of sessions, friends and group chats.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
WeChat Agent Bridge
让微信聊天记录直连你的本机 AI — 集 PC 微信 4.x 本地只读直连与数据统计、14 个原生 MCP 工具直连 7 大本机 Agent、Ollama 离线小模型三层防噪静默待办巡检、曜石翡翠 / 瓷雾液态玻璃 Web 看板 以及 物理隔离手机端 HTTPS 实时双向同步 于一体的 Windows 本地优先工作台。
🎬 在线观看 60fps WebGL 宣传动画官网 · English README · MIT License
核心特性
零 DLL 注入 · 纯本机离线直连微信 4.x
自动探测 Windows PC 微信 4.x 数据目录(
xwechat_files\*\db_storage)。仅使用 Windows 只读内存 API(
ReadProcessMemory)提取本地 SQLCipher 4 密钥并离线解密,不注入微信进程、不上传任何云端服务器。集成并安全加固开源项目
zwl467135974/wechat-cli(默认强制仅绑定127.0.0.1、补齐微信 4.1+ WCDB Cipher 内存扫描与koffi结构体修复)。
14 个原生 MCP 工具,一键桥接 7 大本机 AI Agent
一键写入标准 MCP 配置,支持 Claude Code CLI、Codex CLI / Desktop、Antigravity,同时支持直连/转发到 OpenClaw、Obsidian、Ollama 与自定义 Webhook。
让本机 AI Agent 自主调用
list_sessions、search_messages、get_stats、get_timeline、get_keyword_trend、get_year_report、export_chat等 14 个工具完成深度检索与分析。
离线小模型(Ollama)三层防噪静默巡检
独立守护进程(
bridge/auto_todo_worker.py)定时拉取增量消息,无需消耗云端 API 额度。三层防噪提准:① 本地规则预过滤(剔除广告号、水群表情、接龙刷屏);② 严格 JSON Schema 约束本地模型(默认
qwen2.5vl:3b,亦可选配 OpenAI 兼容 / DeepSeek 后端)精准提炼待办;③ 模糊相似度 + 指纹去重写入本地 SQLite,每轮结束后keep_alive: "30s"自动卸载显存。
曜石翡翠 / 瓷雾浅色 · 液态玻璃 Web 统计工作台
内置
http://127.0.0.1:5200中文 Web 分析面板:24H 活跃热力矩阵、14 日消息趋势、好友/群聊排行、词云统计、导出TXT / JSON / HTML,并具备 View Transition 圆形水波纹双主题切换与 60fps 微交互动效。
物理隔离双端口 · 手机端 HTTPS 双向实时同步
本机
127.0.0.1:5200微信聊天金库彻底不接入公网;公网隧道仅指向独立隔离的127.0.0.1:5201手机待办服务(/api/messages等聊天接口严格返回404)。支持 Cloudflare Quick Tunnel 自动自愈(电脑休眠断线自动重建新隧道)与
HttpOnly + Secure30 天访问口令 Cookie,手机扫码/点链即可与电脑秒级双向同步待办。
Awwwards 灵感 6 幕 WebGL 交互式宣传动画(
docs/)内置零外部 CDN 依赖的纯 WebGL GLSL 着色器 + 3D 渲染引擎,支持时间轴逐帧擦洗、鼠标滚轮交互、程序化 Web Audio 电影音效与一键录制导出 60fps WebM 宣传视频。
Related MCP server: WeChat Local Agent MCP
系统架构
PC WeChat 4.x (SQLCipher 4, Local Disk)
│ [Read-Only Memory Scan · Zero DLL Injection]
▼
Local Decrypted Cache (127.0.0.1:5200 · Air-Gapped Vault)
├──► Liquid Glass Web Analytics Dashboard (5200)
├──► 14 MCP Tools ──► Claude Code / Codex / Antigravity / OpenClaw / Obsidian
└──► Offline AI Todo Worker (Ollama Qwen 3B · 3-Layer Filter · 30s VRAM Free)
│
▼ (Todos ONLY · No Chat History)
Local SQLite Inbox (~/.wechat-agent-bridge/inbox.db)
│
▼ [Isolated Port 127.0.0.1:5201 + Cloudflare HTTPS Auto-Heal Tunnel]
Mobile PWA Web App (Bi-directional Real-Time Sync · Token Cookie Auth)环境要求
操作系统:Windows 10 / 11(64 位),已登录 PC 微信 4.x
Python:3.10+(标准库为主,
requirements.txt仅含少量轻量依赖)Node.js:18+(用于编译和运行内置
third_party/wechat-cli)可选组件:
Ollama(用于 0 费用离线待办自动巡检,推荐拉取
ollama pull qwen2.5vl:3b或任意支持 JSON 输出的 3B~7B 模型)cloudflared(用于手机端 HTTPS 隔离同步:winget install Cloudflare.cloudflared)
快速开始
1. 安装依赖与编译内置 wechat-cli
git clone https://github.com/shisisishi/wechat-agent-bridge.git
cd wechat-agent-bridge
# 安装 Python 依赖
pip install -r requirements.txt
# 编译内置 wechat-cli(TypeScript -> dist)
cd third_party\wechat-cli
npm install
npm run build
cd ..\..2. 环境自检与一键接入本机 AI Agent(MCP)
# 检测微信数据目录、Node/Python 与已安装的本机 AI Agent
python run.py --detect
# 一键为 Claude Code / Codex / Antigravity 注册 14 个微信 MCP 工具(自动备份原配置)
python run.py --setup-mcp all3. 启动各功能模块(均提供一键 .bat 脚本)
入口脚本 / 命令 | 功能说明 |
| 启动 |
| 一键配置 Claude Code / Codex / Antigravity MCP 直连 |
| 启动每 30 分钟静默巡检进程(Ollama 本地模型自动提炼待办并释放显存) |
| 启动隔离端口 |
| 本地 |
4. 运行单元测试
python -m unittest discover -s tests -v隐私与安全声明
本地闭环原则:所有聊天记录解密、检索、统计和 Ollama 离线推理均在
127.0.0.1本机完成,项目不包含任何遥测或云端数据上报逻辑。物理隔离手机同步:
127.0.0.1:5201手机端服务仅访问待办清单表,不挂载任何微信数据库或消息接口;未授权访问强制返回401。合规提醒:本项目仅供个人备份、个人数据统计与本机效率工具研究学习使用,请仅对本人合法登录的账号数据在本地使用,严禁用于任何侵犯他人隐私或违反相关法律法规的用途。
致谢与许可
本项目内置并安全增强了
zwl467135974/wechat-cli(MIT License,完整上游许可保留于third_party/wechat-cli/LICENSE)。宣传动画(
docs/)动效手法致敬 Awwwards 精选作品(Grids、Apekon、Cyera AI Guardian、Cheese AI、Piven Ilya、Focus Industries),详见动画右上角「✦ Awwwards 灵感」面板。本项目基于 MIT License 开源。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
WA MCP (wa-mcp.com) is a hosted WhatsApp MCP server, with nothing to install. It isn't one of the open-source wa-mcp or whatsapp-mcp projects on GitHub. It connects the WhatsApp number you already have, personal or Business, to Claude, ChatGPT, Grok Bot, Cursor or any MCP client, so your AI can read, search and reply to your chats. Free plan with no time limit.
Keeps your memory: WhatsApp, voice or any AI tool over MCP, Markdown you own, recall with sources
Free WhatsApp MCP server for ChatGPT and Claude: read and search chats, every send you approve.
Related MCP Servers
- FlicenseCqualityDmaintenanceMCP server for reading local WeChat data, enabling AI assistants to query chat history, contacts, sessions, and more via MCP tools.209-
- AlicenseBqualityDmaintenanceA local-first MCP server that lets agents search and summarize a user's own WeChat history, with stable pagination, bulk chat workflows, unread/event queries, and gated enrichment tools.193MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to query local WeChat chat data through read-only MCP tools, including sessions, messages, contacts, search, and statistics, with everything processed locally.75 PyPI6MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to read the local, already-logged-in WeChat account's chat history: fetch recent messages per contact for reply suggestions, bulk-export all conversations into a local SQLite index for full-text and semantic search, and export media or Moments timelines as offline HTML. Everything runs locally and read-only on macOS, exposing 15 MCP tools plus a matching CLI.GPL 3.0