Skip to content

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:

LinkPurposeToken
https://whatsgate.net/docs/mcpPublic read-only documentation metadata so an AI client can discover the WhatsGate docs and setup guideNot required
https://{subdomain}.whatsgate.net/mcp/whatsgatePrivate tenant MCP for reading your account status, reports, and sending messagesRequired

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.

Open your tenant dashboard and go to:

Dashboard > API Access Tokens

The 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/whatsgate

Example tenant URL format:

text
https://acme.whatsgate.net/mcp/whatsgate

Authentication 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}"
      }
    }
  }
}

/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

ToolDescription
send_text_messageSend a text message
send_media_messageSend an image, video, audio, or file
send_location_messageSend a location message
get_device_statusGet one device connection status
list_devices_statusList all device statuses
get_device_balanceGet today's device usage and remaining balance
get_failed_numbersGet 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

Released under the MIT License.