WhatsappSAFE
Whatsapp MCP Server implemented in Python
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
A server that provides a Model Context Protocol (MCP) interface to interact with WhatsApp Business API using FastMCP.
Introduction
WhatsApp MCP Server is a Python implementation that enables language models like Claude to interact with WhatsApp functionality through GreenAPI. It leverages FastMCP for improved performance, better developer experience, and a cleaner implementation.
Features
- Messaging: Send text messages to WhatsApp contacts
- Group Management: Create groups, list members, add/remove participants
- Session Handling: Manage WhatsApp API sessions
- Chat History: Retrieve chat lists and message history
WhatsApp API Client
This project uses the whatsapp-api-client-python library to interact with WhatsApp. The client provides access to the WhatsApp Cloud API, which requires a GreenAPI account to use.
Environment Variables
This project uses environment variables for configuration:
GREENAPI_ID_INSTANCE: Your GreenAPI ID instanceGREENAPI_API_TOKEN: Your GreenAPI API token
You can either set these in your environment or use the provided .env file (see Installation instructions).
Installation
# Clone the repository git clone https://github.com/yourusername/whatsapp-mcp-server.git cd whatsapp-mcp-server # Install dependencies pip install -e . # Set up environment variables cp .env-template .env # Edit the .env file with your GreenAPI credentials
Usage
Run the MCP server:
# Run the MCP server on default host (127.0.0.1) and port (8000) whatsapp-mcp # Specify host and port whatsapp-mcp --host 0.0.0.0 --port 9000
For debugging:
whatsapp-mcp --debug
The server communicates using the Model Context Protocol (MCP) and can be accessed via HTTP or WebSockets when running with FastMCP.
Available Tools
open_session: Open a new WhatsApp sessionsend_message: Send a message to a chat
47208d081c1fOBSERVED · 2026-10-09Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add whatsapp-mcp-server --env GREENAPI_API_TOKEN=${GREENAPI_API_TOKEN} -- uvx whatsapp-mcp-server{
"mcpServers": {
"whatsapp-mcp-server": {
"command": "uvx",
"args": [
"whatsapp-mcp-server"
],
"env": {
"GREENAPI_API_TOKEN": "${GREENAPI_API_TOKEN}"
}
}
}
}Exposed tools (5)
3 read · 2 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
create_group | write | |
get_chats | read | |
get_group_participants | read | |
open_session | read | Open a new WhatsApp session. |
send_message | write |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (1)
.env-template
Gates applied: no_behavioural_pass.
47208d081c1ffull audit observations/trust-audit/mcp-server/msaelices__whatsapp.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-09 | 47208d081c1f | SAFE | B | 89 | first audit |
Questions
What is the Whatsapp MCP server?
Whatsapp MCP Server implemented in Python
What tools does Whatsapp expose?
5 in total: 3 read-only, 2 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Whatsapp safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Whatsapp need?
It reads GREENAPI_API_TOKEN from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How current is this page?
The grade is for one exact copy of the source (47208d081c1f), read on 2026-10-09. The repository is watched and re-audited when it changes.