Connect Wati to Claude: Manage Contacts, Templates & Call Insights
Learn how to connect Wati to Claude via a managed MCP server to automate WhatsApp campaigns, manage contacts, and extract insights from call transcripts.
If you need to connect Wati to Claude to automate high-volume WhatsApp campaigns, manage customer contacts, or extract insights from call transcripts, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between Claude's function-calling capabilities and Wati's REST APIs. You can either build and maintain this integration layer in-house, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL. If your team uses ChatGPT, check out our guide on /connect-wati-to-chatgpt-automate-whatsapp-messaging-campaigns/ or explore our broader architectural overview on /connect-wati-to-ai-agents-orchestrate-sales-pipelines-support/.
Giving a Large Language Model (LLM) read and write access to a sprawling business messaging ecosystem like Wati is an engineering challenge. You must handle complex API token lifecycles, map massive JSON schemas to MCP tool definitions, and deal with Wati's domain-specific WhatsApp constraints. Every time Wati deprecates a legacy V1 endpoint in favor of V2, you have to update your custom server code, redeploy, and test the integration.
This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Wati, connect it natively to Claude Desktop, and execute complex messaging workflows using natural language.
The Engineering Reality of the Wati API
A custom MCP server is essentially a self-hosted integration layer. While the open MCP standard provides a predictable way for models like Claude to discover tools, the reality of implementing it against specialized B2B messaging APIs is painful. Wati operates on top of the WhatsApp Business API, meaning its endpoints reflect the strict rules and session constraints enforced by Meta.
If you decide to build a custom MCP server for Wati, you own the entire API lifecycle. Here are the specific integration challenges you will face:
Polymorphic Target Identifiers
Wati does not use a single ID format for routing messages. Depending on the endpoint, the recipient identifier (often called target) could be a UUID ContactId, a raw PhoneNumber, a BSUID, or a channel-specific string like Channel:PhoneNumber. If an LLM guesses the wrong format, the API call fails. A managed MCP server exposes schemas that automatically instruct the LLM on acceptable formats, and the underlying proxy API normalizes these inputs before sending them to Wati.
The 24-Hour Session Window
WhatsApp enforces a strict 24-hour customer service window. You can only send free-form text messages using endpoints like wati_conversations_send_session_message_v_1 if the user has messaged your business within the last 24 hours. Outside of that window, you are forced to use pre-approved Message Templates via endpoints like wati_message_templates_send. An LLM has no inherent concept of this state machine. Your tool descriptions must explicitly gate free-form messaging tools and route the LLM to template tools when sessions expire.
Fragmented API Versions
Wati is currently running concurrent versions of its APIs. For example, message templates span wati_message_templates_list_v_1 and wati_message_templates_list_v_2 (Beta). Chatbots use both legacy v_1 start endpoints and newer Pro plan endpoints. If you hand-code an MCP server, you are responsible for maintaining schema mappings for all of these variants and teaching the LLM which one to use based on the user's Wati tier.
Rate Limit Passthrough
When automating high-volume broadcast campaigns, you will inevitably hit Wati's API rate limits. Truto does not absorb, retry, or throttle rate limit errors on your behalf. When Wati returns an HTTP 429 Too Many Requests, Truto passes that error directly to the caller. However, Truto normalizes the upstream rate limit data into standardized IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). This means your Claude client or agent framework is responsible for reading these headers and executing standard exponential backoff.
Creating an MCP Server for Wati
Truto's MCP architecture turns any connected integration into a secure JSON-RPC 2.0 endpoint. Instead of hand-coding tool definitions, Truto derives them dynamically from the integration's documented API resources. A tool only appears in the MCP server if it has a corresponding documentation record - ensuring that Claude only sees curated, AI-ready operations.
You can generate an MCP server for your Wati integrated account using either the Truto UI or the Truto API.
Method 1: Via the Truto UI
For teams who want a zero-code setup, you can generate the MCP URL directly from the dashboard.
- Navigate to the Integrated Accounts page in Truto and select your connected Wati account.
- Click the MCP Servers tab.
- Click Create MCP Server.
- Configure the server settings (assign a name, set method filters like
readorwrite, apply tag filters, and optionally set an expiration date). - Click Save. Copy the generated MCP Server URL (e.g.,
https://api.truto.one/mcp/a1b2c3d4e5f6...).
Method 2: Via the API
For platform engineers looking to provision AI agent infrastructure programmatically, you can create an MCP server via a simple POST request. This is ideal for generating scoped, ephemeral access for specific automated jobs.
curl -X POST https://api.truto.one/integrated-account/{integrated_account_id}/mcp \
-H "Authorization: Bearer YOUR_TRUTO_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Wati Campaign Agent",
"config": {
"methods": ["read", "write", "custom"],
"tags": ["campaigns", "contacts"]
},
"expires_at": "2026-12-31T23:59:59Z"
}'The API securely hashes a random hex token, stores it in a distributed key-value store for ultra-fast validation, and returns the ready-to-use URL:
{
"id": "mcp-server-uuid",
"name": "Wati Campaign Agent",
"url": "https://api.truto.one/mcp/a1b2c3d4e5f6..."
}Connecting the Wati MCP Server to Claude
Once you have the Truto MCP URL, connecting it to Claude requires no custom proxy code. The URL itself encodes the cryptographic token that routes requests to the correct Wati tenant environment.
Method 1: Via the Claude UI
If you are using Claude's web interface or enterprise workspace (or ChatGPT's equivalent Custom Connectors):
- Open Claude and navigate to Settings -> Integrations (or Connectors).
- Click Add MCP Server or Add Custom Connector.
- Paste the Truto MCP URL.
- Click Add. Claude will immediately perform the protocol handshake, request
tools/list, and load all available Wati operations into its context window.
Method 2: Via the Claude Desktop Config File
For local development and testing with Claude Desktop, you can update your JSON configuration file to pipe the Truto remote MCP server into Claude using the standard Server-Sent Events (SSE) transport wrapper.
Locate your Claude config file:
- Mac:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add the Wati MCP server configuration:
{
"mcpServers": {
"wati-production": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"https://api.truto.one/mcp/a1b2c3d4e5f6..."
]
}
}
}Restart Claude Desktop. The Wati tools will now appear dynamically via the plug icon in the chat interface.
Wati MCP Hero Tools
Truto provides a comprehensive mapping of Wati's API, but exposing every endpoint can overwhelm an LLM's context window. Here are the 6 highest-leverage "hero tools" for automating Wati workflows via Claude.
list_all_wati_contacts
Retrieves paginated lists of contacts stored in the Wati CRM. The generated schema includes instructions on handling next_cursor values for proper pagination.
"Fetch the first 100 contacts from Wati. If there is a next_cursor in the response, use it to fetch the next page until you have found the contact named 'John Doe'."
get_single_wati_contact_by_id
Fetches a specific contact using Wati's polymorphic ID structure. The tool accepts ContactId, PhoneNumber, BSUID, or Channel:format and handles the upstream routing automatically.
"Retrieve the full Wati contact profile for the phone number +14155552671 and list their custom attributes."
wati_conversations_send_text
Sends a free-form text message to an active conversation. Claude must ensure the user has initiated contact within the last 24 hours for this operation to succeed.
"Send a text message to the BSUID 987654321 saying: 'Your support ticket has been escalated to our engineering team. We will update you shortly.'"
wati_message_templates_send_batch_v_2
Executes bulk outbound campaigns by sending pre-approved WhatsApp templates to multiple recipients simultaneously. Requires strict adherence to the template parameters schema.
"Send the template named 'shipping_update_v1' via the broadcast name 'Holiday Batch'. Here is the array of 50 phone numbers and their corresponding tracking link parameters."
wati_conversations_bulk_update
Updates the status of one or more conversations (e.g., marking a chat as SOLVED, PENDING, or OPEN). Crucial for agentic inbox triaging.
"Mark the conversation with Contact ID 112233 as 'SOLVED' now that the refund has been processed."
wati_calls_get_transcript
Retrieves a speaker-separated transcript for voice interactions logged in Wati. Ideal for feeding unstructured audio data back into Claude for analysis.
"Fetch the transcript for call ID 'call_889900'. Summarize the customer's main complaints and generate a draft apology template we can send them."
To view the complete inventory of Wati tools, including media handling, chatbots, and advanced webhooks, visit the Wati integration page.
Workflows in Action
Providing individual tools to Claude is useful, but the true power of MCP lies in multi-step orchestration. Because Claude receives all Wati schemas via a unified interface, it can chain operations together to execute complete business logic.
Scenario 1: Resolving a VIP Customer Support Escalation
When a high-value customer reaches out with an issue, support teams need context fast. Claude can evaluate the contact, fetch the conversation history, reply with an update, and resolve the ticket - all in one prompt.
"Look up the contact details for +18005551234. If they have the custom attribute 'Tier: VIP', fetch their recent conversation history. Send them a text message apologizing for the delay and confirming their account has been credited, then mark the conversation status as SOLVED."
How Claude executes this:
- Calls
get_single_wati_contact_by_idusing the phone number as the polymorphic target. - Evaluates the returned JSON payload to confirm the
Tier: VIPcustom attribute exists. - Calls
wati_conversations_list_messagesusing the target ID to gain context on the issue. - Calls
wati_conversations_send_textto dispatch the apology and resolution confirmation. - Calls
wati_conversations_bulk_updateto change the conversation status toSOLVED.
sequenceDiagram participant User as User / Prompt participant Claude as Claude Desktop participant Truto as Truto MCP Server participant Wati as Wati API User->>Claude: "Resolve VIP ticket for +18005551234" Claude->>Truto: tools/call: get_single_wati_contact_by_id Truto->>Wati: GET /api/v1/getContactById Wati-->>Truto: 200 OK (Contact Data) Truto-->>Claude: JSON result (VIP confirmed) Claude->>Truto: tools/call: wati_conversations_send_text Truto->>Wati: POST /api/v1/sendSessionMessage Wati-->>Truto: 200 OK (Message Sent) Truto-->>Claude: JSON result (Success) Claude->>Truto: tools/call: wati_conversations_bulk_update Truto->>Wati: POST /api/v1/updateConversationStatus Wati-->>Truto: 200 OK Truto-->>Claude: JSON result (Status: SOLVED) Claude-->>User: "The VIP contact was messaged and the conversation is marked SOLVED."
Scenario 2: Post-Call Analysis and Template Follow-Up
Voice calls processed through Wati generate rich, unstructured transcripts. Claude can pull these transcripts, extract structured action items, and trigger a proactive WhatsApp template based on the call outcome.
"Get the transcript for call ID 'call_554433'. Read the transcript to determine if the customer requested a product demo. If they did, send the 'demo_booking_link' WhatsApp template to their phone number, then assign the conversation to operator 'sales@example.com'."
How Claude executes this:
- Calls
wati_calls_get_transcriptand reads the speaker-separated text. - Claude's internal reasoning analyzes the text and identifies a clear intent to schedule a demo.
- Calls
wati_message_templates_send_v_1to dispatch the pre-approved demo booking template (since the call might not constitute an open 24-hour text session). - Calls
wati_conversations_assign_operatorto route the chat to the sales representative.
Security and Access Control
Giving AI models write access to production messaging systems requires strict governance. Truto's MCP architecture provides native security controls that restrict what Claude can do at the server level.
- Method Filtering: Configure the MCP token to only allow
readoperations (e.g.,get,list). If Claude hallucinates a command todelete_a_wati_contact_by_id, the MCP server will reject it at the tool discovery phase. - Tag Filtering: Restrict the server to specific Wati resource tags. You can create an MCP server that only exposes tools tagged with
conversationsandtemplates, entirely walling off access to admin settings or billing endpoints. - Require API Token Auth: By default, the cryptographically hashed MCP URL is the only authentication required. For zero-trust environments, setting
require_api_token_auth: trueforces the MCP client to also pass a valid Truto API token in the Authorization header. - Deterministic Expiration: Short-lived access is a critical defense-in-depth strategy. You can provision MCP servers with an
expires_attimestamp. A durable scheduling primitive ensures that once the clock strikes, the server credentials, cached tokens, and routing records are destroyed instantly.
Architecting for Agentic Automation
Connecting Wati to Claude via an MCP server moves you from basic chatbots to autonomous communication agents. Instead of rigid "If this, then that" workflow builders, Claude can analyze contact attributes, respect 24-hour session constraints, parse call transcripts, and orchestrate template campaigns dynamically based on real-time context.
By leveraging Truto's managed MCP architecture, you offload the massive technical debt of maintaining Wati schema updates, polymorphic ID parsing, and authentication refreshes. Truto's documentation-driven tool generation ensures Claude only receives high-quality, AI-ready operations - allowing your engineering team to focus on agent prompting instead of API maintenance.
FAQ
- How does the MCP server handle Wati rate limits?
- Truto does not absorb, retry, or throttle rate limit errors. When Wati returns an HTTP 429, Truto passes the error back to the caller while normalizing the upstream rate limit data into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The Claude client is responsible for implementing retry and backoff logic.
- How do I authenticate Claude with the Wati MCP server?
- Each Truto MCP server is scoped to a specific integrated Wati account and authenticated via a secure, cryptographically hashed token embedded in the server URL. You simply provide this URL to Claude. For enterprise environments, you can optionally enable require_api_token_auth to enforce dual-layer authentication.
- Can I limit what Wati tools Claude has access to?
- Yes. When creating the MCP server, you can apply method filters (e.g., only 'read' operations) and tag filters (e.g., only 'contacts' and 'campaigns'). Tools are dynamically generated based on these filters and the underlying integration documentation.