
Guarded WhatsApp
io.github.peter-tnc-453由 GitHub 账号 peter-tnc-453 发布v0.1.0更新于 Oct 24, 2026
Security gate for agent-driven WhatsApp: allowlist, secret scan, rate limit, audit log.
概览
为 AI 代理提供受管控的 WhatsApp 发送:白名单、密钥扫描、速率限制与审计日志把关每条消息和文件。
- 可以做什么
- 以只读方式预演发送,执行全部检查并返回判定结果和确认令牌,不实际发送
- 通过完整校验向白名单内的收件人发送文本消息
- 发送文件,自动使用 ASCII 安全文件名,并做类型、大小检查与说明文字扫描
- 查看收件人白名单,号码已脱敏
- 读取只追加审计日志中的近期记录
- 适用场景
- 当希望助手发送 WhatsApp 消息或文件,但需要对可联系对象、外发内容和频率设硬性限制,并保留每次尝试的记录时使用。适合在备用号码上做个人或团队自动化,而非生产环境的客户消息推送。
- 运行要求
- 以 Python 包形式在本地通过 stdio 运行(Python 3.10+),可从 PyPI 或源码安装。需要另有一个暴露发送接口且已完成登录的 WhatsApp 桥接服务在运行(首次需扫码)。需要 YAML 白名单配置文件,由环境变量 WA_GUARD_CONFIG 指定;审计日志写入用户主目录下。
安装
在 SourceWeft 中
- 打开 控制台中的 Guarded WhatsApp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
guarded-whatsapp-mcp
Govern & automate WhatsApp safely for AI agents.
[License: MIT] [Python 3.10+] [MCP server] [status: alpha] [PRs welcome]
An MCP server that lets an AI agent (or any MCP client) send WhatsApp messages and files — but only through a security gate you control: a recipient allowlist, secret scanning, file validation, rate limiting, a confirmation gate, and an append-only audit log.
Most WhatsApp bridges send anything, anywhere, with no record. That is fine for a human clicking send. It is not fine for an autonomous agent. guarded-whatsapp-mcp is the governance layer that makes agent-driven WhatsApp safe enough to trust.
This is not a Slack replacement. No channels, no threads, no workspace UI. It makes the WhatsApp you already use safe to automate.
See it in action
Good sends go through · a leaked key and an un-allowlisted number are blocked · files need a preview · everything is logged.
How it works
⚠️ Read this first — unofficial transport & WhatsApp Terms
This server governs access to a transport; by default that transport is the unofficial
whatsmeow-based bridge (e.g.
whatsapp-mcp), which speaks WhatsApp Web's
private protocol.
- An unofficial client violates WhatsApp's Terms of Service and can get a number banned. A reverse-engineered client cannot avoid this.
- Use a secondary / non-critical number. Never your primary or business-critical one.
- Not for production customer messaging — use the official WhatsApp Business Cloud API. An official Cloud-API backend is on the roadmap; the guard layer is built to front either transport.
The guardrails here reduce operational risk (wrong recipient, leaked secret, spam). They do not change the Terms-of-Service risk of the underlying bridge. We are loud about this on purpose so you can choose with eyes open.
Why teams use it
Security controls
Tools
Quickstart
Register with Claude Code / any MCP client
Example — a safe agent flow
Configuration
See config/allowlist.example.yaml. Key knobs:
allow_unlisted (the fail-closed switch), require_confirm_for, rate_limit, files,
secrets.on_detect, and the recipients allowlist. Edits hot-reload on each call.
Roadmap
- Pluggable backend — same guard layer in front of the unofficial bridge or the official WhatsApp Business Cloud API (compliant path).
- Inbound routing — surface incoming messages to agents (read · classify · route).
- Scheduled / templated sends through the same gate.
- Per-recipient policy (rate limits / confirm rules per contact or group).
Tests
Contributing
PRs welcome — see CONTRIBUTING.md. The one rule: keep the fail-closed posture, and add a test for every new check.
License
MIT — see LICENSE. Security model & honest limitations in SECURITY.md.
来源:README.md,提交 73cfc2c
工具
0版本历史
1- v0.1.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分