---
title: "WhatsApp MCP Server: Connect AI Agents to WhatsApp and SMS"
description: "How a WhatsApp MCP server lets Claude, Cursor and other AI agents send WhatsApp and SMS messages safely: setup, guardrails, consent and example use cases."
canonical: "https://omnichannels.ai/blog/whatsapp-mcp-server-ai-agents/"
language: "en"
updated: "2026-10-16"
publisher: "BroadNet Technologies"
brand: "OmniChannels.ai"
category: "integration"
primaryQuery: "whatsapp mcp server"
keywords: ["mcp server whatsapp", "model context protocol messaging", "claude whatsapp integration", "ai agent send sms", "mcp server sms api", "cursor mcp messaging", "ai agent whatsapp templates"]
published: "2026-10-16"
author: "OmniChannels.ai Editorial Team"
reviewer: "BroadNet Messaging Solutions Team"
readingMinutes: 9
answer: "A WhatsApp MCP server exposes messaging operations as tools that an AI agent can discover and call through the Model Context Protocol. With the OmniChannels.ai MCP server at https://mcp.broadnet.me/mcp, a client such as Claude Code or Cursor authenticates with a Bearer token and can send SMS and WhatsApp messages, list templates and read delivery reports. The agent acts with your account's permissions, so guardrails matter."
takeaways: ["MCP (Model Context Protocol) is an open standard that lets an AI client list and call tools on a remote server; the OmniChannels.ai server maps its tools to the same REST API your code would use.", "One endpoint, https://mcp.broadnet.me/mcp over Streamable HTTP, and one header, Authorization: Bearer <token>, connect Claude Code, Cursor, VS Code, Claude Desktop and other clients.", "An agent with send tools can message real people and spend real balance, so enable only the tools it needs and require human confirmation before any send.", "WhatsApp rules still apply to agents: opt-in, approved templates outside the customer service window, and sender ID rules for SMS.", "Use a temporary key while experimenting and a permanent key only for a reviewed production agent."]
faq: 
  - q: "What is an MCP server?"
    a: "An MCP server is a program that offers tools to AI clients through the Model Context Protocol, an open standard. The client connects, lists the tools and calls them when a user's request needs them. A remote MCP server runs on the provider's infrastructure, so you connect to a URL and authenticate instead of installing code."
  - q: "Can Claude send WhatsApp messages?"
    a: "Claude cannot reach WhatsApp on its own, but a Claude client that supports MCP can call a messaging MCP server's tools. With the OmniChannels.ai MCP server connected, Claude Code or Claude Desktop can send an approved WhatsApp template or an SMS from your account, subject to your tool settings and Meta's rules."
  - q: "Is it safe to let an AI agent send messages?"
    a: "It is safe only with guardrails. Enable the minimum set of tools, require human confirmation for sends, test against your own verified numbers first, use temporary keys while experimenting and review delivery reports. The agent acts with your token's permissions, so it can spend balance and reach real people if you allow it."
  - q: "Do I need a WhatsApp template for an agent to message someone?"
    a: "Yes, outside the customer service window. Meta allows free-form messages only while a window opened by the customer is active; otherwise the business must send an approved template. An agent can list your approved templates and send one by name, but it cannot invent a new approved template on the spot."
  - q: "Does the MCP server replace the REST API?"
    a: "No. The tools map to the same REST API, with the same token and permissions. Use MCP when an AI client should discover and call operations itself, and use the REST API, OpenAPI spec or SDK for deterministic production code such as OTP flows and order notifications."
  - q: "How do I get an MCP key?"
    a: "Sign in to the admin portal, open Integrations then MCP Integration, and choose Get temporary key. A permanent key for a production agent is issued by your account admin or master account. Test access goes to your own verified numbers, and there is no instant self-serve signup."
sources: 
  - title: "Model Context Protocol specification (2025-06-18)"
    url: "https://modelcontextprotocol.io/specification/2025-06-18"
  - title: "Connect Claude Code to tools via MCP — Claude Code documentation"
    url: "https://code.claude.com/docs/en/mcp"
  - title: "WhatsApp Business Messaging Policy"
    url: "https://business.whatsapp.com/policy"
  - title: "Pricing on the WhatsApp Business Platform — Meta for Developers"
    url: "https://developers.facebook.com/documentation/business-messaging/whatsapp/pricing"
---

# WhatsApp MCP Server: Connect AI Agents to WhatsApp and SMS

Canonical: https://omnichannels.ai/blog/whatsapp-mcp-server-ai-agents/
Language: en
Publisher: OmniChannels.ai by BroadNet Technologies

This guide is for developers and technical leads who want an AI agent to send or track WhatsApp and SMS messages without hand-writing every integration. It explains what a WhatsApp MCP server is, how to connect one, which guardrails to set before the agent touches real customers, and where MCP is the wrong tool.

## What is a WhatsApp MCP server?

A WhatsApp MCP server is a service that exposes messaging operations, such as sending a template or reading a delivery report, as tools an AI client can discover and call. It speaks the Model Context Protocol (MCP), an open standard for connecting AI assistants to external tools and data.

Without MCP, giving an assistant the ability to send a message means writing a custom function for each model or framework. With MCP, the client connects to one URL, asks the server what tools exist, and calls them when a user's request needs them. Our glossary entry for MCP servers gives the short definition.

Two points are easy to miss:

- **MCP does not bypass WhatsApp's rules.** The server calls the same WhatsApp Business Platform operations as any other integration, so templates, opt-in and the customer service window still apply.
- **The agent is only as safe as its token.** The tools act with the permissions, sender IDs and balance of the key you provide.

## How does the OmniChannels.ai MCP server work?

It is a remote MCP server on a single endpoint, authenticated with a Bearer token. Its tools map to the same REST API documented in the [developer docs](/developers/mcp/), so what an agent can do is what your own code could do with that token.

| Setting | Value |
|---|---|
| Endpoint | `https://mcp.broadnet.me/mcp` |
| Transport | MCP Streamable HTTP |
| Authentication | `Authorization: Bearer <token>` on every request |
| Acts on | Your account: channels, sender IDs, templates and balance |
| Typical tool areas | Sending on each channel (SMS, WhatsApp, RCS, Telegram, Messenger, Instagram, Push), listing and sending WhatsApp templates, reading delivery reports |

The exact tool list depends on the server version and your account, so read it from your client rather than from a blog post. A request without a token is refused at the protocol level, which is a useful smoke test.

## How do I connect Claude, Cursor or another client?

You add the endpoint and the header to your client's MCP configuration, and keep the token in an environment variable or secret input so it never lands in a repository.

### Connect in five steps

1. **Get a key.** In the admin portal, open Integrations, then MCP Integration, and choose Get temporary key. A permanent key for a production agent comes from your account admin or master account.
2. **Store it as a secret.** For example, export it as `BROADNET_TOKEN` in your shell.
3. **Add the server to your client.** For Claude Code:

```bash
claude mcp add --transport http omnichannels https://mcp.broadnet.me/mcp \
  --header "Authorization: Bearer $BROADNET_TOKEN"
```

4. **Check the tools.** In Claude Code, the `/mcp` command shows the server and its tools. In Cursor, VS Code and Claude Desktop the configuration lives in the client's own MCP settings file.
5. **Switch off what the agent does not need,** before the first real prompt.

Client formats change between versions, so the exact snippets for Cursor, VS Code and Claude Desktop live in the docs, with step-by-step pages for [Claude Code](/developers/mcp-claude-code/), [Cursor](/developers/mcp-cursor/) and n8n. Claude Code's own [MCP documentation](https://code.claude.com/docs/en/mcp) is the reference for its commands.

To test without any client, send the MCP `initialize` request to the endpoint with your token. The docs show the full `curl` command.

## What can an AI agent do with WhatsApp and SMS?

Anything the connected tools allow: send, look up and report. The practical value is in the flexible, human-language tasks around messaging rather than in the high-volume flows you should keep in code.

Example prompts that suit an agent:

- "Send an SMS from OmniDemo to 447700900123 saying the technician arrives at 3 pm."
- "List my approved WhatsApp templates in Arabic."
- "Send the `order_update` WhatsApp template to 971500000000 with order number INV-400."
- "How many messages in yesterday's statements campaign failed, and why?"
- "Draft an RCS card for our autumn launch and show it to me before sending anything."

Good use cases, in rough order of safety:

| Use case | Tools needed | Risk |
|---|---|---|
| Delivery questions from support staff ("did this customer get the SMS?") | Read-only report tools | Low |
| Developer assistant that sends test messages to your own numbers while building an integration | Send tools, test numbers only | Low to medium |
| Template lookup and drafting copy for review | Template list tools | Low |
| Operations assistant that sends one-off notices after a human approves | Send tools plus confirmation | Medium |
| Autonomous agent sending to customers | Send tools, no confirmation | High; needs a reviewed design |

An internal assistant that answers delivery questions needs no send tools at all. Remove them.

## How do I keep an AI agent from messaging the wrong people?

Treat the agent like a new employee with a company phone: limited permissions, supervision at first, and a record of what it did. The docs list the safeguards; here they are with the reasoning.

1. **Least privilege.** Enable only the tools the task needs. An agent that answers delivery questions does not need send tools; one that sends OTPs does not need template or account tools.
2. **Human in the loop.** Configure the client to ask for confirmation before any tool that sends, and always before sends to many recipients. In Claude Code, permission rules refer to MCP tools as `mcp__<server>__<tool>`, so you can allow read tools to run freely while send tools still prompt.
3. **Temporary keys for experiments.** Use a temporary key while testing and a permanent key only for a reviewed production agent.
4. **Test numbers first.** Point new agents at your own verified numbers until you trust their behaviour.
5. **Watch the logs.** Review what the agent sent in your delivery reports, especially in the first weeks.
6. **Revoke quickly.** If a key is exposed, ask your account admin or our support team to revoke it and issue a new one.
7. **Respect consent.** Agents must follow the same opt-in, sender ID and channel rules as any other sender.

Prompt injection deserves a special mention. If an agent reads untrusted text, such as an inbound customer message or a web page, that text can contain instructions. Do not give an agent that reads untrusted content unsupervised access to send tools. Keep reading and sending in separate steps, with a person approving the send.

## Which WhatsApp and SMS rules still apply?

All of them. The agent is just another sender.

- **Opt-in.** Meta's [WhatsApp Business Messaging Policy](https://business.whatsapp.com/policy) requires that people have opted in to hear from you. An agent that can message anyone in a spreadsheet does not change that.
- **Templates and the window.** Free-form WhatsApp messages are possible only inside the customer service window; outside it you need an approved template. See our guide to the [24-hour customer service window](/blog/whatsapp-24-hour-customer-service-window/) and the [WhatsApp API docs](/developers/whatsapp/).
- **Cost.** Meta charges per delivered message by category, and an agent can generate volume fast. Cap what it may send, and model costs with our [WhatsApp pricing calculator](/tools/whatsapp-pricing-calculator/).
- **SMS sender IDs.** SMS needs a registered sender ID in many countries. The agent uses the sender IDs approved on your account.

## Worked example: a support team adds a delivery-status assistant

"Souq Rafiq" (synthetic), a UAE online retailer, wants its support staff to answer "did the customer receive our message?" without opening dashboards.

- **Setup:** an admin generates a temporary key and connects Claude Desktop to the MCP server for two support leads.
- **Tools:** only report-reading tools are enabled. Send tools are switched off.
- **Use:** a lead asks, "How many messages in yesterday's statements campaign failed, and why?" The agent reads the delivery report and summarises the reasons by status.
- **Review:** after two weeks, the admin checks the delivery reports, confirms nothing was sent, and requests a permanent key for a small production assistant.
- **Next step:** to let the assistant resend a missed notice, the team enables one send tool with confirmation on, and limits it to a test number group first.

## When is MCP the wrong choice?

Use the REST API, OpenAPI spec or SDK for anything deterministic and high-volume.

- **OTP and transactional flows.** A login code should come from code you control, not a model that might paraphrase it. See the REST quickstart.
- **Bulk campaigns.** Use the campaign tools or the bulk endpoints with a reviewed file, not a conversational prompt.
- **Unattended customer chat.** A customer-facing agent needs a designed conversation flow, knowledge, handover to humans and monitoring. That is an AI agent product, not a developer's MCP session.
- **Limits of this guide.** Client configuration formats and the tool list change between versions. Confirm both in the docs and in your client.

## How OmniChannels.ai helps

OmniChannels.ai provides the MCP server at `https://mcp.broadnet.me/mcp` alongside the REST API at `https://api.broadnet.me`, with one Bearer token model across SMS, WhatsApp, RCS, Messenger, Instagram, Telegram, Email and Push. BroadNet is an official Meta Business Solution Provider, and its AI agents product supports English and Arabic with handover to a human agent and tool use through MCP; see [AI agents](/platform/ai-agents/). Test access goes to your own verified numbers. Start with the [MCP guide](/developers/mcp/) and the [developer overview](/developers/). Other channels, including [Facebook Messenger for business](/channels/facebook-messenger/), are described on their channel pages.
