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
- Get a channel token. In the console, link a number to your free sandbox channel and create an API token for it.
- 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.
- Ask in plain language. Ask your assistant for the channel status, a conversation or your groups.
- Enable sending only if you need it. Set GATEWAY_ALLOW_SEND to 1 in a separate client entry, and approve every send.
Install
npx -y @wagate/mcpClaude Code
claude mcp add wagate-mcp \
-e GATEWAY_API_TOKEN=<CHANNEL_TOKEN> \
-e GATEWAY_CHANNEL_ID=<CHANNEL_ID> \
-- npx -y @wagate/mcpClaude 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.
{
"mcpServers": {
"wagate-mcp": {
"command": "npx",
"args": ["-y", "@wagate/mcp"],
"env": {
"GATEWAY_API_TOKEN": "<CHANNEL_TOKEN>",
"GATEWAY_CHANNEL_ID": "<CHANNEL_ID>"
}
}
}
}Environment
| Variable | Required |
|---|---|
| GATEWAY_API_URL | No |
| GATEWAY_API_TOKEN | Yes |
| GATEWAY_CHANNEL_ID | Yes |
| GATEWAY_ALLOW_SEND | No |
Tools
Generated from the package README, so the list cannot drift from what the server registers.
| Tool | Request | Needs sending enabled |
|---|---|---|
| channel_status | GET {base}/sessions/{channel} | No |
| list_chats | GET {base}/sessions/{channel}/chats | No |
| read_messages | GET {base}/sessions/{channel}/chats/{chat}/messages | No |
| list_groups | GET {base}/sessions/{channel}/groups | No |
| get_group | GET {base}/sessions/{channel}/groups/{group} | No |
| get_community | GET {base}/sessions/{channel}/communities/{community} | No |
| list_community_subgroups | GET {base}/sessions/{channel}/communities/{community}/subgroups | No |
| get_contact | GET {base}/sessions/{channel}/contacts/{who} | No |
| send_text | POST {base}/sessions/{channel}/messages/text | Yes |
| send_media | POST {base}/sessions/{channel}/messages/{kind} | Yes |
| send_poll | POST {base}/sessions/{channel}/messages/poll | Yes |
| react | PUT {base}/sessions/{channel}/messages/{message_id}/reaction | Yes |
| unreact | DELETE {base}/sessions/{channel}/messages/{message_id}/reaction | Yes |
| delete_message | DELETE {base}/sessions/{channel}/messages/{message_id} | Yes |
Example prompts
- "What is the status of my channel?" (calls
channel_status) - "Show the last 20 messages in my chat with [email protected]." (calls
read_messages) - "List the groups this number is in." (calls
list_groups)
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 sandboxKeep going
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.