Connect WasenderAPI to AI agents and automation tools using the Model Context Protocol. This remote MCP server exposes WhatsApp session management, messaging, contacts, and groups as callable tools for Claude Code, OpenCode, n8n, and other MCP-compatible platforms. Requires a paid plan and Personal Access Token for authentication.
WasenderAPI MCP Integration Guide
Add the WasenderAPI MCP to your favorite tools (Claude Code/Desktop/CLI, OpenCode, or n8n) using your Personal Access Token.
MCP integration is only available on paid plans. This feature is not available on trial accounts.
Replace YOUR_PERSONAL_ACCESS_TOKEN with the token from your WasenderAPI account settings. Keep it secret.
Claude Code / Desktop / CLI
- Ensure the Claude CLI is installed and logged in.
- Register the MCP using your token:
claude mcp add --transport http wasenderapi https://wasenderapi.com/mcp \
--header "Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN"
- Verify it appears with
claude mcp listand start a new Claude Code session; the WasenderAPI tools will be available.
OpenCode
- Open your OpenCode config (defaults to
~/.config/opencode/config.json). - Paste the configuration snippet below under the
"mcp"key:
{
"mcp": {
"WasenderAPI": {
"type": "remote",
"url": "https://wasenderapi.com/mcp",
"enabled": true,
"headers": {
"Authorization": "Bearer YOUR_PERSONAL_ACCESS_TOKEN"
}
}
},
"$schema": "https://opencode.ai/config.json"
}
- Restart or reload OpenCode. The WasenderAPI MCP will show up as
WasenderAPI.
If you already have other MCP entries, just add the "WasenderAPI" block alongside them.
n8n (MCP Tool Node)
Requires n8n v2.0 or later. n8n ships an MCP Tool node that can call external MCP servers.
- Install/upgrade to n8n v2.0+ and enable the LangChain Tool MCP node (see n8n MCP docs).
- Create a new workflow and add the LangChain Tool MCP node.
- Configure MCP endpoint:
https://wasenderapi.com/mcp. - Add header
Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN. - Pick the desired tool (e.g., send-message, contacts, groups) and provide the arguments in JSON.
- Execute the node; n8n will call the MCP tool and return the response.
Ensure your WasenderAPI session is connected and the token is valid before running.
Available Tools (MCP)
The WasenderAPI MCP exposes the following tools for AI agents:
Sessions Management
- list_whatsapp_sessions โ Retrieve all WhatsApp sessions with pagination.
- get_specific_whatsapp_session โ Retrieve details of a specific session by ID.
- get_session_user โ Get information about the WhatsApp user associated with a session.
- create_whatsapp_session โ Create a new WhatsApp session.
- update_whatsapp_session โ Update a specific WhatsApp session.
- connect_whatsapp_session โ Start/connect a WhatsApp session (returns QR code if needed).
- disconnect_whatsapp_session โ Disconnect a WhatsApp session.
- get_message_logs โ Retrieve message logs for a specific session.
- get_session_logs โ Retrieve session logs for a specific session.
Messaging
- send_text_message โ Send a text message via a specified session.
- send_mention_text_message โ Send a text message with mentions.
- send_image_message โ Send an image message via WhatsApp.
- send_audio_message โ Send an audio message (voice note or audio file).
- send_video_message โ Send a video message via WhatsApp.
- send_document_message โ Send a document/file via WhatsApp.
- send_location_message โ Send a location message via WhatsApp.
- send_contact_message โ Send a contact card via WhatsApp.
- send_poll_message โ Send a poll via WhatsApp.
- send_presence_update โ Send a presence update (available, unavailable, composing, recording, paused).
- resend_message โ Resend a failed WhatsApp message.
- edit_message โ Edit an existing WhatsApp message.
- delete_message โ Delete a WhatsApp message.
- get_message_info โ Get information about a specific message (delivery status, read receipts).
Contacts
- list_contacts โ List all WhatsApp contacts for a specified session.
- add_or_edit_contact โ Add a new contact or edit an existing contact in WhatsApp.
- get_contact_info โ Get information about a specific WhatsApp contact.
- get_contact_picture โ Get the profile picture URL of a WhatsApp contact.
- block_contact โ Block a WhatsApp contact.
- unblock_contact โ Unblock a WhatsApp contact.
- check_jid_on_whatsapp โ Check if a phone number/JID exists on WhatsApp.
- get_lid_from_phone_number โ Get the LID (Linked Device ID) for a given phone number.
- get_phone_number_from_lid โ Get the phone number for a given LID.
- search_contacts โ Search for WhatsApp contacts by name or phone number.
Groups
- list_groups โ List all WhatsApp groups for a specified session.
- create_group โ Create a new WhatsApp group with specified name and participants.
- get_group_metadata โ Get metadata for a specific group (name, description, participants).
- get_group_participants โ Get participants of a specific WhatsApp group.
- add_group_participants โ Add participants to a WhatsApp group.
- remove_group_participants โ Remove participants from a WhatsApp group.
- update_group_participants โ Promote or demote participants in a WhatsApp group.
- update_group_settings โ Update settings for a WhatsApp group (subject, description, announce mode, etc.).
- leave_group โ Leave a WhatsApp group.
- generate_invite_link โ Generate an invite link for a WhatsApp group.
- accept_group_invite โ Accept a WhatsApp group invite by code.
- search_groups โ Search for WhatsApp groups by name.
Documentation
- get_api_documentation_tool โ Get API documentation. Returns index of all APIs if no ID provided, or detailed docs for a specific entry.
Code Examples
{
"mcp": {
"WasenderAPI": {
"type": "remote",
"url": "https://wasenderapi.com/mcp",
"enabled": true,
"headers": {
"Authorization": "Bearer YOUR_PERSONAL_ACCESS_TOKEN"
}
}
}
}