Appearance
MCP Setup
Use this page to connect an AI client to WhatsGate through MCP. The examples here use placeholders only. Do not paste real API tokens into public docs, screenshots, support tickets, or shared messages.
Public Docs MCP vs Tenant MCP
WhatsGate has two MCP links for two different jobs:
| Link | Purpose | Token |
|---|---|---|
https://whatsgate.net/docs/mcp | Public read-only documentation metadata so an AI client can discover the WhatsGate docs and setup guide | Not required |
https://{subdomain}.whatsgate.net/mcp/whatsgate | Private tenant MCP for reading your account status, reports, and sending messages | Required |
Give the public docs MCP link to an AI client when you want it to learn the WhatsGate API setup. Use the tenant MCP link only inside your own MCP client configuration.
Dashboard Link
Open your tenant dashboard and go to:
Dashboard > API Access TokensThe tenant dashboard links back to this documentation page. Copy your API token from the token table when you configure your private MCP client.
MCP URL
For account actions, replace {subdomain} with your tenant subdomain:
text
https://{subdomain}.whatsgate.net/mcp/whatsgateExample tenant URL format:
text
https://acme.whatsgate.net/mcp/whatsgateAuthentication Header
MCP clients use the same API token as the REST API, but the header name is different:
http
Authorization: Bearer {api_token}REST API requests still use:
http
Access-Token: {api_token}Client Config Example
Use this as a template and replace both placeholders locally in your AI client:
json
{
"mcpServers": {
"whatsgate": {
"url": "https://{subdomain}.whatsgate.net/mcp/whatsgate",
"headers": {
"Authorization": "Bearer {api_token}"
}
}
}
}How The Link Opens
/mcp/whatsgate is the machine endpoint used by MCP clients. AI clients send POST requests to it with the Authorization header. If you open it in a browser with GET, WhatsGate redirects you to this setup page.
https://whatsgate.net/docs/mcp is public metadata for documentation and opens directly in the browser as JSON.
Available Tools
| Tool | Description |
|---|---|
send_text_message | Send a text message |
send_media_message | Send an image, video, audio, or file |
send_location_message | Send a location message |
get_device_status | Get one device connection status |
list_devices_status | List all device statuses |
get_device_balance | Get today's device usage and remaining balance |
get_failed_numbers | Get failed recipient numbers |
Errors
- Missing or invalid bearer token:
403 Forbidden - Plan does not include API access:
403 Forbidden - Invalid tool input: validation error returned to the MCP client
