About WhatsApp Message Sender MCP Tool
WhatsApp Message Sender MCP Tool is an MCP server for sending WhatsApp messages through the Meta WhatsApp Business API. It also provides a contacts resource for clients that need contact names and phone numbers.
Key features
- 01Send messages to phone numbers
- 02Read contacts with names and numbers
- 03Use Meta WhatsApp Business API credentials
Use cases
- 01Send a WhatsApp message to a specified number
- 02Look up contact names and phone numbers
MCP support
Exposes the `send_whatsapp_message` tool for sending messages and a `contacts` resource containing contact names and phone numbers to MCP clients.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEWhatsApp Message Sender MCP Tool
This is a MCP (Model Context Protocol) that sends WhatsApp messages using the Meta (Facebook) WhatsApp Business API.
Requirements
- Python 3.12 or higher
- uv (Python package manager)
- Meta WhatsApp Business API credentials
Installation
- Clone the repository:
git clone https://github.com/deuslirio/mcp-server-whatsapp-message.git
cd mcp-server-whatsapp-message
- Install dependencies using uv:
uv pip install -e .
Running the Server
Standalone Mode
Start the server with:
uv run python main.py
The server will be running and ready to receive requests.
Integration with Claude Local
To add this tool to your Claude Local configuration, add the following to your Claude's configuration:
{
"mcpServers": {
"whatsapp": {
"command": "uv",
"args": [
"run",
"\\\\wsl.localhost\\Ubuntu-24.04\\home\\deuslirio\\PycharmProjects\\mcp-server-whatsapp-message\\main.py"
],
"env": {
"META_ACCESS_TOKEN": "your-token-here",
"META_PHONE_NUMBER_ID": "your-phone-id-here"
}
}
}
}
Note: Replace the environment variable values with your actual Meta API credentials.
Available Tools
send_whatsapp_message
Sends a WhatsApp message to a specified phone number.
Parameters:
phone_number: The recipient's phone number (string, international format, e.g., +5562995631588)message: The message to send (string)
Usage Example:
{
"phone_number": "+5562000000000",
"message": "Hello! This is a test message!"
}
Available Resources
contacts
Returns a list of contacts with their names and phone numbers.
URI: resource://contacts
Example Response:
[
{"name": "João da Silva", "phone_number": "+55629999999999"}
]
Demo
Here are some screenshots demonstrating the WhatsApp Message Sender MCP Tool in action:
Sending a Message
Receiving a Message
Using the Contacts Resource
Received Message
Troubleshooting
Common Issues
-
FastMCP Import Error:
- Verify that the
mcppackage is installed correctly:uv pip install mcp==1.6.0
- Verify that the
-
Environment Variables Error:
- Make sure the environment variables are correctly set in your Claude Local configuration
- Verify that the variable values are correct
-
Error when running with uv run:
- Try clearing the uv cache:
uv cache clean - Reinstall dependencies:
uv pip install -e .
- Try clearing the uv cache:
Project Structure
mcp-server-whatsapp-message/
├── main.py # Server entry point
├── mcp_server/ # Main module
│ ├── __init__.py # Module initialization
│ └── whatsapp_handler.py # WhatsApp message handler
├── pyproject.toml # Project configuration
├── requirements.txt # Project dependencies
└── .env # Environment variables (not versioned)
Contributing
Contributions are welcome! Feel free to open issues or submit pull requests.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.