Skip to main content
Glama
2718704495-eng

wechat-ai-assistant-public

微信 AI 聊天助手

这是一个面向 macOS 微信桌面端的本地优先 AI 助手参考实现,展示从会话读取、上下文处理、模型编排到受控回复提交的完整工程链路。

本仓库由真实项目的可公开代码整理而成。联系人、地点、账号、本机路径、运行记录和个性化消息样本均已替换为通用示例;原始私有仓库及本地运行数据不会公开。

核心能力

  • 通过 macOS Accessibility 与 Vision OCR 识别目标会话和可见消息。

  • 提供只读历史、当前会话和受控发送三类 MCP 入口。

  • 使用候选锁定、草稿核验、单次提交和发送读回保障回复幂等性。

  • 对会话记忆进行加密存储、分页检索、敏感信息过滤和冲突处理。

  • 支持 dry-runobservesupervised-sendlive 分阶段运行模式。

  • 使用 TypeScript、Zod、Vitest 与 Swift 完成类型约束、业务测试和原生桥接验证。

Related MCP server: WeChat FastBridge

安全边界

  • 默认模式为 observe,只读且不发送消息。

  • 真实发送必须经过明确授权、草稿验证与发送结果读回。

  • 密钥、会话数据和个人资料不写入仓库;本地运行目录应保持 0700 权限。

  • 不提供自动登录、盲坐标点击、验证码处理或绕过系统权限的能力。

本地验证

npm ci
npm run lint
npm run typecheck
npm test
npm run native:test

项目要求 Node.js 20,并在 macOS 上使用 Swift 工具链验证原生桥接部分。npm test 使用串行文件模式,避免发布事务类测试与清理 dist/ 的测试并行运行时互相影响。

目录

  • src/:会话、记忆、策略、MCP 与运行时核心逻辑。

  • native/:macOS OCR、窗口识别和受控输入桥接。

  • tests/:单元测试、集成测试和边界场景验证。

  • scripts/:构建、安装和受控发布脚本。

  • config/:脱敏后的发布权限边界示例配置。

  • assets/:脱敏后的测试图片素材。

  • prompts/:不含个人信息的通用提示模板。

脱敏说明

公开版使用“示例用户”“示例联系人”“示例城市”等占位数据。仓库不包含原项目的私人联系人、真实地点、聊天记录、运行日志、验证回执、项目记忆或本机凭据。

许可

本仓库暂未添加开源许可证,仅作为作品集和技术交流展示;未经作者许可,请勿直接复制、商用或用于真实账号自动化。

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables automation of WeChat on macOS through the Accessibility API, allowing LLMs to fetch recent messages from contacts and send replies based on conversation history.
    52 PyPI
    259
    MIT
  • A
    license
    C
    quality
    B
    maintenance
    Local macOS MCP server for verified WeChat reading, sending, media, and token-efficient allowlisted monitoring. Its Docker image supports registry introspection only; real WeChat automation requires macOS Accessibility.
    6
    7
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A production-oriented MCP server that exposes task-level WeChat Desktop automation to AI clients, enabling status checks, message fetching/reply, contact addition, and Moment publishing on macOS via accessibility automation.
    4
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that lets an LLM read and drive the macOS WeChat client through the Accessibility API, without reverse-engineering or injected code. It supports listing chats, opening conversations, reading messages, sending actions, and saving media locally.
    MIT