green-api-mcp-gateway
OfficialAllows AI agents to send and manage WhatsApp messages, groups, instances, and receive notifications through the GREEN-API WhatsApp gateway.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@green-api-mcp-gatewaySend 'Hello' to +15551234567 on WhatsApp"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
green-api-mcp-gateway
Support Links
Related MCP server: MCP WPPConnect Server
Guides & News
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.
What it does
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
Architecture
Clean Architecture (Ports & Adapters):
cmd/server/main.go — entry point, DI wiring
internal/
domain/ — business entities, errors, constants (zero dependencies)
application/ — ports (interfaces)
infrastructure/
auth.go — CredentialManager (in-memory credential store)
config/config.go — YAML + env configuration
greenapi/client.go — WhatsApp client via Go SDK
mcp/
server.go — MCP server (stdio/sse)
tools.go — MCP tools registration
resources.go — MCP resources
prompts.go — MCP prompts
webhook/
bridge.go — polling bridge
receiver.go — HTTP receiverBuild
go build -o green-api-mcp-gateway ./cmd/serverRequires Go 1.25+.
Transports & endpoints
The server supports four transports, selected via server.transport (or the GREEN_API_TRANSPORT env var):
Transport | Endpoints (relative to | Use case |
| stdin/stdout | Local CLIs (Claude Desktop, Cursor) launching the binary. |
|
| Legacy MCP clients (SSE only). |
|
| Streamable HTTP (MCP 2025-03-26+) — preferred for new clients. |
|
| 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 icon
When 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 exchange
Configuration
Via YAML
server:
transport: stdio # stdio | sse | http | hybrid
port: 8090
auth:
mode: config # config | proxy
cache_ttl: 300 # seconds (proxy mode only)
green_api:
instances:
- id: 1101000001
api_token: "YOUR_TOKEN"
api_url: "https://api.green-api.com"
webhook:
mode: polling
polling_timeout: 20
rate_limit:
requests_per_second: 10
burst: 20
logging:
level: info
format: textVia environment variables
Environment 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 tohttps://api.green-api.com)GREEN_API_TRANSPORT— transport:stdio,sse,http, orhybridGREEN_API_PORT— HTTP port (defaults to8090)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 toGREEN_API_BASE_URL, thenhttps://mcp.green-api.com)GREEN_API_AUTH_MODE—configorproxyGREEN_API_AUTH_CACHE_TTL— proxy-auth credential cache TTL (seconds)GREEN_API_WEBHOOK_MODE—pollingorreceiverLOG_LEVEL— log levelLOG_FORMAT—textorjson
Run
# With environment variables
export GREEN_API_INSTANCE_ID=1101000001
export GREEN_API_TOKEN=your_token
./green-api-mcp-gateway
# With a config file
./green-api-mcp-gateway --config config.yamlIntegration
Claude Desktop (local stdio)
Add to claude_desktop_config.json:
{
"mcpServers": {
"whatsapp": {
"command": "/path/to/green-api-mcp-gateway",
"args": ["--config", "/path/to/config.yaml"]
}
}
}OpenClaw
mcp:
servers:
- name: whatsapp
command: /path/to/green-api-mcp-gateway
args: ["--config", "/path/to/config.yaml"]Docker
docker build -t green-api-mcp-gateway .
docker run --rm -i \
-e GREEN_API_INSTANCE_ID=1101000001 \
-e GREEN_API_TOKEN=your_token \
green-api-mcp-gatewayMCP Tools
Messaging
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— delete
Instance
whatsapp_get_state— authorization statewhatsapp_get_settings— current settingswhatsapp_set_settings— update settingswhatsapp_get_qr— authorization QR codewhatsapp_connect— connect instancewhatsapp_disconnect— disconnect instance
Contacts
whatsapp_get_contacts— contact listwhatsapp_get_contact_info— contact informationwhatsapp_check_whatsapp— phone number check
Groups
whatsapp_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 group
Notifications
whatsapp_receive_notification— receive an incoming notification (long-poll)
Partner API
whatsapp_create_instance— create an instancewhatsapp_delete_instance— delete an instancewhatsapp_get_instances— list instances
MCP Resources
whatsapp://instance/{id}/state— instance statewhatsapp://instance/{id}/settings— instance settings
MCP Prompts
whatsapp_customer_support— template for customer supportwhatsapp_broadcast— template for broadcast messaging
Dependencies
mcp-go — MCP SDK
whatsapp-api-client-golang — GREEN-API Go SDK
Development
go test ./...
gofmt -w .
GOOS=linux GOARCH=amd64 go build -o green-api-mcp-gateway-linux ./cmd/serverLicense
MIT — see LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceEnables AI agents to interact with WhatsApp through a Model Context Protocol server, supporting sending text messages, contacts, links, and locations via standardized tools.Last updated6MIT
- Flicense-quality-maintenanceEnables WhatsApp automation through MCP protocol, allowing users to manage sessions, send messages, handle groups/communities, and access contacts through natural language interactions with AI agents.Last updated26
- Flicense-qualityDmaintenanceWhatsApp MCP server that exposes messaging, groups, contacts, and profile management as tools and resources for AI agents, supporting Baileys and Meta Cloud API.Last updated19
- AlicenseBqualityBmaintenanceEnables sending messages, images, documents and more on WhatsApp directly from any MCP-compatible AI, with tools for chat management, groups, and webhooks.Last updated371MIT
Related MCP Connectors
Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.
Phone, SMS & email for AI agents — one remote MCP endpoint, OAuth login, zero install.
Give AI agents real phone numbers, messages, and voice calls via MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/green-api/green-api-mcp-gateway'
If you have feedback or need assistance with the MCP directory API, please join our Discord server