WhatsApp MCP Server logo

WhatsApp MCP Server

by piyushgupta53

A WhatsApp server implementation using the Model Context Protocol (MCP) SDK. This server provides a standardized interface for interacting with WhatsApp through the GreenAPI service.

View on GitHub

Last updated: N/A

What is WhatsApp MCP Server?

This is a WhatsApp server implementation that utilizes the Model Context Protocol (MCP) SDK to provide a standardized way to interact with WhatsApp through the GreenAPI service. It enables developers to build applications that can send and receive messages, manage sessions, and perform other WhatsApp-related actions programmatically.

How to use WhatsApp MCP Server?

To use this server, you need to clone the repository, install the dependencies using npm or yarn, configure the environment variables with your GreenAPI credentials, and then start the server using npm start. The server listens for MCP protocol messages through standard input/output. You can then use the available tools (Open Session, Send Message, Get Chats, etc.) by sending appropriately formatted messages to the server.

Key features of WhatsApp MCP Server

  • WhatsApp session management

  • Integration with GreenAPI service

  • Standardized MCP protocol implementation

  • TypeScript support

Use cases of WhatsApp MCP Server

  • Automated WhatsApp messaging

  • Building WhatsApp chatbots

  • Integrating WhatsApp with other applications

  • Sending notifications via WhatsApp

FAQ from WhatsApp MCP Server

What is the Model Context Protocol (MCP)?

MCP is a protocol used for standardizing communication between different systems.

What is GreenAPI?

GreenAPI is a service that provides an API for interacting with WhatsApp.

What are the required environment variables?

The required environment variables are GREENAPI_API_URL and GREENAPI_API_TOKEN.

How do I send a message?

Use the Send Message tool with the required parameters: sessionId, chatId, and message.

How do I receive incoming messages in chat history?

You need to enable the 'Receive webhooks on incoming messages and files' setting using the SetSettings method or through the GreenAPI console.