# Wati MCP MCP

> Wati connects your AI agent to WhatsApp Business API, giving you control over customer messaging and support campaigns. List contacts, check recent chat history, send free replies, or blast approved template messages—all through natural conversation. Manage your entire communication cycle without leaving your preferred AI client.

## Overview
- **Category:** talk-to-me
- **Price:** Free
- **Tags:** whatsapp-api, customer-engagement, template-messaging, crm-integration, chat-automation, business-messaging

## Description

Your AI agent handles the whole job of managing WhatsApp communications. You can instantly look up a customer's profile details, pull their full chat history to understand the context, and then send either a free-text reply or an official template message. This means you stop manually logging into the Wati dashboard just to reply to one thread. Instead, your agent becomes your dedicated WhatsApp communication hub.

If you're building automations that rely on secure API keys, know this: Vinkius handles all credential flow through a zero-trust proxy. Your actual Wati credentials pass in transit but are never stored on disk. This lets you build complex workflows—like using the agent to pull customer contact lists and then sending an automated template message—all while keeping your security airtight.

## Tools

### get_whatsapp_chat_history
Retrieves a user's recent message history using only their phone number.

### get_whatsapp_contact_details
Pulls the complete profile information for any specific WhatsApp contact by providing their phone number.

### list_broadcast_campaigns
Provides a status report on all past and current mass communication campaigns.

### list_whatsapp_contacts
Generates a full list of every WhatsApp contact stored in the Wati CRM.

### list_whatsapp_templates
Displays all approved and pending message templates available for sending out.

### send_session_message
Sends a standard, conversational text reply to a user immediately.

### send_template_message
Executes an official WhatsApp template message using a specific name and target number.

## Prompt Examples

**Prompt:** 
```
List all my WhatsApp contacts in Wati.
```

**Response:** 
```
I found 150 contacts. The most recent ones are 'John Doe' (+123456789), 'Jane Smith' (+987654321), and 'Robert Brown' (+112233445). Would you like the full profile details for any of them?
```

**Prompt:** 
```
Send the 'order_confirmation' template to +123456789.
```

**Response:** 
```
I've successfully sent the 'order_confirmation' template message to +123456789 via Wati. The message has been queued for delivery.
```

**Prompt:** 
```
What was my last conversation with +123456789 about?
```

**Response:** 
```
Retrieving history for +123456789… The last 3 messages were: 1. Customer: 'Is my package arriving today?' 2. You: 'Yes, it's out for delivery.' 3. Customer: 'Thanks!'. Would you like me to pull more history?
```

## Capabilities

### Retrieve Chat History
Get a record of recent messages exchanged with any specific user.

### Look Up Contact Details
Pull the full profile information for any known WhatsApp contact using just their phone number.

### Manage Marketing Campaigns
View and track the status of both active and past bulk broadcast campaigns.

### List User Roster
Get a quick overview of all customer phone numbers registered in your Wati CRM.

### Check Message Templates
See which outbound message templates are currently approved or waiting for approval within the system.

### Send Free-Text Messages
Reply to a user immediately using standard, conversational text messages.

### Execute Template Blasts
Send structured, pre-approved marketing or notification messages to specific users.

## Use Cases

### Handling complex customer complaints.
A user complains about an order. The agent first calls `get_whatsapp_chat_history` to review the last few messages, then uses the context it finds to send a detailed apology via `send_session_message`, ensuring nothing is missed.

### Launching a new product announcement.
Marketing needs to hit 500 people. The agent calls `list_whatsapp_contacts` for the full list, checks that the 'product_launch' template is ready via `list_whatsapp_templates`, and then executes `send_template_message`.

### Sales follow-up after a meeting.
A SDR has a contact number. They use `get_whatsapp_contact_details` to confirm the client's title, then send a tailored message using `send_template_message` with specific product details.

### Checking campaign performance.
The Marketing Manager wants an update on last week's blast. They instruct the agent to call `list_broadcast_campaigns`, getting a real-time status report without logging into any dashboard.

## Benefits

- Context is immediate. Instead of asking the user to repeat their issue, your agent first calls `get_whatsapp_chat_history` so you can reply with deep context using `send_session_message`.
- Stop guessing if a campaign will go out. Use `list_whatsapp_templates` to check the approval status before trying to run any broadcast blast via `send_template_message`.
- Never lose track of who you messaged. Quickly pull customer profiles using `get_whatsapp_contact_details` right inside your conversation flow, making follow-ups accurate.
- Streamline bulk outreach by first running `list_whatsapp_contacts` to get the full roster, then executing a campaign via `send_template_message` without leaving your AI client.
- Automate support triage. Your agent can check if a user exists using `get_whatsapp_contact_details`, and if they do, pull their history for context in one step.

## How It Works

The bottom line is you control WhatsApp messaging and data retrieval without opening any external dashboard.

1. Subscribe to the Wati MCP and provide your API URL and authentication token.
2. Connect this MCP to your preferred AI client (like Claude or Cursor).
3. Directly ask your agent to perform communication tasks, like 'Check the chat history for +123...' or 'Send a template message.' The tool handles the rest.

## Frequently Asked Questions

**How does I use the send_session_message tool?**
You ask your agent to reply with free text. It sends a standard, conversational message that doesn't require an official template name or code.

**What is the difference between listing contacts and getting contact details using list_whatsapp_contacts and get_whatsapp_contact_details?**
Listing contacts gives you a quick list of phone numbers. Getting contact details requires one specific number, but it pulls all the rich profile information attached to that person.

**Can I use Wati MCP for marketing campaigns?**
Yes. You can monitor campaign status with `list_broadcast_campaigns` and send structured blasts using `send_template_message` after checking template availability via `list_whatsapp_templates`.

**Does get_whatsapp_chat_history work for old conversations?**
It retrieves the *recent* message history. If a conversation happened months ago and is archived, it might not show up.

**How do I use the list_whatsapp_templates tool to see what messages I can send?**
The tool lists all approved and pending WhatsApp message templates. This lets you check if a specific template exists before trying to deploy it, saving time and ensuring compliance with WhatsApp rules.

**If I need to send an official broadcast, what is the role of list_broadcast_campaigns?**
This tool gives you visibility into both active and past WhatsApp broadcast campaigns. You can monitor delivery status and review campaign performance without manually checking the Wati dashboard.

**What information does get_whatsapp_contact_details provide beyond just a phone number?**
It retrieves the full profile details for a specific WhatsApp contact using their phone number. This is key for agents needing context, like understanding account status or associated names.

**Does send_template_message handle rate limits if I try to message too many people?**
The MCP manages the API calls through Wati's infrastructure. It handles the necessary communication flow and will report any specific rate limit errors or throttling issues encountered during the sending process.