Overview
What is WhatsApp MCP Server?
A Model Context Protocol (MCP) server that provides a standardized interface for interacting with WhatsApp through the GreenAPI service. It enables session management, message sending, chat retrieval, group management, and file sharing via MCP protocol. Built for developers who want to integrate WhatsApp capabilities into AI agents or automation workflows.
How to use WhatsApp MCP Server?
Install Node.js (v14+), clone the repository, run npm install, and set two environment variables: GREENAPI_API_URL (GreenAPI base URL) and GREENAPI_API_TOKEN (your API token). Start with npm start; the server listens for MCP protocol messages over standard input/output. Use the provided tools (Open Session, Send Message, Get Chats, Create Group, Get Chat History, Send File, Add/Remove Participant) by calling them with the required parameters.
Key features of WhatsApp MCP Server
- WhatsApp session management via GreenAPI
- Standardized MCP protocol implementation
- Send text messages and files to chats
- Retrieve chat lists and message history
- Create and manage WhatsApp groups
- TypeScript support
Use cases of WhatsApp MCP Server
- Automating customer support replies through an AI assistant
- Sending bulk notifications or alerts to WhatsApp contacts
- Building a chat history archive for compliance or analysis
- Managing group membership programmatically (add/remove participants)
- Integrating WhatsApp messaging into existing MCP‑based AI workflows
FAQ from WhatsApp MCP Server
What are the prerequisites to run WhatsApp MCP Server?
Node.js (v14 or higher), npm or yarn, and a GreenAPI account with an API URL and token.
How do I configure the server?
Set the environment variables GREENAPI_API_URL and GREENAPI_API_TOKEN before starting the server.
What tools does the server provide?
It offers eight tools: Open Session, Send Message, Get Chats, Create Group, Get Chat History, Send File, Add Participant, and Remove Participant. Each requires a session ID from a previously opened session.
How can I see incoming messages in chat history?
Enable the "Receive webhooks on incoming messages and files" setting in the GreenAPI console or via the SetSettings method. Without it, chat history only shows outgoing messages.
Which transport does the server use?
It communicates via standard input/output (stdio) following the MCP protocol. Authentication is handled through the GreenAPI API token.