WhatsApp MCP Server: give your AI agent real WhatsApp access
WAME runs a hosted Model Context Protocol server at https://mcp.wame.api.br. Point Claude, Cursor or n8n at it and your agent gets 21 tools for WhatsApp, Instagram Direct and Messenger — send, read, reply, react, manage groups, fire approved templates. No integration code.
If you want an AI agent to actually use WhatsApp — read conversations, reply, send a file, check whether a number is registered — you no longer have to write the integration. WAME publishes a hosted Model Context Protocol server at https://mcp.wame.api.br. Connect your agent to it and 21 tools show up, already described, ready to call.
One command in Claude Code, or one URL pasted into Cursor or Claude Desktop. The agent discovers what it can do on its own. That is the whole setup.
What you skip
Without MCP, every capability your agent needs is a function you define, describe to the model, and keep alive as the API evolves:
const tools = [{
name: 'send_whatsapp',
description: 'Send a WhatsApp text message',
parameters: {
type: 'object',
properties: {
to: { type: 'string', description: 'Number with country code' },
text: { type: 'string' },
},
required: ['to', 'text'],
},
}];
// ...plus the handler that actually calls the API, plus error handling,
// then all of it again for reading chats, sending media, creating groups...With MCP you write none of that. The server declares the tools; the agent reads them on connect.
Connect
In Claude Code:
claude mcp add --transport http wame https://mcp.wame.api.brIn Cursor, Claude Desktop, or any client with an MCP panel: add an HTTP server and paste https://mcp.wame.api.br. The client asks for your instance authorization and that is it.
From there you just talk:
"Check whether anyone messaged sales today and never got a reply."
The agent calls find_pending_replies and list_chats by itself. You did not pick the tool — it did.
The 21 tools
They cover the whole lifecycle of a conversation, not just sending.
Talk
| Tool | Parameters | What it does |
|---|---|---|
send_message | to, text, channel? | Sends text on the chosen channel |
send_media | to, type, url, caption? | Image, video, audio, document |
reply_to_message | messageId, to, text | Replies quoting the message |
react_to_message | messageId, emoji | Reacts with an emoji |
set_typing | to, status | Shows the typing indicator |
Read and understand
| Tool | Parameters | What it does |
|---|---|---|
list_chats | limit?, onlyUnread? | Lists conversations |
read_messages | chatId, limit?, page? | Reads a conversation's history |
wait_for_message | timeoutSeconds?, chatId? | Blocks until the next message arrives |
find_contact | query | Finds a number by name |
check_number_registered | number | Checks whether a number has WhatsApp |
mark_as_read | messageId, typing? | Marks as read |
Operate
| Tool | Parameters | What it does |
|---|---|---|
get_instance_status | — | Connection state |
list_templates | onlyApproved? | Available templates |
send_template | templateName, recipients[], confirm? | Fires an approved template |
get_analytics | report?, since?, until? | Support metrics |
Groups
list_groups, get_group, create_group, update_group, manage_group_participants, leave_group — create a group, join, leave, add and remove participants.
Three channels, one agent
send_message takes a channel parameter. That is not an API detail — it follows from WAME delivering WhatsApp, Instagram Direct and Messenger on a single instance, behind one webhook format.
An agent that answers on WhatsApp answers on Instagram Direct without a line of extra code. Same instance, now reachable by a model.
Where this earns its place
Inbox triage. "Which conversations from yesterday went unanswered, and what was each one about?" The agent reads, summarizes and hands back a list. Nobody opens forty chats by hand.
Assisted operation. "Send the PDF receipt to the customer who asked about the invoice." It finds the contact, locates the message, sends the file.
Developer support. Inside Cursor or Claude Code with the MCP connected, you can exercise the real API while writing the code that will consume it. The agent sends a test message, reads what arrived, and you compare it against what your handler expected — without leaving the editor.
Inside an existing automation. In n8n the same MCP server plugs into an agent node as a tool. Useful when the workflow already exists and you only want to give it the ability to hold a conversation.
What MCP is not
It does not replace the API. If your system has to send an order confirmation when a status changes in your database, that is a REST call from your code, not an agent deciding at runtime. Deterministic flows still want deterministic code.
It is not a finished bot. MCP gives the agent capability. The conversation, the tone and the rules are still yours to define.
It does not widen your access. The scope is the instance you connected. And send_template — the only tool that can reach a lot of people at once — asks for confirm before it fires. That is deliberate.
Getting started
- Create an instance in the portal. The unofficial one connects by QR code in seconds and is perfectly good for testing.
- Connect the MCP with the command above.
- Ask the agent something harmless: "what is my instance status?" If it answers, everything is wired.
- Only then point it at your production instance.
The WAME MCP page carries the full tool reference, the limits on each one, and the prompts that tend to work best.
The part that compounds
Wiring AI into WhatsApp stopped being a project and became a line of configuration. The real gain is not the days saved on the integration — it is that when the API grows a new capability, the agent sees it without you rewriting anything. The new tool shows up in the list, and it gets used.
If you ship software for clients, that matters more: the same code serves every project, and now the same agent does too.
Ready to automate your WhatsApp?
Create your free account and start sending messages through the API in minutes.
Start for freeFrequently asked questions
What is the WAME MCP server?+
It is a hosted Model Context Protocol server at https://mcp.wame.api.br that exposes the WAME API as tools an AI agent can call. Instead of writing function definitions and handlers so your model can talk to WhatsApp, the agent connects to the server, discovers the 21 available tools on its own, and calls them directly: send a message, read a conversation, reply, create a group, fire an approved template.
Do I need to write code to use it?+
Not to connect. In Claude Code it is one command: claude mcp add --transport http wame https://mcp.wame.api.br. In Cursor, Claude Desktop or any client with an MCP panel, you add an HTTP server and paste the same URL. The agent sees the tools from that point on. You only write code if you want to embed this inside your own product.
Does it work for Instagram and Messenger too, or only WhatsApp?+
All three. The sending tools take a channel parameter because WAME delivers WhatsApp, Instagram Direct and Messenger from a single instance with one webhook format. The same agent answers on all three channels with no per-channel integration.
Is it safe to give an AI agent access to WhatsApp?+
The agent gets the scope of the instance you authorized and nothing beyond it. The one tool that can reach many people at once, send_template, requires an explicit confirm flag before it executes. The recommended path is to connect a test instance first, verify the behaviour you expect, and only then point the agent at production.
How is MCP different from just calling the REST API?+
The REST API is for your system: code you write, test and deploy, running a deterministic flow. MCP is for the agent: it reads the tool descriptions and decides which one to call at runtime. Both hit the same instance and the same account. MCP does not replace the API — it removes the integration layer for the case where the caller is a model rather than your code.
Keep reading
Official vs unofficial WhatsApp API: how to actually choose
The official WhatsApp Cloud API needs an approved dedicated number, pre-approved templates outside the 24-hour window, and is billed per delivered message. The unofficial API connects through your own number by QR code, starts in minutes and runs flat-rate — with no Meta support and a real ban risk. Which fits which job.
wa.me links explained: click to chat on WhatsApp, with a generator
wa.me is WhatsApp's official click-to-chat shortener. Build a link with https://wa.me/<number in international format, digits only>, prefill a message with ?text=, and open a chat without anyone saving a contact. Includes a live generator and the wa.me/message and wa.me/c variants.
WhatsApp API endpoints: the reference you can hold in your head
The WAME WhatsApp API uses https://us.api-wa.me with the pattern /{key}/... where {key} is your instance key and doubles as authentication — no auth header. Endpoints group into instance, messages, groups, contacts and webhooks. Full list with curl examples.