WhatsApp API for multi-device, supporting UI & webhooks
Top 21.6% on sourcepulse
This project provides an API for the WhatsApp Web Multi-Device version, enabling programmatic interaction with WhatsApp. It targets developers and AI agents needing to send messages, manage contacts, and automate WhatsApp tasks, offering both a RESTful HTTP API and a Model Context Protocol (MCP) server for AI integration.
How It Works
The API leverages the whatsmeow
library to interact with WhatsApp Web. It offers two primary modes: a REST API for standard HTTP requests and an MCP server for AI agents. The MCP server uses Server-Sent Events (SSE) for real-time communication and provides standardized tools for actions like sending text, contacts, links, and locations. This dual-mode approach allows for flexible integration with various applications and AI frameworks.
Quick Start & Requirements
docker-compose up -d --build
(See docker-compose.yml
example)go build -o whatsapp
) or download releases. Run ./whatsapp
or .\whatsapp.exe
.git clone
the repository, cd src
, go run main.go
.ffmpeg
is required for image/video compression. On macOS, set export CGO_CFLAGS_ALLOW="-Xpreprocessor"
.Highlighted Details
Maintenance & Community
The project is maintained by aldinokemal. Support is encouraged via Patreon. Community links are not explicitly provided in the README.
Licensing & Compatibility
The project is licensed under the MIT License. It is compatible with commercial use and closed-source linking.
Limitations & Caveats
This project is unofficial and not affiliated with WhatsApp. The MCP server and REST API are currently separate, with a unified MCP planned for the future. The README notes that only MCP or REST API can be run at a time, a limitation inherited from the whatsmeow
library.
5 days ago
Inactive