# Green API WhatsApp [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/green-api/green-api-mcp-gateway  
**GitHub Stars:** 1  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/green-api-whatsapp

## Description
MCP gateway for WhatsApp via Green API: messaging, contacts, groups and instance management.

## Tools
Capabilities this server exposes over MCP:

- **whatsapp_add_group_participant** — Add a participant to a WhatsApp group
- **whatsapp_check_whatsapp** — Check whether a phone number has a WhatsApp account
- **whatsapp_connect** — Connect a WhatsApp instance. Call this before using other tools. Validates credentials via getStateInstance.
- **whatsapp_create_group** — Create a WhatsApp group
- **whatsapp_create_instance** — Create a new WhatsApp instance via the GREEN-API Partner API
- **whatsapp_delete_instance** — Delete a WhatsApp instance via the GREEN-API Partner API
- **whatsapp_delete_message** — Delete a message
- **whatsapp_delete_notification** — Delete a notification from the queue (acknowledge receipt)
- **whatsapp_disconnect** — Disconnect a WhatsApp instance and remove credentials from the session
- **whatsapp_edit_message** — Edit a previously sent message
- **whatsapp_forward_messages** — Forward messages to another chat
- **whatsapp_get_authorization_code** — Get an authorization code for sign-in by phone number
- **whatsapp_get_chat_history** — Get chat message history. Use a small 'count' (default 50, max 100) to keep responses focused.
- **whatsapp_get_contact_avatar** — Get the avatar of a contact or group
- **whatsapp_get_contact_info** — Get information about a contact or group
- **whatsapp_get_contacts** — Get the contact list
- **whatsapp_get_group_data** — Get group data (members, name, invite link)
- **whatsapp_get_instances** — List all partner instances via the GREEN-API Partner API
- **whatsapp_get_message** — Get a message by ID
- **whatsapp_get_qr** — Get the QR code for instance authorization. The result contains the QR as an image and a qrLink URL to an official GREEN-API page with a full-size auto-refreshing QR code. Always include the qrLink in your response as a clickable markdown link so the user can open it in the browser and scan comfortably.
- **whatsapp_get_settings** — Get instance settings
- **whatsapp_get_state** — Get instance state (authorized, notAuthorized, blocked, sleepMode)
- **whatsapp_get_wa_settings** — Get WhatsApp account settings (name, description, etc.)
- **whatsapp_last_incoming_messages** — Get recent incoming messages from the last N minutes (default 60, max 1440 = 24 hours).
- **whatsapp_last_outgoing_messages** — Get recent outgoing messages from the last N minutes (default 60, max 1440 = 24 hours).
- **whatsapp_leave_group** — Leave a WhatsApp group
- **whatsapp_logout** — Log out the WhatsApp instance
- **whatsapp_read_chat** — Mark chat messages as read
- **whatsapp_reboot** — Reboot the WhatsApp instance
- **whatsapp_receive_notification** — Get one notification from the queue (manual polling)
- **whatsapp_remove_group_admin** — Revoke admin rights from a group member
- **whatsapp_remove_group_participant** — Remove a participant from a WhatsApp group
- **whatsapp_send_contact** — Send a contact card via WhatsApp
- **whatsapp_send_file** — Send a file by URL
- **whatsapp_send_file_by_upload** — Send a file directly to a chat via multipart upload (no separate URL step)
- **whatsapp_send_location** — Send a location
- **whatsapp_send_message** — Send a text message via WhatsApp
- **whatsapp_send_poll** — Send a poll via WhatsApp
- **whatsapp_set_group_admin** — Promote a group member to admin
- **whatsapp_set_settings** — Update instance settings (webhooks, proxy, etc.)
- **whatsapp_upload_file** — Upload a file to GREEN-API storage and return its URL. Use the returned URL with whatsapp_send_file.

## Claude Desktop Quick Installation
Remote MCP endpoint (confidence: high). Install path detected from listing signals. Add as a URL/SSE server in your client:

```json
"mcpServers": {
  "green-api-whatsapp": {
    "url": "https://mcp.green-api.com/mcp"
  }
}
```

## Documentation

## What the Green API WhatsApp MCP server does

The Green API WhatsApp MCP server connects MCP-compatible AI clients to WhatsApp through Green API. It exposes tools for sending and managing messages, checking contacts, administering groups, handling authorization, and managing Green API instances.

Messaging tools cover text, files supplied by URL, locations, vCards, polls, forwarding, editing, and deletion. Contact tools retrieve the contact list, return information for a contact, and check whether a phone number is registered with WhatsApp. Group tools create groups, retrieve group data, add or remove participants, and leave a group.

Instance operations include reading authorization state, retrieving or changing settings, obtaining an authorization QR code, and connecting or disconnecting an instance. The gateway also supports receiving incoming notifications through long polling or an HTTP receiver. A single gateway can be configured for multiple instances.

## How it works

The gateway is implemented in Go and communicates with Green API through its Go SDK. MCP tools are registered by the gateway and made available over one of four transport modes:

- `stdio` reads and writes through standard input and output for local clients.
- `sse` provides a stream at `/` and accepts messages at `/message`.
- `http` exposes Streamable HTTP through `/mcp`.
- `hybrid` serves both the SSE endpoints and `/mcp` on the same port.

HTTP deployments also provide unauthenticated health endpoints at `/health` and `/healthz`. Proxy authentication can add OAuth 2.0 PKCE metadata, authorization, and token endpoints. Incoming notifications can use polling or the receiver mode, selected in configuration.

## Setup and configuration

Build the binary with Go 1.25 or newer using `go build -o green-api-mcp-gateway ./cmd/server`. Run it with a YAML configuration file or environment variables. For a local stdio setup using configuration-based authentication, provide a Green API instance ID and API token; the API URL defaults to `https://api.green-api.com`.

The main settings select the transport, HTTP port, authentication mode, notification mode, logging format and level, polling timeout, rate limits, and one or more Green API instances. Environment variables override YAML values. HTTP transports should use proxy authentication, where credentials arrive through HTTP headers or the built-in OAuth flow rather than the local credential variables.

## Tools and capabilities

The Green API WhatsApp MCP server exposes these tool groups:

- Messaging: send text, files, locations, contacts, and polls; forward, edit, or delete messages.
- Instance management: inspect state and settings, update settings, retrieve a QR code, and connect or disconnect.
- Contacts: list contacts, inspect contact information, and check WhatsApp registration.
- Groups: create groups, inspect group data, manage participants, and leave groups.
- Notifications: receive incoming notifications through long polling.
- Instance administration: create, delete, and list instances.

The repository also describes prompt templates for customer support and broadcasts, plus Prometheus metrics and OpenTelemetry.

## Limitations and notes

The gateway requires Green API credentials and an authorized WhatsApp instance for account operations. Credential environment variables apply to local stdio runs with `auth.mode: config`; they are ignored for HTTP transports using proxy authentication. Notification delivery depends on the selected polling or receiver setup, and HTTP deployments must expose the configured port and public base URL when proxy authentication is used.

_Full upstream README: https://allmcps.com/mcp/green-api-whatsapp/readme_

