Skip to main content
Glama

🟱 WhatsApp MCP Server

WhatsApp MCP Server Banner

Un serveur MCP (Model Context Protocol) pour contrĂŽler WhatsApp Web via Puppeteer Stealth, permettant Ă  ton IA (Claude/Antigravity) de lire et envoyer des messages comme un humain.


📐 Architecture

whatsapp-server/
├── src/
│   ├── index.ts                      ← EntrĂ©e FastMCP, enregistre les outils
│   ├── services/
│   │   └── whatsappService.ts        ← Singleton : gùre browser/page/delays
│   └── tools/
│       ├── connectWhatsappTool.ts    ← Outil : se connecter à WhatsApp Web
│       ├── listChatsTool.ts          ← Outil : lister les discussions
│       ├── sendMessageTool.ts        ← Outil : envoyer un message
│       └── readMessageTool.ts        ← Outil : lire les messages
├── assets/                           ← Screenshots README
├── .gitignore                        ← Protùge session, .env, configs perso
├── eslint.config.js
├── tsconfig.json
└── package.json

Flow :

AI (Claude/Antigravity)
        │ tool calls (MCP stdio)
        ▌
whatsapp-mcp-server (FastMCP)
  ├── ConnectWhatsappTool
  ├── ListChatsTool
  ├── SendMessageTool
  └── ReadMessageTool
        │ shared singleton
        ▌
  WhatsappService
        │ puppeteer-extra + stealth plugin
        ▌
  Chrome (headless ou visible)
        │
        ▌
  https://web.whatsapp.com/

Related MCP server: WAHA MCP

⚙ Installation

1. Copier le dossier

cd "whatsapp-server"

2. Installer les dépendances

pnpm install

3. Compiler

pnpm run build

4. Ajouter dans mcp_config.json

"whatsapp-server": {
  "command": "node",
  "args": [
    "/chemin/vers/whatsapp-server/dist/index.js"
  ],
  "disabled": false
}

🚀 Utilisation

Étape 1 — Connexion (premiùre fois)

Demande Ă  l'IA :

"Connecte-toi Ă  WhatsApp en mode non headless"

L'outil connect_whatsapp ouvre Chrome et affiche le QR code :

QR Code WhatsApp Web

Sur ton téléphone :

  1. Ouvre WhatsApp

  2. Menu > Appareils connectés (Android) ou ParamÚtres > Appareils connectés (iPhone)

  3. Connecter un appareil

  4. Scanne le QR code

✅ La session est sauvegardĂ©e dans ./whatsapp_session/ — pas besoin de rescanner.


Étape 2 — Lister les discussions

Demande Ă  l'IA :

"Liste mes conversations WhatsApp"

Chats liste


Étape 3 — Envoyer un message

Demande Ă  l'IA :

"Envoie 'Bonjour !' Ă  [Nom du contact] sur WhatsApp"

Message envoyé


Étape 4 — Lire les messages

Demande Ă  l'IA :

"Lis les derniers messages de [Nom du contact] sur WhatsApp"

L'outil read_messages extrait l'historique récent avec l'expéditeur et l'horodatage.


đŸ›Ąïž Anti-Ban — Comportement Humain

Protection

Détail

Puppeteer Stealth

Masque les empreintes Puppeteer (navigator.webdriver, etc.)

Délais aléatoires

300ms–5000ms entre chaque action

Frappe humaine

100–300ms par touche pour la recherche

Session persistante

whatsapp_session/ évite les reconnexions fréquentes

User Agent réaliste

Chrome 120 / Windows 10 64-bit

Auto-dismiss dialog

Clique automatiquement sur "Utiliser ici" si détecté

Reconnexion propre

Ferme l'ancien browser avant d'en ouvrir un nouveau


🔧 Outils MCP disponibles

connect_whatsapp

Lance le navigateur et ouvre WhatsApp Web.

ParamĂštre

Type

Défaut

Description

headless

boolean

false

Mode invisible. Mettre false pour scanner le QR code.

list_chats

Liste les discussions récentes.

ParamĂštre

Type

Défaut

Description

limit

number

10

Nombre max de chats Ă  retourner.

send_message

Envoie un message Ă  un contact ou groupe.

ParamĂštre

Type

Requis

Description

chatName

string

✅

Nom exact du contact ou groupe.

message

string

✅

Contenu du message Ă  envoyer.

read_messages

Lit les messages récents d'une discussion spécifique.

ParamĂštre

Type

Requis

Description

chatName

string

✅

Nom exact du contact ou groupe.

limit

number

10

Nombre de messages à récupérer (max visibles).


📋 Commandes

pnpm install      # Installer les dépendances
pnpm run build    # Compiler TypeScript → dist/
pnpm run dev      # Lancer en mode développement (tsx)
pnpm run lint     # Vérifier le code avec ESLint
pnpm run format   # Formater avec Prettier

⚠ Recommandations

  • Ne pas spammer : laisser des dĂ©lais naturels entre les usages.

  • Session warmup : aprĂšs le premier QR scan, ouvre 2-3 discussions manuellement avant de fermer Chrome.

  • Headless=false pour le premier scan. Ensuite true est possible pour les relances.

  • 1 compte = 1 session : ne pas utiliser le mĂȘme numĂ©ro sur plusieurs instances simultanĂ©es.


🔒 SĂ©curitĂ© — Ce qui est protĂ©gĂ© par .gitignore

Dossier/Fichier

Raison

whatsapp_session/

Cookies et tokens de session WhatsApp

.env

Variables sensibles (clés API, numéros de téléphone)

mcp_config.json

Chemins locaux et configs privées

dist/

Build gĂ©nĂ©rĂ© — reconstruit avec pnpm build

node_modules/

DĂ©pendances — reconstruit avec pnpm install


DĂ©veloppĂ© par Deamon — Architecture calquĂ©e sur le serveur SMS/VoIP.ms MCP

Available Tools

3 tools
connect_whatsappA

Launch browser and connect to WhatsApp Web. Use this to login or verify if you are already logged in.

ParametersJSON Schema
NameRequiredDescriptionDefault
headlessNoRun browser in headless mode. Set to false to scan QR code initially.

TDQS

A4.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses key behavioral traits: launching a browser, connecting to WhatsApp Web, and the login/verification functionality. However, it lacks details on error handling, timeouts, authentication persistence, or what 'verify' entails. For a tool with no annotations, this is adequate but leaves gaps in operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core action ('Launch browser and connect to WhatsApp Web'), followed by usage guidance. Every word earns its place, with no redundancy or fluff. It efficiently communicates essential information without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (browser automation with login/verification), no annotations, and no output schema, the description is minimally complete. It covers the purpose and usage but lacks details on behavioral outcomes, error conditions, or what success/failure looks like. For a tool with this functionality, more context would be beneficial, but it meets basic requirements.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already documents the single parameter 'headless' with its type, default, and description. The description adds no parameter-specific information beyond what's in the schema. With 0 parameters requiring semantic explanation from the description, a baseline of 4 is appropriate as the schema suffices.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('Launch browser', 'connect to WhatsApp Web') and resources ('browser', 'WhatsApp Web'), and distinguishes it from siblings by focusing on connection/login rather than chat listing or messaging. It explicitly mentions the dual use case of 'login or verify if you are already logged in', making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool: 'Use this to login or verify if you are already logged in.' It distinguishes from sibling tools (list_chats, send_message) by implying this is a prerequisite step for accessing WhatsApp functionality, though it doesn't explicitly name alternatives. The guidance is clear and actionable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_chatsC

List recent chats from WhatsApp Web.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of chats to return.

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool lists chats but doesn't explain key behaviors: whether this is a read-only operation, what data is returned (e.g., chat metadata, messages), how 'recent' is defined, or if there are rate limits. This is inadequate for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core purpose without any wasted words. It's appropriately sized for a simple list operation and is front-loaded with the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., chat objects, IDs, timestamps), nor does it cover behavioral aspects like error conditions or dependencies. For a tool with no structured metadata, more descriptive context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'limit' parameter clearly documented. The description adds no additional parameter information beyond what the schema provides, so it meets the baseline score of 3 where the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List') and resource ('recent chats from WhatsApp Web'), making the purpose immediately understandable. However, it doesn't differentiate from potential sibling tools like 'connect_whatsapp' or 'send_message', which serve completely different functions, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., whether WhatsApp Web must be connected first), nor does it specify what 'recent' means in terms of timeframe or ordering. This leaves the agent with insufficient context for optimal tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

send_messageB

Select a chat by its exact name and send a message.

ParametersJSON Schema
NameRequiredDescriptionDefault
chatNameYesExact name of the chat or contact.
messageYesMessage content to send.

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions the need for an 'exact name', which adds some behavioral context, but fails to disclose critical traits such as authentication requirements, potential rate limits, error handling, or what happens if the chat doesn't exist. This leaves significant gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's action and key requirement ('exact name'). It is front-loaded with no wasted words, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity as a mutation operation with no annotations and no output schema, the description is incomplete. It lacks information on behavioral aspects like permissions, side effects, or response format, which are crucial for effective use by an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters ('chatName' and 'message') with clear descriptions. The description adds minimal value by reinforcing the 'exact name' requirement, but doesn't provide additional syntax or format details beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('send') and resource ('message'), and identifies the target ('chat by its exact name'). It doesn't explicitly differentiate from siblings like 'connect_whatsapp' or 'list_chats', but the action is distinct enough to imply differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by specifying 'Select a chat by its exact name', suggesting it's for sending messages to known chats. However, it doesn't provide explicit guidance on when to use this tool versus alternatives like 'list_chats' for finding chats or 'connect_whatsapp' for setup, leaving some ambiguity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv1.0.0
    • First observedconnect_whatsapp
    • First observedlist_chats
    • First observedsend_message

TDQS

B3.4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: connect_whatsapp handles authentication, list_chats retrieves chat data, and send_message sends messages. There is no overlap in functionality, making it easy for an agent to select the right tool without confusion.

Naming Consistency5/5

All tool names follow a consistent snake_case pattern with a verb_noun structure (connect_whatsapp, list_chats, send_message). This predictability enhances readability and usability for agents.

Tool Count3/5

With only 3 tools, the server feels thin for a WhatsApp integration, lacking operations like reading messages, managing contacts, or handling media. While the tools cover basic actions, the scope is limited and may require workarounds for common use cases.

Completeness2/5

The toolset is significantly incomplete for a WhatsApp server. It misses essential CRUD operations such as reading messages, updating chats, deleting messages, and handling media files. Agents will likely fail when trying to perform common WhatsApp tasks beyond the basics provided.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    An MCP (Multi-Agent Conversation Protocol) Server that enables interaction with the WhatsApp Business API, allowing agents to send messages, manage media, and perform other WhatsApp business operations through natural language.
    1
    -
  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    A self-hosted MCP server that connects AI clients to WhatsApp via the WAHA HTTP API. It enables users to manage sessions, search contacts, and send or receive messages and media directly through natural language interfaces.
    23
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server that connects AI agents to WhatsApp using the multi-device API, enabling messaging, group management, and more as a regular user.
    16
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    A native MCP server for SocialMate that gives your AI a WhatsApp, enabling it to send and read messages, manage contacts and groups, and more through 44 tools.
    17
    1
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DeamonDev888/Whatsapp-MCPserver'

If you have feedback or need assistance with the MCP directory API, please join our Discord server