
Guarded WhatsApp
io.github.peter-tnc-453Published by GitHub account peter-tnc-453v0.1.0Updated Oct 24, 2026
Security gate for agent-driven WhatsApp: allowlist, secret scan, rate limit, audit log.
Overview
Governed WhatsApp sending for AI agents: an allowlist, secret scanning, rate limits and an audit log gate every message and file the assistant sends.
- What you can do
- Preview a send as a dry run, running every check and returning a verdict plus a confirmation token without sending anything
- Send text messages to allowlisted recipients through the full gate
- Send files with ASCII-safe filenames, type and size checks, and scanned captions
- Inspect the recipient allowlist with numbers masked
- Read recent entries from the append-only audit log
- When to use it
- Use it when you want an assistant to send WhatsApp messages or files but need hard limits on who can be messaged, what content leaves, and how often, with a record of every attempt. It suits personal or team automation on a secondary number rather than production customer messaging.
- Requirements
- Runs locally as a Python package (Python 3.10+) over stdio, installed from PyPI or from source. A separate WhatsApp bridge exposing a send API must be running with an authenticated session (first run needs a QR scan). A YAML allowlist config file is required, pointed to by the WA_GUARD_CONFIG environment variable; the audit log is written under the user's home directory.
Installation
In SourceWeft
- Open Guarded WhatsApp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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.
Source: README.md at commit 73cfc2c
Tools
0Version history
1- v0.1.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts