Skip to main content
All connectors
qbash Connectors / WhatsApp

WhatsApp MCP serverand Python AI tasks

qbash hosts a WhatsApp MCP server you can use in Claude, ChatGPT, Codex, Cursor, Grok Bot and Muse. Developers use qbash Tasks to write cloud-hosted Python functions that pair WhatsApp with models such as Claude and GPT.

Add the qbash MCP

Use WhatsApp from Claude Code, Codex, Cursor and other MCP clients. Connect WhatsApp in qbash, and your agent can work with its data and build Tasks that call it.

claude mcp add --transport http qbash https://mcp.qbash.com/mcp

Then run /mcp in Claude Code and sign in with qbash.

  • Send a text message, or reply to a customer's message, inside the 24-hour customer service window
  • Send an approved template message, the only kind allowed outside the 24-hour window
  • Send an image, video, audio file or document by media ID or public URL, with a caption
  • Send a message with reply buttons or a list of options
  • React to a customer's message with an emoji
  • Mark a customer's message as read, with an optional typing indicator
Read the docs

Write a WhatsApp task in Python

A qbash Task is a Python function hosted in the cloud. Python is the runtime and defines the process, and built-in inline prompts run on leading models such as Claude, GPT, Gemini and Grok.

Run a Task on a schedule, from an HTTP request or when a connected app sends an event. Your agents and chat tools call it over MCP.

Each run is logged with its inputs and results, and you can turn data logging off for any Task. Every Task has version control, and each run is locked to the version it ran.

Answer each new WhatsApp message with a first reply

Meta's webhook posts each incoming customer message to the Task. An inline prompt writes a short first reply from the message, and send_text_message sends it as a reply in the same chat while the window is open.

main.py
entry = qbash.inputs.get("entry") or []
value = entry[0]["changes"][0]["value"] if entry else {}
messages = [item for item in value.get("messages", []) if item["type"] == "text"]
if messages:
message = messages[0]
reply = qbash.ai.run_prompt(
slug="whatsapp-first-reply",
variables={"name": value["contacts"][0]["profile"]["name"], "message": message["text"]["body"]},
)
sent = qbash.integrations.whatsapp.send_text_message(
phone_number_id=value["metadata"]["phone_number_id"],
to=message["from"],
body=reply,
reply_to_message_id=message["id"],
)
qbash.output(sent)
else:
qbash.output("No text message in this webhook call.")
Sample send_text_message response
{
"status": "success",
"messaging_product": "whatsapp",
"contacts": [
{
"input": "15551234567",
"wa_id": "15551234567"
}
],
"messages": [
{
"id": "wamid.HBgLMTU1NTEyMzQ1NjcVAgARGBI0QjJGNkE3RDlFNDE2MzVBRTUA"
}
]
}

Custom MCP server

Build a custom MCP server with WhatsApp

Create a hosted MCP server that combines WhatsApp tools with your other connectors, Tasks and memory folders. You choose each tool it exposes, so a server can share WhatsApp reads with write tools left off.

Share the server with your team, and each person adds it to the client they already use.

How to set it up

  1. Connect WhatsApp on the qbash Connectors page.
  2. Create an MCP server and add the WhatsApp tools you want to share.
  3. Paste the server URL into your client. It connects with OAuth or an access token.

WhatsApp MCP questions

Does WhatsApp have an official MCP server?

Meta runs the WhatsApp Business Tools MCP server at mcp.facebook.com/whatsapp_business_tools, in beta and rolling out gradually as of November 2026. It registers numbers, manages templates, configures webhooks and sends messages as the signed-in developer, and Meta describes this release as built for development and testing workflows. The qbash server puts the Cloud API on one URL with your other connectors, and the same methods run in Python Tasks that answer customers from a webhook.

Does the WhatsApp connector work with my personal WhatsApp?

It works with WhatsApp Business numbers on Meta's Cloud API only, so it cannot read or send your personal chats. Meta does not offer an API for personal accounts, and the number you connect has to be registered to a WhatsApp Business Account.

What does the WhatsApp connector need to connect?

A WhatsApp Business Account with a registered phone number, and a system user access token from Meta Business Manager with the whatsapp_business_messaging and whatsapp_business_management permissions. Template messages need templates Meta has approved.

When can the WhatsApp connector send a free-form message?

A customer's message opens a 24-hour customer service window, and inside it you can send any message type. Outside the window, only approved template messages go through, which is what send_template_message is for.

Build a WhatsApp task

Write it in Python with AI steps, or describe it to your coding agent through the qbash MCP.