go-whatsapp-web-multidevice  by aldinokemal

WhatsApp API for multi-device, supporting UI & webhooks

created 3 years ago
2,128 stars

Top 21.6% on sourcepulse

GitHubView on GitHub
Project Summary

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

  • Install/Run:
    • Docker: docker-compose up -d --build (See docker-compose.yml example)
    • Binary: Build from source (go build -o whatsapp) or download releases. Run ./whatsapp or .\whatsapp.exe.
    • Source: git clone the repository, cd src, go run main.go.
  • Prerequisites: ffmpeg is required for image/video compression. On macOS, set export CGO_CFLAGS_ALLOW="-Xpreprocessor".
  • Links: OpenAPI Spec, UI Demos

Highlighted Details

  • Supports sending various message types: text, image, audio, file, video, contact, link, location, poll.
  • Features message management: revoke, react, delete, edit, star, mark as read.
  • Includes group management: create, join, add/remove/promote/demote participants, list/approve/reject requests.
  • Offers auto-reply functionality and webhook support for incoming messages with HMAC-SHA256 signature.

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.

Health Check
Last commit

5 days ago

Responsiveness

Inactive

Pull Requests (30d)
30
Issues (30d)
25
Star History
1,373 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.