MCP gateway for WhatsApp via Green API: messaging, contacts, groups and instance management.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
MCP gateway for GREEN-API WhatsApp. Lets AI agents (Claude Desktop, OpenClaw, Cursor, and others) send messages, manage instances, and receive notifications via WhatsApp using the Model Context Protocol.
Send text messages, files by URL, locations, contacts, polls. Forward and edit messages. Manage groups (create, fetch data, add/remove participants). Check phone numbers for WhatsApp, fetch contacts and their info. Get instance state and settings, QR code for authorization. Receive incoming notifications via polling or an HTTP receiver. Partner API for creating/deleting instances. Multi-instance support in a single gateway. Prompt templates for common scenarios (customer support, broadcasts). Prometheus metrics and OpenTelemetry.
Instructions for connecting the MCP server can be found on our website
Clean Architecture (Ports & Adapters):
Requires Go 1.25+.
The server supports four transports, selected via server.transport (or the GREEN_API_TRANSPORT env var):
| Transport | Endpoints (relative to host:port) | Use case |
|---|---|---|
stdio | stdin/stdout | Local CLIs (Claude Desktop, Cursor) launching the binary. |
sse | GET / (stream) + POST /message | Legacy MCP clients (SSE only). |
http | POST/GET /mcp | Streamable HTTP (MCP 2025-03-26+) β preferred for new clients. |
hybrid | /sse + /message and /mcp on one port | Public server: serves both legacy SSE and Streamable HTTP. |
All HTTP-based transports also expose:
GET /health, GET /healthz β health probes (no auth)GET /favicon.ico, GET /favicon.png β GREEN-API iconWhen auth.mode: proxy is enabled, the OAuth 2.0 PKCE endpoints are added too:
GET /.well-known/oauth-authorization-server β RFC 8414 metadataGET /.well-known/oauth-protected-resource β RFC 9728 metadataGET /authorize β browser-facing authorization formPOST /token β token exchangeEnvironment variables take precedence over the YAML config:
The variables below cover both deployment modes. Credentials variables (GREEN_API_INSTANCE_ID, GREEN_API_TOKEN, GREEN_API_URL) apply only to local stdio runs with auth.mode: config. For HTTP transports (sse on /sse + /message, http on /mcp, or hybrid) use auth.mode: proxy instead β credentials arrive in HTTP headers or via the built-in OAuth flow and the env credentials are ignored.
GREEN_API_INSTANCE_ID β instance IDGREEN_API_TOKEN β API tokenGREEN_API_URL β API base URL (defaults to https://api.green-api.com)GREEN_API_TRANSPORT β transport: stdio, sse, http, or hybridGREEN_API_PORT β HTTP port (defaults to 8090)GREEN_API_BASE_URL β public base URL (used for OAuth issuer/redirects, e.g. https://mcp.example.com)GREEN_API_WIDGET_DOMAIN β unique widget origin for ChatGPT Apps submission metadata (defaults to GREEN_API_BASE_URL, then https://mcp.green-api.com)GREEN_API_AUTH_MODE β config or proxyGREEN_API_AUTH_CACHE_TTL β proxy-auth credential cache TTL (seconds)GREEN_API_WEBHOOK_MODE β polling or receiverLOG_LEVEL β log levelLOG_FORMAT β text or jsonAdd to claude_desktop_config.json:
whatsapp_send_message β text messagewhatsapp_send_file β file by URLwhatsapp_send_location β locationwhatsapp_send_contact β contact (vCard)whatsapp_send_poll β pollwhatsapp_forward_messages β forwardwhatsapp_edit_message β editwhatsapp_delete_message β deletewhatsapp_get_state β authorization statewhatsapp_get_settings β current settingswhatsapp_set_settings β update settingswhatsapp_get_qr β authorization QR codewhatsapp_connect β connect instancewhatsapp_disconnect β disconnect instancewhatsapp_get_contacts β contact listwhatsapp_get_contact_info β contact informationwhatsapp_check_whatsapp β phone number checkwhatsapp_create_group β create a groupwhatsapp_get_group_data β group datawhatsapp_add_group_participant β add a participantwhatsapp_remove_group_participant β remove a participantwhatsapp_leave_group β leave a groupwhatsapp_receive_notification β receive an incoming notification (long-poll)whatsapp_create_instance β create an instancewhatsapp_delete_instance β delete an instancewhatsapp_get_instances β list instanceswhatsapp://instance/{id}/state β instance statewhatsapp://instance/{id}/settings β instance settingswhatsapp_customer_support β template for customer supportwhatsapp_broadcast β template for broadcast messagingMIT β see LICENSE.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/green-api-whatsapp)<a href="https://allmcps.com/mcp/green-api-whatsapp"><img src="https://allmcps.com/api/badge/green-api-whatsapp?style=directory" alt="Green API WhatsApp on AllMCPs" /></a>