Skip to content

GREEN-API MCP Server Supported Methods#

Learn how to use GREEN-API methods in your AI assistant

After installing and configuring GREEN-API MCP, you can use the AI assistant to: manage instances, send messages and files, receive messages and files, work with logs, contacts, groups, and much more.

Use WhatsApp methods in your AI to solve complex tasks. All tools interact with each other easily and logically, delivering the required results. Using queries, you can easily manage communication in the WhatsApp messenger.

List of MCP Methods#

Connection and Authorization#

whatsapp_connect

The method is used to connect a GREEN-API instance. Call to connect to another instance.
instance_id, api_token
Example requests:
- "Connect to instance 1234567890 with token abc123"
- "Log in to WhatsApp via GREEN-API"

whatsapp_get_qr

The method is used to return a QR code for instance authorization. For start scan it in WhatsApp.
instance_id
Example requests:
- "Show the QR code for login"
- "I need to link a WhatsApp account"

whatsapp_get_authorization_code

The method is used to request an authorization code for phone number login (alternative to QR).
phone_number, instance_id
Example requests:
- "Authorize the instance with number +79001234567"

whatsapp_disconnect

The method is used to disconnect the instance and removes saved credentials from the session.
instance_id
Example requests:
- "Disconnect from GREEN-API"

whatsapp_logout

The method is used to log out of the WhatsApp account on the instance (unlinks the phone).
instance_id
Example requests:
- "Log out of WhatsApp on the instance"

Instance Management#

whatsapp_get_state

The method is used to return the current state of the instance: authorized, notAuthorized, blocked, or sleepMode.
instance_id
Example requests:
- "Check if my instance is authorized"
- "What is the WhatsApp connection status?"

whatsapp_reboot

The method is used to restart the GREEN-API instance.
instance_id
Example requests:
- "Reboot the WhatsApp instance"

whatsapp_get_settings

The method is used to read the current instance settings (webhooks, delays, incoming message behavior).
Parameters: instance_id
Example requests:
- "Show my instance settings"

whatsapp_set_settings

The method is used to update instance settings: webhook URLs, send delay, automatic reading of incoming messages, and other parameters.
webhook_url, webhook_url_token, delay_message, incoming_webhook, outgoing_webhook, state_webhook, device_webhook, status_instance_webhook, mark_incoming_messages_readed, instance_id
Example requests:
- "Set the webhook to https://myserver.com/hook"
- "Enable automatic reading of incoming messages"

whatsapp_get_wa_settings

The method is used to retrieve WhatsApp account settings: display name, profile description, and other data.
instance_id
Example requests:
- "What profile name is set in WhatsApp?"

Sending Messages#

whatsapp_send_message

The method is used to send a text message to a personal chat or group. Supports quoting and link previews.
chat_id, message, quoted_message_id, link_preview, instance_id
Example requests:
- "Send 'Hello!' to +79001234567"
- "Write to group 120363XXX@g.us that the meeting has been rescheduled"

whatsapp_send_file

The method is used to send a file by URL (image, document, video). Supports a caption and file name.
chat_id, message, quoted_message_id, link_preview, instance_id
Example requests:
- "Send the PDF report from https://example.com/report.pdf"
- "Send a photo with the caption 'New Product'"

whatsapp_send_file_by_upload

Sends a file directly via base64 upload, without first publishing the file to a URL.
chat_id, instance_id, file_base64, filename, caption
Example requests:
- "Send this file directly from memory, without uploading it to the server."

whatsapp_send_contact

The method is used to send a contact card to a chat with first name, last name, company, and phone number.
chat_id, phone_number, first_name, last_name, company, instance_id
Example requests:
- "Share the contact of Ivan Petrov (+79009876543)"

whatsapp_send_location

The method is used to send a geolocation with coordinates, place name, and address.
chat_id, latitude, longitude, name, address, instance_id
Example requests: - "Send our courier the office geolocation"

whatsapp_send_poll

The method is used to create and send a poll with answer options. Supports multiple choice.
chat_id, message, options, multiple_answers, instance_id
Example requests:
- "Create a poll in the group: 'When is the meeting?' with options Mon, Tue, Wed"

Working with Messages#

whatsapp_get_message

The method is used to retrieve a message by its ID in the specified chat.
chat_id, id_message, instance_id
Example requests:
- "Find the message with ID BAE5F..."

whatsapp_edit_message

The method is used to edit a sent message, replacing its text.
chat_id, id_message, message, instance_id
Example requests:
- "Fix the typo in the last message"

whatsapp_delete_message

The method is used to delete a message from a chat by ID.
chat_id, id_message, instance_id
Example requests:
- "Delete message BAE5F... from the chat"

whatsapp_forward_messages

The method is used to gorward one or more messages from one chat to another.
chat_id, chat_id_from, messages, instance_id
Example requests:
- "Forward the last messages from the personal chat to the support group"

History and Monitoring#

whatsapp_get_chat_history

The method is used to load the chat message history. Returns the last 100 messages by default.
chat_id, count, instance_id
Example requests:
- "Show the last 50 messages from the chat with the client"
- "Display the message history with the group"

whatsapp_last_incoming_messages

The method is used to return the latest incoming messages for a specified period (default 24 hours).
minutes, instance_id
Example requests:
- "What have I been sent in the last 2 hours?"

whatsapp_last_outgoing_messages

The method is used to return the latest outgoing messages for a specified period (default 24 hours).
minutes, instance_id
Example requests:
- "What messages did I send today?"

whatsapp_read_chat

The method is used to mark messages in a chat as read. A specific message can be specified.
chat_id, id_message, instance_id
Example requests:
- "Mark all messages in the support chat as read"

Notification Queue#

whatsapp_receive_notification

The method is used to receive a single notification from the queue (manual polling mode). Used when webhooks are unavailable.
instance_id
Example requests:
- "Check if there are new events in the queue"

whatsapp_delete_notification

The method is used to acknowledge processing of a notification and removes it from the queue.
receipt_id, instance_id
Example requests:
- "Confirm receipt of notification with ID 1234"

Contacts#

whatsapp_check_whatsapp

Checks if a phone number is registered with WhatsApp.
instance_id, phone_number
Example requests:
- "Does the number +79001112233 have WhatsApp?"
- "Check the phone number list before sending"

whatsapp_get_contacts

The method is used to return a list of all instance contacts with their IDs and data. Displayed as an interactive UI.
instance_id
Example requests:
- "Show all my WhatsApp contacts"

whatsapp_get_contact_info

The method is used to return detailed information about a contact or group by Chat ID.
chat_id, instance_id
Example requests:
- "Show information about contact 79001234567@c.us"

whatsapp_get_contact_avatar

The method is used to return the avatar URL of a contact or group.
chat_id, instance_id
Example requests:
- "Load the client's profile photo"

Files#

whatsapp_upload_file

The method is used to upload a file to GREEN-API servers and returns a URL for subsequent sending via whatsapp_send_file
file_base64, filename, instance_id
Example requests:
- "Upload the file to the server to send it to multiple recipients."

Groups#

whatsapp_create_group

The method is used to create a new group with a given name and list of participants.
group_name, chat_id, instance_id
Example requests:
- "Create a group 'Project Team' with members +7900... and +7911..."

whatsapp_get_group_data

The method is used to return group data: name, list of participants, invite link.
group_id, instance_id
Example requests:
- "Show the members of group 120363XXX@g.us"

whatsapp_add_group_participant

The method is used to add a participant to a group by their Chat ID.
group_id, participant_chat_id, instance_id
Example requests:
- "Add the new employee to the work group"

whatsapp_remove_group_participant

The method is used to remove a participant from a group.
group_id, participant_chat_id, instance_id
Example requests:
- "Remove the user from the group"

whatsapp_set_group_admin

The method is used to grant a group participant administrator rights.
group_id, participant_chat_id, instance_id
Example requests:
- "Make Ivan an administrator of the group"

whatsapp_leave_group

The method is used to leave the specified group on behalf of the current instance.
group_id, instance_id
Example requests:
- "Leave group 120363XXX@g.us"

Partner API#

These methods are only available for partner instances.

To use them, you need to become a GREEN-API partner. Learn more about the partner program.

whatsapp_get_instances

The method is used to return a list of all partner instances via the Partner API.
partner_token
Example requests:
- "Show all my GREEN-API instances"

whatsapp_create_instance

The method is used to create a new instance via the Partner API.
partner_token
Example requests:
- "Create a new instance for our bot"

whatsapp_delete_instance

The method is used to delete the specified instance via the Partner API.
instance_id, partner_token
Example requests:
- "Delete instance 9876543210"

Rate Limiting#

The GREEN-API WhatsApp API has established rate limiting rules per second for each method. For more details on rate limiting, see the documentation page.