Model Context Protocol · Windsurf

Add the official WhatsApp API to your app with Windsurf

Give Windsurf Cascade the official WhatsApp Business API with one MCP server entry.

Create a free account →Create free account →
mcp_config.jsonnpx gambot-mcpCascadestdio

What you can ask Cascade to do

  • Set up WhatsApp for your project end to end, including the Meta connection hand-off.
  • Send test messages and templates and verify delivery.
  • Add a webhook endpoint for incoming messages to your codebase and test it.

Requirements

  • No Gambot account yet? Connect the server without a token and ask your agent to “set up WhatsApp with Gambot”. It creates a free-trial account for you (no API key needed) and hands you one link to connect your WhatsApp number to Meta in the browser — that single step must be done by a person. Prefer the browser? Create an account.
  • After WhatsApp is connected, copy your API token (gmbt_…) from Settings → General into an environment variable — never into the chat. Where the client supports it, sign in with OAuth on the hosted server instead and there is no token to copy.
  • Node.js 18+ (Windsurf starts the server with npx).

Setup

1

Open the MCP config

In Windsurf, open Cascade’s MCP settings (the MCPs / plugins area), or edit ~/.codeium/windsurf/mcp_config.json directly.

2

Add the server

Paste the JSON below into the mcpServers object and save.

3

Refresh

Refresh the MCP list in Cascade and confirm the gambot tools appear.

4

Ask

“Use Gambot to add the official WhatsApp API to this project.”

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "gambot": {
      "command": "npx",
      "args": ["-y", "gambot-mcp"],
      "env": {
        "GAMBOT_TOKEN": "gmbt_your_token_here"
      }
    }
  }
}

Example prompts

You Set up WhatsApp for my app with Gambot and send a test message to my own number.

You Is the 24-hour window open for this customer, or do I need a template?

You List my approved WhatsApp templates and send the order_update template to this number.

You Register a webhook so my backend receives incoming WhatsApp messages, then send a test event.

Troubleshooting

  • Tools not showing? Restart the client after editing its MCP config, then check its MCP/tools panel for “gambot”.
  • AUTHENTICATION_REQUIRED? The token is missing or invalid. Copy a fresh one from Settings → General.
  • CONVERSATION_WINDOW_CLOSED? The 24-hour window is closed — send an approved template instead. This is WhatsApp behavior, and the error tells the agent exactly that (template_required: true).
  • Is the WhatsApp number connected? Ask the agent to run gambot_setup_whatsapp_integration; it reports the exact state and the next step.
  • Windsurf limits the total number of enabled tools across servers. If gambot tools are missing, disable servers you do not need.

Related

Add WhatsApp to your app

One config entry, one account, then your first WhatsApp message from Windsurf.

Frequently asked questions

How do I add the official WhatsApp API to my application using Windsurf?

Add the gambot server (command npx, args ["-y","gambot-mcp"]) to ~/.codeium/windsurf/mcp_config.json, refresh the MCP list in Cascade, and ask it to set up WhatsApp with Gambot.

Do I need a token first?

No. Without GAMBOT_TOKEN the server runs in onboarding mode and can create your Gambot account. Add the token after WhatsApp is connected.

Is it the official WhatsApp Business API?

Yes. Gambot is a Meta Business Solution Provider; there is no QR code or WhatsApp Web session.