zapgate MCP server
Commit Nov 11, 2026Connects AI agents to WhatsApp accounts to read chats, search messages, and send content with human-in-the-loop approval.
Also known as ribeirogab/zapgate
- Stars
- 1
- Tools
- 14
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Nov 11, 2026
- License
- MIT
What is zapgate MCP?
zapgate connects AI agents to WhatsApp accounts to read chats, search messages, and send content with human-in-the-loop approval. It exposes 14 tools, such as list_accounts, list_chats, get_messages.
Summary generated from the project's README
About zapgate MCP server
Connecting AI agents to WhatsApp accounts to manage conversations is what zapgate enables for developers and automation enthusiasts. This self-hosted MCP server acts as a linked device through the whatsmeow library, allowing agents to read chats, search through message history, and download media. It supports multiple accounts simultaneously, such as personal or work numbers, and provides specific tools for listing chats, searching contacts, and marking messages as read.
Security and control are central to the setup, as every write action like sending a message, reacting, editing, or deleting requires human approval through MCP elicitation in clients like Claude Code, Cursor, or Codex. Users can deploy the server using Docker and connect local clients via HTTP or remote clients like ChatGPT and claude.ai using OAuth. The system is designed to prevent prompt injection by isolating message text in a specific field and offers webhooks to notify bots of new messages without constant polling.
What you can do with it
- 1Manage WhatsApp communications with oversightAsk an AI agent to send a text or media message to a contact while ensuring you must approve the content first.
- 2Search through chat historyInstruct an AI to find specific information or past conversations within a WhatsApp account.
- 3Automate message notificationsSet up a routine that receives a signed notification whenever a new message arrives.
- 4Access media from chatsHave an agent retrieve and provide images or documents sent in a conversation.
Written from the project's README. Every use case is checked against a quote from it.
zapgate MCP tools 14
Detected from the READMElist_accountslist_chatsget_messagessearch_messagesget_chatsearch_contactsdownload_mediarequest_older_historysend_messagesend_mediareactedit_message
Show all 14 toolsShow fewer tools
delete_messagemark_read
Automated checks
Ran Nov 14, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachableribeirogab/zapgate is public and reachablegithub.com/ribeirogab/zapgate ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-11github.com/ribeirogab/zapgate ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model14 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubzapgate
WhatsApp for AI agents, with a human in the loop.
zapgate is a self-hosted MCP server that connects your AI agents to your WhatsApp accounts. Agents read chats, search messages and download media. With your approval, they also send, react, edit and delete.
zapgate connects to WhatsApp as a linked device of each number, like WhatsApp Web, through the whatsmeow library.
[!WARNING] zapgate is not affiliated with WhatsApp or Meta. It is an unofficial client, and WhatsApp can ban a number that uses an unofficial client. Send at a human pace. Do not use zapgate for bulk messages or for messages that no person approves.
Why zapgate
- Many accounts, one server. Pair a personal number, a work number, or as many as you need. Every tool call names its account, and no tool has a default account.
- Your approval on every write. In clients with MCP elicitation (Claude Code, Codex, Cursor), every send, reaction, edit and delete opens a question with the exact account, chat and content. Nothing goes out until you accept.
- One access per client. Each client gets its own access, with only the accounts you choose. Bots get a read-only access.
- Webhooks instead of polling. A signed POST tells your bot, automation or Claude Code routine about new messages, once per burst. By default it carries no message text.
- Remote clients work too. OAuth with dynamic client registration lets claude.ai, ChatGPT and Claude on mobile connect as a custom connector. Static bearer tokens serve bots and CLIs.
- Built against prompt injection. Message text arrives in a
third_partyfield, and the server tells the agent that this field is data, not instructions. - Your history, on your disk. Full-text search, media downloaded on arrival, retention per account, and a JSON audit log.
- One static binary. Pure Go, no cgo, and a hardened container image for amd64 and arm64.
Quick start
You need Docker and a phone with WhatsApp.
git clone https://github.com/ribeirogab/zapgate.git
cd zapgate/deploy && ./init-env.sh && docker compose up -d --build
The init-env.sh script writes deploy/.env with a random owner password and signing key. The server listens on http://localhost:8080, on this computer only.
Pair a number. The account name is yours to choose:
docker compose exec zapgate zapgate accounts add personal --phone +5511988887777
The command shows an 8-character code. On the phone, open WhatsApp > Settings > Linked devices > Link a device > Link with phone number instead, and type the code.
Connect Claude Code:
claude mcp add --transport http --scope user whatsapp http://localhost:8080/mcp
In Claude Code, run /mcp, select whatsapp and authenticate. The browser opens the zapgate login page. Type the owner password, give the access a name, select the accounts and click Authorize. To read the owner password:
docker compose exec zapgate zapgate password
To use zapgate from claude.ai, ChatGPT or your phone, the server needs a public HTTPS address. See Deploy.
Tools
| Tool | Kind | What it does |
|---|---|---|
list_accounts |
read | Lists the accounts of the access, with their state |
list_chats |
read | Lists the chats of an account, with search and an unread filter |
get_messages |
read | Reads a part of a chat |
search_messages |
read | Searches text in an account |
get_chat |
read | Shows a chat and the members of a group |
search_contacts |
read | Searches contacts by name or number |
download_media |
read | Returns an image inline and a signed link for any media |
request_older_history |
read | Asks the phone for older messages of a chat |
send_message |
write | Sends text, with an optional quoted reply |
send_media |
write | Sends an image, video, audio, voice note or document |
react |
write | Adds or removes a reaction |
edit_message |
write | Edits a text that the account sent |
delete_message |
write | Deletes for everyone a message that the account sent |
mark_read |
mark_read | Marks received messages as read |
Every write needs your approval. See Tools for the inputs, the file uploads and the limits.
Documentation
- Deploy: local mode, always-on mode, configuration, updates and backups
- Accounts: pairing, states, a logged-out account and retention
- Access and approval: OAuth, static tokens, read-only access and approval modes
- Clients: Claude Code, Claude Desktop, claude.ai, ChatGPT, Codex, Cursor and bots
- Tools: tools, file uploads and limits
- Webhooks: signed deliveries to bots, automations and Claude Code routines
- Security: the risks and how zapgate handles them
- Glossary and decisions
License
MIT. WhatsApp is a trademark of WhatsApp LLC. zapgate is not affiliated with, endorsed by or sponsored by WhatsApp LLC or Meta Platforms, Inc.
zapgate MCP questions
What tools does zapgate MCP provide?
It exposes 14 tools, including list_accounts, list_chats, get_messages, search_messages, get_chat.
How does zapgate handle message security and prompt injection?
Message text is delivered in a specific third_party field, and the server explicitly instructs the agent that this field contains data rather than instructions.
Can I use multiple WhatsApp accounts with one server?
Yes, you can pair as many personal or work numbers as needed, and every tool call allows you to specify the account.
Is zapgate an official WhatsApp client?
No, it is an unofficial client that uses the whatsmeow library and is not affiliated with WhatsApp or Meta.