Integrations

WhatsApp MCP server for Claude, Cursor and any agent

The WaGate MCP server lets Claude, Cursor or any MCP client work with one WhatsApp number. Run npx -y @wagate/mcp, add the channel token, and the client can read status, chats, messages and groups. Sending is off by default and exists only when you set GATEWAY_ALLOW_SEND.

Facts (as of October 2026, API v1)

  • Package: @wagate/mcp, MIT licensed, Node.js 22 or later.
  • 8 read tools. 6 send tools, which do not exist unless you enable them.
  • Each server instance is tied to one channel and its token.
  • The token is redacted from every string the server returns.

Steps

  1. Get a channel token. In the console, link a number to your free sandbox channel and create an API token for it.
  2. Add the server to your client. Add npx -y @wagate/mcp to your MCP client with GATEWAY_API_TOKEN and GATEWAY_CHANNEL_ID in its environment.
  3. Ask in plain language. Ask your assistant for the channel status, a conversation or your groups.
  4. Enable sending only if you need it. Set GATEWAY_ALLOW_SEND to 1 in a separate client entry, and approve every send.

Install

Shell
npx -y @wagate/mcp

Claude Code

Shell
claude mcp add wagate-mcp \
  -e GATEWAY_API_TOKEN=<CHANNEL_TOKEN> \
  -e GATEWAY_CHANNEL_ID=<CHANNEL_ID> \
  -- npx -y @wagate/mcp

Claude Desktop and Cursor

Both read the same mcpServers entry. Claude Desktop keeps it in claude_desktop_config.json. Cursor keeps it in ~/.cursor/mcp.json.

JSON
{
  "mcpServers": {
    "wagate-mcp": {
      "command": "npx",
      "args": ["-y", "@wagate/mcp"],
      "env": {
        "GATEWAY_API_TOKEN": "<CHANNEL_TOKEN>",
        "GATEWAY_CHANNEL_ID": "<CHANNEL_ID>"
      }
    }
  }
}

Environment

VariableRequired
GATEWAY_API_URLNo
GATEWAY_API_TOKENYes
GATEWAY_CHANNEL_IDYes
GATEWAY_ALLOW_SENDNo

Tools

Generated from the package README, so the list cannot drift from what the server registers.

ToolRequestNeeds sending enabled
channel_statusGET {base}/sessions/{channel}No
list_chatsGET {base}/sessions/{channel}/chatsNo
read_messagesGET {base}/sessions/{channel}/chats/{chat}/messagesNo
list_groupsGET {base}/sessions/{channel}/groupsNo
get_groupGET {base}/sessions/{channel}/groups/{group}No
get_communityGET {base}/sessions/{channel}/communities/{community}No
list_community_subgroupsGET {base}/sessions/{channel}/communities/{community}/subgroupsNo
get_contactGET {base}/sessions/{channel}/contacts/{who}No
send_textPOST {base}/sessions/{channel}/messages/textYes
send_mediaPOST {base}/sessions/{channel}/messages/{kind}Yes
send_pollPOST {base}/sessions/{channel}/messages/pollYes
reactPUT {base}/sessions/{channel}/messages/{message_id}/reactionYes
unreactDELETE {base}/sessions/{channel}/messages/{message_id}/reactionYes
delete_messageDELETE {base}/sessions/{channel}/messages/{message_id}Yes

Example prompts

Read this before you enable sending

read_messages puts text written by other people into the model context. With sending enabled in the same server, that text can tell the model to send messages. Keep reading and sending in two separate client entries, enable sending only in a session that needs it, and approve each send yourself.

A failed send can still have been delivered. When a send result says the delivery is unknown, do not send again. Check the chat first.

Questions

Can an AI agent send WhatsApp messages with this?
Yes, once you enable it. The send tools are not registered at all until GATEWAY_ALLOW_SEND is exactly 1 or true. Without it the server cannot reach a send endpoint.
Which clients does it work with?
Any MCP client that can start a stdio server. The package documents Claude Desktop, Claude Code and Cursor.
Does it work with the free sandbox?
It works with any channel you have a token for, and every account has a free sandbox channel to start with.
Can it read my whole chat list?
No. list_chats returns the chats the gateway has observed on this channel, up to 100. It is not the full chat list of the phone.

Free sandbox, forever. Add a real number when you're ready.

Start in the free sandbox

WaGate is an independent WhatsApp API for developers: send and receive messages, automate groups and communities, and get signed webhooks with a free sandbox. Not affiliated with WhatsApp or Meta. You link your own number.

WhatsApp MCP Server for Claude and Cursor | WaGate