About MCP WhatsApp Server
MCP WhatsApp Server connects MCP-compatible AI assistants to WhatsApp through the Waha API. It supports connection checks, contact management, and sending messages by phone number or saved contact name.
Key features
- 01Check WhatsApp connection status
- 02Send messages by phone number
- 03Send messages by saved contact name
- 04Manage named contacts
- 05View server configuration
Use cases
- 01Check whether WhatsApp is connected
- 02Send a message to a number
- 03Send a message to a saved contact
- 04Review Waha API settings
MCP support
The MCP server exposes Waha configuration, WhatsApp connection status, and mapped contacts as resources, along with tools for checking the connection and sending messages.
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 READMEMCP WhatsApp Server
Servidor baseado no Model Context Protocol (MCP) para integração com WhatsApp através da API Waha.
Sobre o Projeto
Este servidor permite que assistentes IA compatíveis com MCP (como Claude) interajam diretamente com contatos no WhatsApp. O projeto utiliza a Waha API como backend para comunicação com o WhatsApp Web.
Funcionalidades
- ✅ Verificação do status de conexão do WhatsApp
- ✅ Envio de mensagens via número de telefone
- ✅ Envio de mensagens via nome de contato cadastrado
- ✅ Gerenciamento de contatos por nome
- ✅ Visualização de configurações do servidor
Requisitos
- Python 3.7+
- API Waha em execução
- Biblioteca MCP (Fast MCP)
Instalação
-
Clone este repositório:
git clone https://github.com/seu-usuario/mcp-whatsapp-server.git cd mcp-whatsapp-server -
Instale as dependências:
pip install -r requirements.txt -
Configure as variáveis de ambiente em um arquivo
.env:WAHA_API_URL=http://localhost:3000 WAHA_SESSION_ID=default CONTATOS_FILE=caminho/para/contatos.json (opcional) -
Configure seus contatos no arquivo
contatos.json:{ "contatos": { "Nome1": "5511999999999", "Nome2": "5522888888888" } }
Uso
-
Inicie a API Waha seguindo as instruções oficiais
-
Execute o servidor MCP:
python server.py -
Use o servidor com um cliente MCP compatível (como Claude Desktop)
Recursos MCP Disponíveis
Resources
waha://configuracao- Configurações da API Wahawaha://status- Status atual da conexão WhatsAppwaha://contatos- Lista de contatos mapeados por nome
Ferramentas (Tools)
verificar_conexao_whatsapp()- Verifica o status atual da conexãoenviar_mensagem_whatsapp(numero, mensagem)- Envia mensagem por número
Exemplos
Verificar Status da Conexão
status = verificar_conexao_whatsapp()
print(f"Status: {status['mensagem']}")
Enviar Mensagem por Número
resultado = enviar_mensagem_whatsapp("5511999999999", "Olá! Esta é uma mensagem de teste.")
print(f"Resultado: {resultado['mensagem']}")
Enviar Mensagem por Nome
resultado = enviar_mensagem_por_nome("Pedro", "Olá! Esta é uma mensagem de teste.")
print(f"Resultado: {resultado['mensagem']}")
Contribuições
Contribuições são bem-vindas! Sinta-se à vontade para abrir issues ou enviar pull requests.
Licença
Este projeto está licenciado sob MIT License.
Imagens e Demonstração
Exemplos de uso


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.