whatsapp-mcp2

whatsapp-mcp2

5

WhatsApp Web MCP is a robust integration tool that allows AI models to interact with WhatsApp Web via the Model Context Protocol, providing automated and enhanced communication capabilities. Designed primarily for testing, it supports flexible deployment options and offers comprehensive WhatsApp functionalities through an MCP Server.

WhatsApp Web MCP

A powerful bridge between WhatsApp Web and AI models using the Model Context Protocol (MCP). This project enables AI models like Claude to interact with WhatsApp through a standardized interface, making it easy to automate and enhance WhatsApp interactions programmatically.

Overview

WhatsApp Web MCP provides a seamless integration between WhatsApp Web and AI models by:

  • Creating a standardized interface through the Model Context Protocol (MCP)
  • Offering MCP Server access to WhatsApp functionality
  • Providing flexible deployment options through SSE or Command modes
  • Supporting both direct WhatsApp client integration and API-based connectivity

Disclaimer

IMPORTANT: This tool is for testing purposes only and should not be used in production environments.

Usage

Running Modes

  • WhatsApp API Server: Exposes WhatsApp functionality through REST endpoints
  • MCP Server (Standalone): Directly connects to WhatsApp Web
  • MCP Server (API Client): Connects to the WhatsApp API server

Available Tools

  • Check WhatsApp client connection status
  • Send messages to WhatsApp contacts
  • Search for contacts and groups
  • Retrieve messages from chats and groups
  • Create new WhatsApp groups and manage participants

Upcoming Features

  • Create webhooks for incoming messages
  • Support media files
  • Group chat and contact management
  • Message templates
  • Enhanced error handling

Architecture

Components

  • WhatsAppService: Core business logic
  • WhatsAppApiClient: Client for WhatsApp API
  • API Router: Express routes for REST API
  • MCP Server: Model Context Protocol implementation

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push the branch
  5. Create a Pull Request

Dependencies

Uses whatsapp-web.js for JavaScript client library integration.