Whatsapp MCP Server implemented in Python
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"whatsapp-mcp-server": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A server that provides a Model Context Protocol (MCP) interface to interact with WhatsApp Business API using FastMCP.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in communication
Asynchronous coordination layer for AI coding agents: identities, inboxes, searchable threads, and advisory file leases over FastMCP + Git + SQLite
An MCP server that securely interfaces with your iMessage database via the Model Context Protocol (MCP), allowing LLMs to query and analyze iMessage conversations. It includes robust phone number validation, attachment processing, contact management, group chat handling, and full support for sending and receiving messages.
IMAP/SMTP email MCP server — 47 tools, IMAP IDLE push, multi-account, AI triage.
Email & SMS infrastructure for AI agents — send and receive real email and text messages programmatically
MCP Security Weekly
Get CVE alerts and security updates for Whatsapp Mcp Server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A server that provides a Model Context Protocol (MCP) interface to interact with WhatsApp Business API using FastMCP.
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.
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.
This project uses environment variables for configuration:
GREENAPI_ID_INSTANCE: Your GreenAPI ID instanceGREENAPI_API_TOKEN: Your GreenAPI API tokenYou can either set these in your environment or use the provided .env file (see Installation instructions).
# 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
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.
open_session: Open a new WhatsApp sessionsend_message: Send a message to a chatget_chats: Get a list of chatscreate_group: Create a new WhatsApp groupget_group_participants: Get the participants of a groupThe WhatsApp MCP Server uses FastMCP to provide both WebSocket and HTTP endpoints:
ws://localhost:8000/mcphttp://localhost:8000/mcpYou can test the API directly using tools like curl:
# List available tools
curl -X POST http://localhost:8000/mcp/listTools
# Call a tool
curl -X POST http://localhost:8000/mcp/callTool \
-H "Content-Type: application/json" \
-d '{"name": "open_session", "arguments": {}}'
To add a WhatsApp server to Claude, use the claude mcp add command:
# Add the WhatsApp MCP server
$ claude mcp add whatsapp -- whatsapp-mcp
# List existing MCP servers - Validate that the server is running
claude mcp list
# Start claude code
claude
Once the WhatsApp MCP server is running, you can interact with it using Claude in your conversations:
Login to WhatsApp
Send the "Hello" message to John Doe
To use the WhatsApp MCP server with Claude Desktop, you need to add it to your claude_desktop_config.json file:
"mcpServers": {
"whatsapp": {
"command": "python",
"args": ["-m", "whatsapp_mcp"]
}
}
"mcpServers": {
"whatsapp": {
"command": "whatsapp-mcp"
}
}
"mcpServers": {
"whatsapp": {
"command": "docker",
"args": ["run", "--rm", "-i", "-e", "GREENAPI_ID_INSTANCE=your_instance_id", "-e", "GREENAPI_API_TOKEN=your_api_token", "whatsapp-mcp-server"]
}
}
Remember to set your GreenAPI credentials either as environment variables or in your .env file before starting Claude Desktop.
The WhatsApp MCP serv