MCP Server: Connect WhatsApp to any AI

Use the MCP protocol to connect WhatsApp with any AI chat or agent like Claude, ChatGPT, OpenAI, Github Copilot, Cline and more

Wassenger’s MCP (acronym of Model Context Protocol) connector lets you connect your Wassenger WhatsApp numbers into modern AI LLMs and chat with your WhatsApp data, analyze conversation, send messages, or perform any other WhatsApp action directly from your favorite AI chat or code tool.

Note: Our MCP server is currently in beta. It’s perfect for testing and prototyping, but hold off on sending it to your production-critical systems πŸ˜‰

Introduction to MCP

MCP (Model Context Protocol) is a standardized way for AI applications to connect with external data sources and tools. Think of it as a universal translator that allows AI models to safely access and interact with various systems like databases, APIs, file systems, and other services.

MCP is becoming de-facto industry standard to connect AI LLMs like ChatGPT, Gemini or Claude to third-party apps and APIs in order to augment their its capabilities. MCP is also particularly useful when building AI Agents automations using no-code tools n8n, Zapier, Make, Flowise, Dify, and more.

MCP Server

Wassenger provides it cloud MCP server available to anyone with existing account and API key.

  • URL: https://api.wassenger.com/mcp

Authentication

Every call to the Wassenger MCP server requires your API key, sent in the Authorization HTTP header:

Authorization: Bearer {{apikey}}

The server also accepts the key in a bare Authorization, Token or Api-Key header, without the Bearer prefix.

⚠️ Never put your API key in the URL. The legacy ?key= and ?token= query parameters are still accepted so that older installs keep working, but they are deprecated: URLs end up in server access logs, proxy logs, error reports and browser history, so a key sent that way should be considered exposed. Configure every new client with the header, and rotate any key you have previously pasted into a URL.

Example prompts

Chat with your WhatsApp conversations from any AI clients or agentic tool integration.

Here are various prompts you can use with any AI assistant to interact with WhatsApp through the Wassenger MCP connector:

πŸ“± Basic Messaging & Communication

  • "Send a WhatsApp message to +1234567890 saying 'Hello! How are you today?'"
  • "Send a message to the contact named 'John Smith' with the text 'Meeting confirmed for 3 PM'"
  • "Send an urgent message to +44123456789: 'Please call me back ASAP'"
  • "Send a WhatsApp message with an image from [URL] to [phone-number]"
  • "Reply to message [message-id] in chat [chat-id] with 'Thanks for your feedback!'"

πŸ“Š Conversation Analysis & Insights

  • "Summarize my last 10 WhatsApp messages with +1555123456"
  • "Analyze the conversation tone in my chat with the Marketing Team group"
  • "Show me the key topics discussed in my conversation with Sarah over the past week"
  • "Count how many messages I've received today from all contacts"
  • "Search for messages containing 'invoice' in chat [chat-id]"
  • "Generate chat activity report grouped by day for this month"

πŸ‘₯ Group & Team Management

⚠️ Important: Groups and Channels management functionality is not available on WhatsApp Business API (WABA) numbers. It is only supported on WhatsApp Web linked numbers. Learn more about WABA Coexistence, WABA Migration, and WABA vs Web Comparison.
  • "Create a WhatsApp group called 'Team Updates' with participants +1234567890, +0987654321"
  • "How many participants are in the 'Project Team Alpha' WhatsApp group?"
  • "List all members of my 'Family Chat' group"
  • "Add +1234567890 to WhatsApp group [group-id]"
  • "Make +1234567890 an admin in group [group-id]"
  • "Get the invite link for group [group-id]"

⏰ Message Scheduling & Automation

  • "Schedule a message to +1234567890 saying 'Happy Birthday!' to be sent tomorrow at 9 AM"
  • "Set up a reminder message for the team group about the meeting next Friday at 2 PM"
  • "Set up auto-replies for messages received outside business hours (9 AM - 5 PM)"
  • "Create a workflow: when someone messages 'INFO', automatically send our company brochure"

πŸ” Contact & Device Management

  • "Check if the phone number +1555987654 is a valid WhatsApp number"
  • "What WhatsApp numbers do I have connected to Wassenger?"
  • "Show me the status of all my WhatsApp devices"
  • "Get the profile information for contact +1234567890"
  • "Show me all my recent contacts from the past month"

πŸ“ˆ Analytics & Reporting

  • "Generate a report of my most frequent WhatsApp contacts this month"
  • "Show me my busiest WhatsApp conversation days this week"
  • "Which agent responds fastest to customer inquiries?"
  • "Show me chat volume trends over the last 30 days"
  • "Count unread messages across all my chats"
  • "Find customers who haven't interacted in the last 60 days"

πŸ”” Status & Monitoring

  • "Check the delivery status of my last message to +1234567890"
  • "Show me all failed message deliveries from today"
  • "Monitor if my contact +1555123456 has read my recent messages"
  • "Post 'Working on exciting new features!' as my WhatsApp status"

πŸ”„ Bulk Operations & Campaigns

  • "Send the same announcement to all members of my 'Team Updates' group individually"
  • "Broadcast a holiday greeting to my top 10 most contacted numbers"
  • "Create a campaign called 'Welcome Series' to send 'Welcome to our service!' to multiple contacts"
  • "Start campaign [campaign-id] and check its delivery status"

🎯 Smart Business Automation

  • "Create a label called 'VIP Customer' with red color and apply it to important chats"
  • "Assign chat [chat-id] to agent [agent-id]"
  • "Show me all chats with the 'support' label"
  • "Analyze sentiment in customer support conversations and flag negative ones"
  • "Generate a CSV report of all chats with their last activity"
  • "Find all unread messages in my WhatsApp chats"

πŸ” Account & File Management

  • "Show me my current Wassenger account usage and limits"
  • "Upload an image from [image-url] to use in WhatsApp messages"
  • "List all uploaded files tagged as 'marketing'"
  • "Export all contacts from device [device-id] to JSON"

These prompts cover real-world scenarios for businesses using WhatsApp for customer service, marketing, team collaboration, and automation through the Wassenger platform.

MCP streaming usage

If your MCP client supports HTTP streaming (previously known as Server-Sent Events or SSE transport), you can connect directly to the Wassenger MCP server without installing this package. This is the preferred method as it's faster and requires no local setup.

Supported Clients

Most modern MCP clients support HTTP streaming, including:

Claude Desktop Configuration

claude_desktop_config.json only launches local (stdio) MCP servers, and the Settings β†’ Connectors β†’ Add custom connector dialog accepts a server URL plus optional OAuth client credentials β€” neither offers a field for a custom HTTP header. To reach a header-authenticated remote server, bridge it through mcp-remote, which forwards whatever headers you pass it:

{
  "mcpServers": {
    "wassenger": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://api.wassenger.com/mcp",
        "--header",
        "Authorization:${AUTH_HEADER}"
      ],
      "env": {
        "AUTH_HEADER": "Bearer {{apikey}}"
      }
    }
  }
}
Why is the header split across args and env? Claude Desktop on Windows (and Cursor) do not escape spaces inside args when they invoke npx, which mangles the header value. Keeping the space inside the env value sidesteps it. On macOS you can equally write "--header", "Authorization: Bearer {{apikey}}" in one piece.

Claude Code

To add the Wassenger MCP server to Claude Code, run the following command in your terminal:

claude mcp add --transport http wassenger https://api.wassenger.com/mcp --header "Authorization: Bearer {{apikey}}"

OpenCode

Add the following to your opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "wassenger": {
      "type": "remote",
      "url": "https://api.wassenger.com/mcp",
      "enabled": true,
      "headers": {
        "Authorization": "Bearer {{apikey}}"
      }
    }
  }
}

Gemini CLI

Add the server from your terminal:

gemini mcp add wassenger https://api.wassenger.com/mcp --transport http --header "Authorization: Bearer {{apikey}}"

Or declare it directly in your Gemini CLI settings.json. Note that streamable HTTP servers use httpUrl, not url:

{
  "mcpServers": {
    "wassenger": {
      "httpUrl": "https://api.wassenger.com/mcp",
      "headers": {
        "Authorization": "Bearer {{apikey}}"
      }
    }
  }
}

VS Code Copilot Configuration

Add this to .vscode/mcp.json in your workspace (or to your user-level mcp.json):

{
  "servers": {
    "wassenger": {
      "type": "http",
      "url": "https://api.wassenger.com/mcp",
      "headers": {
        "Authorization": "Bearer {{apikey}}"
      }
    }
  }
}

To keep the key out of a file you might commit, declare it as an input and let VS Code prompt for it once and store it in the OS keychain:

{
  "inputs": [
    {
      "type": "promptString",
      "id": "wassenger-api-key",
      "description": "Wassenger API key",
      "password": true
    }
  ],
  "servers": {
    "wassenger": {
      "type": "http",
      "url": "https://api.wassenger.com/mcp",
      "headers": {
        "Authorization": "Bearer ${input:wassenger-api-key}"
      }
    }
  }
}

Cursor

Add the server to ~/.cursor/mcp.json (or .cursor/mcp.json inside a project):

{
  "mcpServers": {
    "wassenger": {
      "url": "https://api.wassenger.com/mcp",
      "headers": {
        "Authorization": "Bearer {{apikey}}"
      }
    }
  }
}

Cursor interpolates environment variables in headers, so you can also keep the key out of the file entirely with "Authorization": "Bearer ${env:WASSENGER_API_KEY}".

Windsurf

Add the following to your ~/.codeium/windsurf/mcp_config.json. Remote servers use serverUrl, not url:

{
  "mcpServers": {
    "wassenger": {
      "serverUrl": "https://api.wassenger.com/mcp",
      "headers": {
        "Authorization": "Bearer {{apikey}}"
      }
    }
  }
}

Antigravity

Antigravity has no mcp add command β€” edit its MCP config file directly, either globally at ~/.gemini/config/mcp_config.json or per-workspace at .agents/mcp_config.json. Remote servers use serverUrl (url and httpUrl are not supported here):

{
  "mcpServers": {
    "wassenger": {
      "serverUrl": "https://api.wassenger.com/mcp",
      "headers": {
        "Authorization": "Bearer {{apikey}}"
      }
    }
  }
}

Inside the IDE you can open the same file from the agent panel's … menu β†’ MCP Servers β†’ Manage MCP Servers β†’ View raw config.

Continue.dev

Add the following to your ~/.continue/config.yaml. HTTP headers for streamable-http servers go under requestOptions:

mcpServers:
  - name: wassenger
    type: streamable-http
    url: https://api.wassenger.com/mcp
    requestOptions:
      headers:
        Authorization: Bearer {{apikey}}

Zed Editor

In Zed's settings.json, add the server under context_servers:

{
  "context_servers": {
    "wassenger": {
      "url": "https://api.wassenger.com/mcp",
      "headers": {
        "Authorization": "Bearer {{apikey}}"
      }
    }
  }
}

Aider

Aider has no native MCP support: its configuration reference exposes no MCP options and no --mcp flag, and the MCP pull requests opened against it were never merged. There is therefore no supported way β€” header-based or otherwise β€” to attach the Wassenger MCP server to Aider directly. Use a client that does support MCP (Claude Code, Cursor, VS Code, Gemini CLI, …) alongside Aider, or call our REST API from your own tooling.

Trae

Trae is a VS Code fork by ByteDance. You can use the same configuration as VS Code Copilot in the settings.

GitHub Copilot

GitHub Copilot supports MCP via the VS Code MCP extension. Follow the instructions in the VS Code Copilot Configuration section.

ChatGPT

For integration with ChatGPT, you can use the OpenAI Responses API which natively supports MCP tools. See the OpenAI API section for details and code examples.

Perplexity Pro

Perplexity Pro users can use the Wassenger MCP server through custom AI agents or by bridging the MCP server to tools that Perplexity can call via API.

Poe

Poe supports custom bots that can be integrated with MCP servers. You can use the Wassenger MCP URL as a base for your bot's tool definitions.

Codeium

Codeium's enterprise plans and advanced tools (like Windsurf) support MCP. For Windsurf, see the Windsurf Configuration section.

Benefits of HTTP Streaming

  • βœ… No local installation required
  • βœ… Faster connection times
  • βœ… Automatic updates - always uses the latest server version
  • βœ… Better reliability - no Node.js dependency
  • βœ… Simpler configuration - just a URL and an Authorization header

Usage as a tool in OpenAI

Here's how you can use the Wassenger MCP server as a tool with the OpenAI JavaScript client:

import OpenAI from 'openai';

const apiKey = process.env.WASSENGER_API_KEY || '{{apikey}}'

const openai = new OpenAI({
  apiKey: process.env.OPENAI_API_KEY,
});

// Example: Send a WhatsApp message using OpenAI's new Responses API with MCP
const response = await openai.responses.create({
  model: 'o4-mini',
  tools: [
    {
      type: 'mcp',
      server_label: 'wassenger',
      server_url: 'https://api.wassenger.com/mcp',
      // OpenAI sends this as `Authorization: Bearer <value>` to the MCP server
      authorization: apiKey,
      require_approval: 'never'
    }
  ],
  input: 'Send a WhatsApp message to +1234567890 saying "Hello from AI!"'
});

console.log('Response:', response);

Make sure to install the required dependencies:

npm install openai

And set your environment variables:

export OPENAI_API_KEY="your-openai-api-key"
export WASSENGER_API_KEY="{{apikey}}"

This approach uses OpenAI's new Responses API with MCP integration, which automatically handles tool discovery, execution, and communication with the Wassenger MCP server without requiring manual MCP client setup.

Python MCP Client

You can also use the Wassenger MCP server with Python using the mcp library:

Python with HTTP Streaming

The official Python SDK talks to our Streamable HTTP endpoint directly. Authentication headers are set on the underlying HTTP client:

import asyncio
import httpx2

from mcp import Client
from mcp.client.streamable_http import streamable_http_client

API_KEY = "{{apikey}}"

async def main():
  async with httpx2.AsyncClient(
    headers={"Authorization": f"Bearer {API_KEY}"},
    timeout=httpx2.Timeout(30.0, read=300.0),
  ) as http_client:
    transport = streamable_http_client(
      "https://api.wassenger.com/mcp",
      http_client=http_client,
    )
    async with Client(transport) as client:
      tools = await client.list_tools()
      print("Available tools:", [tool.name for tool in tools])

      result = await client.call_tool(
        "manage_whatsapp_messages",
        {
          "action": "text",
          "phone": "+1234567890",
          "message": "Hello from Python MCP client!",
        },
      )
      print("Message sent:", result)

asyncio.run(main())

Install dependencies:

pip install mcp

Installation & Usage

OpenAI API

OpenAI’s chat-completion endpoint natively supports remote MCP. Just point it at our Streamable HTTP URL:

resp = client.responses.create(
    model="gpt-4.1",
    tools=[{
        "type": "mcp",
        "server_label": "Wassenger",
        "server_url": "https://api.wassenger.com/mcp",
        # Sent to our server as `Authorization: Bearer <value>`
        "authorization": "{{apikey}}",
        "require_approval": "never",
    }],
    input="Send a WhatsApp message to number +1234567890 saying: Hello from the AI world!",
)

OpenAI discovers our tools automatically. Use allowed_tools to expose only a subset of them:

resp = client.responses.create(
    model="gpt-4.1",
    tools=[{
        "type": "mcp",
        "server_label": "Wassenger",
        "server_url": "https://api.wassenger.com/mcp",
        "authorization": "{{apikey}}",
        "require_approval": "never",
        "allowed_tools": ["manage_whatsapp_messages", "get_whatsapp_chats"],
    }],
    input="Send a WhatsApp message to number +1234567890 saying: Hello from the AI world!",
)

Anthropic API

Anthropic's Messages API can connect to remote MCP servers directly through its MCP connector (beta). Declare the server in mcp_servers β€” the API key goes in authorization_token, which Anthropic forwards as an Authorization: Bearer header β€” and enable its tools with an mcp_toolset:

resp = client.beta.messages.create(
    model="claude-opus-5",
    max_tokens=1024,
    messages=[{
        "role": "user",
        "content": "Send a WhatsApp message to number +1234567890 saying: Hello from the AI world!",
    }],
    mcp_servers=[{
        "type": "url",
        "url": "https://api.wassenger.com/mcp",
        "name": "wassenger",
        "authorization_token": "{{apikey}}",
    }],
    tools=[{
        "type": "mcp_toolset",
        "mcp_server_name": "wassenger",
    }],
    betas=["mcp-client-2025-11-20"],
)

Over raw HTTP the same request needs the anthropic-beta: mcp-client-2025-11-20 header. Anthropic runs the tool calls for you and returns mcp_tool_use / mcp_tool_result content blocks β€” you don't need to execute anything yourself.

To expose only some of our tools, disable them by default and allowlist the ones you want:

{
  "type": "mcp_toolset",
  "mcp_server_name": "wassenger",
  "default_config": { "enabled": false },
  "configs": {
    "manage_whatsapp_messages": { "enabled": true },
    "get_whatsapp_chats": { "enabled": true }
  }
}

Google Gemini API

Google Gemini treats MCP tools as function declarations. Declare your functions using the /tools endpoint, then include them in your function_declarations list. When the model invokes one, respond with:

{
  "role": "user",
  "parts": [
    {
      "functionResponse": {
        "name": "generate_report",
        "response": { /* your tool output */ }
      }
    }
  ]
}

Claude.ai (Web & Desktop)

  • Web: Claude's Settings β†’ Connectors β†’ Add custom connector dialog accepts a server URL and, under Advanced settings, an OAuth Client ID and Secret. It has no field for a custom HTTP header, so there is currently no way to hand it a static API key without putting the key in the URL β€” which we do not recommend. Use Claude Desktop or Claude Code instead until custom connectors support headers.

  • Desktop: bridge the server through mcp-remote so the key travels in a header. Edit claude_desktop_config.json:

{
  "mcpServers": {
    "wassenger": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://api.wassenger.com/mcp",
        "--header",
        "Authorization:${AUTH_HEADER}"
      ],
      "env": {
        "AUTH_HEADER": "Bearer {{apikey}}"
      }
    }
  }
}

And just like that, your favorite coding notebook can chat with WhatsApp through LLM magic.

MCP Tools Supported

The Wassenger MCP server provides comprehensive WhatsApp automation tools organized into functional categories. All tools use action-based parameters for LLM-friendly interactions:

πŸ“± Core Messaging & Communication

  • manage_whatsapp_messages - Universal message sending with 11 action types: text, media, location, contact, poll, event, scheduled, live, expiring, agent, and template messaging
  • manage_whatsapp_message_interactions - Message interactions: reply, forward, reaction, and poll voting
  • get_whatsapp_chat_messages - Comprehensive message retrieval: recent, search, date range, by sender, by type, by ID, advanced search, thread context, and media filtering
  • analyze_whatsapp_chat_messages - Message analytics: statistics, delivery status tracking, and data export in multiple formats

πŸ’¬ Chat & Conversation Management

  • get_whatsapp_chats - Universal chat retrieval with 9 actions: recent, unread, by status, assigned, by contact type, by ID, search, archived, and date range filtering
  • analyze_whatsapp_chats - Chat analytics and export with comprehensive statistics and data export capabilities
  • search_whatsapp_chats_by_name - Quick chat search by contact name, group name, or channel name

πŸ‘₯ Group & Team Management

  • manage_whatsapp_groups - Complete group operations: search, create, update, join, leave, invite management with 8 action types
  • manage_whatsapp_group_participants - Participant management: add, remove, promote, demote, approval workflow with 7 action types
  • manage_whatsapp_team - Team member management: search, create, update, delete, device access control with 7 action types
  • manage_whatsapp_departments - Department organization: list, create, update, delete with agent assignments and visual customization

πŸ“Ί Channel & Broadcasting

  • manage_whatsapp_channels - Channel lifecycle management: list, create, update, search, join, leave, image updates with 9 action types
  • manage_whatsapp_channel_messages - Channel message retrieval with filtering and pagination
  • manage_whatsapp_status - WhatsApp Status (Stories) management: get, publish, schedule with media support and advanced timing

πŸ”„ Campaign & Bulk Operations

  • manage_whatsapp_campaigns - Bulk messaging campaigns: search, create, update, start, stop, delete with 7 action types
  • manage_whatsapp_campaign_contacts - Campaign recipient management: search, add, remove contacts with filtering options
  • manage_whatsapp_queue - Message queue control: status monitoring, queue management, bulk deletion with 3 action types

πŸ“± Device & Account Management

  • get_whatsapp_devices - Device listing with advanced filtering: status, session, search, active/online filtering
  • get_whatsapp_device_details - Detailed device information: configuration, session status, metrics, and insights
  • health_check - Comprehensive system health check for MCP server and connected WhatsApp devices

πŸ‘€ Contact & Label Management

  • manage_whatsapp_contacts - Contact CRUD operations: list, get, create, update, delete, bulk operations, metadata management with 8 action types
  • manage_whatsapp_contact_actions - Contact blocking: block and unblock operations
  • manage_whatsapp_labels - Label management: list, create, update, delete with color-coded organization

πŸ“ File & Media Management

  • search_whatsapp_outbound_files - Uploaded file search with advanced filtering by type, size, date, tags, and metadata
  • search_whatsapp_chat_files - Received file search from WhatsApp chats with comprehensive filtering options

πŸ”§ System & Utilities

  • ping - Basic connectivity test with server status and response time measurement

MCP is evolving at light speedβ€”expect new transports, tighter integrations, and maybe even self-healing error handling in the next release. Stay tuned, and happy automating! πŸš€