WhatsApp MCP Server

by msaelices

25 616 downloads Not rated yet MIT license
GitHub

About

WhatsApp MCP Server is a Python implementation that provides a Model Context Protocol (MCP) interface to interact with WhatsApp Business API through GreenAPI. It enables language models like Claude to send messages, manage groups, handle sessions, and retrieve chat history.

Details

License
MIT license

Explore

- Messaging: Send text messages to WhatsApp contacts
- Group Management: Create groups, list members, add/remove participants
- Session Handling: Manage WhatsApp API sessions
- Chat History: Retrieve chat lists and message history

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name WhatsApp MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository


This project uses environment variables for configuration:

- GREENAPI_ID_INSTANCE: Your GreenAPI ID instance
- GREENAPI_API_TOKEN: Your GreenAPI API token

You can either set these in your environment or use the provided .env file (see Installation instructions).

pip install -e .

cp .env-template .env

claude mcp list

json
"mcpServers": {
"whatsapp": {
"command": "python",
"args": ["-m", "whatsapp_mcp"]
}
}
```

pip install -e ".[dev]"

open_session

Open a new WhatsApp session

send_message

Send a message to a chat

get_chats

Get a list of chats

create_group

Create a new WhatsApp group

get_group_participants

Get the participants of a group

- open_session: Open a new WhatsApp session
- send_message: Send a message to a chat
- get_chats: Get a list of chats
- create_group: Create a new WhatsApp group
- get_group_participants: Get the participants of a group

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "whatsapp mcp server": {
            "whatsapp": {
                "command": "python",
                "args": [
                    "-m",
                    "whatsapp_mcp"
                ],
                "env": {
                    "GREENAPI_ID_INSTANCE": "",
                    "GREENAPI_API_TOKEN": ""
                }
            }
        }
    }
}

McpServers

{
    "whatsapp": {
        "command": "python",
        "args": [
            "-m",
            "whatsapp_mcp"
        ],
        "env": {
            "GREENAPI_ID_INSTANCE": "",
            "GREENAPI_API_TOKEN": ""
        }
    }
}

A server that provides a Model Context Protocol (MCP) interface to interact with WhatsApp Business API using FastMCP.

Introduction

WhatsApp MCP Server is a Python implementation that enables language models like Claude to interact with WhatsApp functionality through GreenAPI. It leverages FastMCP for improved performance, better developer experience, and a cleaner implementation.

Features

- Messaging: Send text messages to WhatsApp contacts
- Group Management: Create groups, list members, add/remove participants
- Session Handling: Manage WhatsApp API sessions
- Chat History: Retrieve chat lists and message history

WhatsApp API Client

This project uses the whatsapp-api-client-python library to interact with WhatsApp. The client provides access to the WhatsApp Cloud API, which requires a GreenAPI account to use.

Environment Variables

This project uses environment variables for configuration:

- GREENAPI_ID_INSTANCE: Your GreenAPI ID instance
- GREENAPI_API_TOKEN: Your GreenAPI API token

You can either set these in your environment or use the provided .env file (see Installation instructions).

Installation

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.

Videos about WhatsApp MCP Server

Relevant YouTube tutorials, setups, and demos