maytapi-whatsapp

maytapi-whatsapp

3.5

The Maytapi WhatsApp MCP Server enables seamless integration with WhatsApp for message sending and receiving, session management, and account handling.

The Maytapi WhatsApp MCP Server is a robust solution designed to facilitate communication via WhatsApp. It allows users to send and receive both text and media messages in private chats. Additionally, it offers functionalities to retrieve session statuses and manage account-specific settings, such as product information and registered phone details.

Features

  • {'name': 'Message Operations', 'description': 'Send and receive text and media messages to specified WhatsApp numbers, and handle incoming messages via webhooks.'}
  • {'name': 'Session Management', 'description': 'Retrieve session status, control session actions like restart and backup, and manage session effectively.'}
  • {'name': 'Account Management', 'description': 'Manage phone details, configure webhooks, and set acknowledgment preferences for message delivery notifications.'}
  • {'name': 'Group Chat Operations', 'description': 'Create and manage group chats, ensuring seamless communication with acknowledgment settings.'}
  • {'name': 'Queue Management', 'description': 'Monitor and manage message queues to maintain optimal performance.'}

MCP Tools

  • Get Status: Retrieve the current session status.
  • Get QR Code: Obtain the current QR code for authentication.
  • Send Message: Dispatch text or media messages to specified contacts.
  • Add Phone: Register a new phone to the account.
  • Create Group: Manage acknowledgment settings for group chats.

Usage with Different Platforms

nodejs

javascript
const axios = require('axios');

async function sendMessage(phone, message) {
  try {
    const response = await axios.post('https://api.maytapi.com/api/send', {
      phone: phone,
      message: message
    });
    console.log('Message sent:', response.data);
  } catch (error) {
    console.error('Error sending message:', error);
  }
}

sendMessage('+1234567890', 'Hello from Maytapi!');

python

python
import requests

def send_message(phone, message):
    url = 'https://api.maytapi.com/api/send'
    payload = {'phone': phone, 'message': message}
    try:
        response = requests.post(url, json=payload)
        print('Message sent:', response.json())
    except requests.exceptions.RequestException as e:
        print('Error sending message:', e)

send_message('+1234567890', 'Hello from Maytapi!')