whatsapp_add_group_participant
Add Group Participant
Add a participant to a WhatsApp group
group_idrequiredinstance_idrequiredparticipant_chat_idrequired
com.green-apiPublished by green-api.comOfficial publisherv0.1.2Updated Oct 26, 2026
MCP gateway for WhatsApp via Green API: messaging, contacts, groups and instance management.
Green API WhatsApp gateway that lets an assistant send and manage WhatsApp messages, contacts, groups and instances through a hosted endpoint.
Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.
Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.
Read https://sourceweft.com/mcp/com.green-api%2Fwhatsapp/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.Add this to your client's mcpServers config.
{
"mcpServers": {
"green-api-whatsapp": {
"type": "http",
"url": "https://mcp.green-api.com/mcp",
"headers": {
"X-Instance-Id": "<VALUE>",
"X-Api-Token": "<VALUE>"
}
}
}
}[License: MIT] [Go Version] [release] [Protocol: MCP] [Go Report Card]
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):
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.
Source: README.md at commit 23ceece
Add Group Participant
Add a participant to a WhatsApp group
group_idrequiredinstance_idrequiredparticipant_chat_idrequiredCheck WhatsApp Number
Check whether a phone number has a WhatsApp account
instance_idrequiredphone_numberrequiredConnect Instance
Connect a WhatsApp instance. Call this before using other tools. Validates credentials via getStateInstance.
api_urlapi_tokenrequiredinstance_idrequiredCreate Group
Create a WhatsApp group
chat_idsrequiredgroup_namerequiredinstance_idrequiredCreate Partner Instance
Create a new WhatsApp instance via the GREEN-API Partner API
partner_tokenrequiredDelete Partner Instance
Delete a WhatsApp instance via the GREEN-API Partner API
instance_idrequiredpartner_tokenrequiredDelete Message
Delete a message
chat_idrequiredid_messagerequiredinstance_idrequiredDelete Notification
Delete a notification from the queue (acknowledge receipt)
receipt_idrequiredinstance_idrequiredDisconnect Instance
Disconnect a WhatsApp instance and remove credentials from the session
instance_idrequiredEdit Message
Edit a previously sent message
chat_idrequiredmessagerequiredid_messagerequiredinstance_idrequiredForward Messages
Forward messages to another chat
chat_idrequiredmessagesrequiredinstance_idrequiredchat_id_fromrequiredGet Authorization Code
Get an authorization code for sign-in by phone number
instance_idrequiredphone_numberrequiredGet Chat History
Get chat message history. Use a small 'count' (default 50, max 100) to keep responses focused.
countchat_idrequiredinstance_idrequiredGet Contact Avatar
Get the avatar of a contact or group
chat_idrequiredinstance_idrequiredGet Contact Info
Get information about a contact or group
chat_idrequiredinstance_idrequiredGet Contacts
Get the contact list
instance_idrequiredGet Group Data
Get group data (members, name, invite link)
group_idrequiredinstance_idrequiredList Partner Instances
List all partner instances via the GREEN-API Partner API
partner_tokenrequiredGet Message
Get a message by ID
chat_idrequiredid_messagerequiredinstance_idrequiredGet QR Code
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.
instance_idrequiredGet Instance Settings
Get instance settings
instance_idrequiredGet Instance State
Get instance state (authorized, notAuthorized, blocked, sleepMode)
instance_idrequiredGet WhatsApp Account Settings
Get WhatsApp account settings (name, description, etc.)
instance_idrequiredGet Recent Incoming Messages
Get recent incoming messages from the last N minutes (default 60, max 1440 = 24 hours).
minutesinstance_idrequiredGet Recent Outgoing Messages
Get recent outgoing messages from the last N minutes (default 60, max 1440 = 24 hours).
minutesinstance_idrequiredLeave Group
Leave a WhatsApp group
group_idrequiredinstance_idrequiredLogout Instance
Log out the WhatsApp instance
instance_idrequiredMark Chat as Read
Mark chat messages as read
chat_idrequiredid_messageinstance_idrequiredReboot Instance
Reboot the WhatsApp instance
instance_idrequiredReceive Notification
Get one notification from the queue (manual polling)
instance_idrequiredDemote Group Admin
Revoke admin rights from a group member
group_idrequiredinstance_idrequiredparticipant_chat_idrequiredRemove Group Participant
Remove a participant from a WhatsApp group
group_idrequiredinstance_idrequiredparticipant_chat_idrequiredSend Contact
Send a contact card via WhatsApp
chat_idrequiredcompanylast_namefirst_nameinstance_idrequiredphone_numberrequiredSend File by URL
Send a file by URL
urlrequiredcaptionchat_idrequiredfile_nameinstance_idrequiredSend File
Send a file directly to a chat via multipart upload (no separate URL step)
captionchat_idrequiredfilenamerequiredfile_base64requiredinstance_idrequiredSend Location
Send a location
nameaddresschat_idrequiredlatituderequiredlongituderequiredinstance_idrequiredSend Message
Send a text message via WhatsApp
chat_idrequiredmessagerequiredinstance_idrequiredlink_previewquoted_message_idSend Poll
Send a poll via WhatsApp
chat_idrequiredmessagerequiredoptionsrequiredinstance_idrequiredmultiple_answersPromote Group Admin
Promote a group member to admin
group_idrequiredinstance_idrequiredparticipant_chat_idrequiredUpdate Instance Settings
Update instance settings (webhooks, proxy, etc.)
instance_idrequiredwebhook_urldelay_messagestate_webhookdevice_webhookincoming_webhookoutgoing_webhookwebhook_url_tokenstatus_instance_webhookmark_incoming_messages_readedUpload File
Upload a file to GREEN-API storage and return its URL. Use the returned URL with whatsapp_send_file.
filenamerequiredfile_base64requiredinstance_idrequired100% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
cmd/server/main.go — entry point, DI wiringinternal/ 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 receivergo build -o green-api-mcp-gateway ./cmd/serverserver: 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: text# With environment variablesexport GREEN_API_INSTANCE_ID=1101000001export GREEN_API_TOKEN=your_token./green-api-mcp-gateway
# With a config file./green-api-mcp-gateway --config config.yaml{ "mcpServers": { "whatsapp": { "command": "/path/to/green-api-mcp-gateway", "args": ["--config", "/path/to/config.yaml"] } }}mcp: servers: - name: whatsapp command: /path/to/green-api-mcp-gateway args: ["--config", "/path/to/config.yaml"]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-gatewaygo test ./...gofmt -w .GOOS=linux GOARCH=amd64 go build -o green-api-mcp-gateway-linux ./cmd/server