Skip to main content

Description

The ZapperHub MCP server lets an AI agent operate the WhatsApp of your instances. The agent lists the instances, reads conversations, waits for a reply, and sends messages. It uses the MCP tools and needs no integration code. The server serves instances of the types device (unofficial connection) and cloud_api (official connection). Each connection accesses only the instances of its own account.
The agent never receives the key of an instance. The server uses the instance credentials on its own, and no tool returns them.

Choose how to connect

There are two ways to connect. Choose by client. A remote MCP client that supports login (OAuth) finds the login screen on its own. Another client without this function uses the account key.

Connect with the account login

With the account login, you sign in to ZapperHub and choose what the agent accesses. You do not copy any key. The connection stays in the list Connected apps, where you edit or revoke the access.

Preliminary requirements

  • A connected instance. See Quickstart.
  • A client that supports a remote MCP server with login (OAuth).

Add the connector in the client

In all clients, the address of the server is https://mcp.zapperhub.com/mcp.
1

Open the connectors

Go to Customize > Connectors.
2

Add the connector

Click + Add and Add custom connector.
3

Enter the data

Enter a name, for example ZapperHub. Enter the URL https://mcp.zapperhub.com/mcp. Click Continue.
4

Finish

Review the authentication options and click Continue. Then click Add.
5

Sign in to ZapperHub

Claude opens ZapperHub. If ZapperHub asks for a login, sign in to your account. Then go on to the authorization screen.
On the Free plan, Claude supports one custom connector.On the Team and Enterprise plans, an owner of the organization adds the connector in Organization settings > Connectors. Each member clicks Connect on the connector and signs in with their own ZapperHub account.The menu names follow the Claude documentation and change between versions. Claude Desktop also supports a custom connector. If the menu of your app is different, look for the option to add a custom connector and use the same URL.

Authorization screen

After the login, ZapperHub shows the authorization screen. It has the name of the app and its address. Choose what the app accesses and click Authorize. To give up, click Cancel. In both cases, you go back to the app.
Check the address that the screen shows next to the name. It must be the address of the app that you are connecting, for example claude.ai. If the address is different, click Cancel.
The screen has two choices. The 8 tools of the Read only access are list_instances, list_chats, read_messages, wait_for_reply, check_numbers, get_service_window, list_templates, and list_groups. The Read and write access adds send_text, send_media, send_template, react, and mark_as_read. With Read only, the agent does not see the write tools. With both options, the agent also sees the list of the authorized instances, with name, number, status, and tags. After you authorize, the client keeps the connection and renews the access on its own. You do not paste a key and you do not sign in again at each use.

Edit or revoke the connection

Each connected app appears in Connected apps, in the side menu of the panel. On this screen, you change the instances and the access with Edit and remove the access with Revoke. The change takes effect on the next call of the agent. Revoking a connection does not affect the account key or the other integrations. Rotating or deleting the account key does not affect a connection by login either.

Connect with the account key

The account key is the alternative for the clients that support custom headers: Claude Code, Cursor, Hermes, and OpenClaw. The agent has the access of the key: write access to all instances of the account.

Preliminary requirements

  • A connected instance. See Quickstart.
  • The global key of the account, which starts with zsk_.
  • An MCP client that supports Streamable HTTP and custom headers.

Generate the account key

1

Open the key screen

Go to app.zapperhub.com/dash and click Global API Key in the side menu.
2

Create the key

Click Create global key.
3

Copy the key

Copy the key and store it in the MCP client. The panel shows the key only once.
The account key is the same global key of the Instance API. The screen, the rotation, and the deletion are in Global API key.
The account key gives the agent write access to all instances of the account. Store it as a secret. Do not put it in versioned code. If you rotate or delete the key, the MCP client loses access until you update the header.

Configure the client

In all clients, the address is https://mcp.zapperhub.com/mcp and the header is Authorization: Bearer zsk_.... Replace zsk_... with your key.
Run the command in the terminal:

Test the connection

After you connect, by login or by key, ask the agent to list the instances. The answer confirms that the connection works.

Tools

The server exposes 13 tools. Their names and descriptions are in English, for the agent. In every tool, instance is the id or the name of an instance from list_instances. chat is a number with the country code, a group id that ends in @g.us, or a LID that ends in @lid.

Read and check

Send

Sends are queued. The response has status, jobIds, and cursor. Every send returns the cursor, also the first message to a new contact. Pass this cursor to wait_for_reply to wait for the reply of the contact.

Status of the sent messages

In read_messages, each message that the account sent (fromMe: true) has status, jobId, and, on a failure, error. The jobId is one of the jobIds of the send. If the reply of the contact does not arrive, read the conversation and check the status of the message. A message deleted for everyone has deleted: true, with no text and no media.

Official API instances

On a cloud_api instance, send_text and send_media work only within 24 hours of the last message of the contact. With the window closed, the tool responds SERVICE_WINDOW_CLOSED. In this case, use list_templates and send_template. See Templates.

Limits

  • Each user can make up to 120 calls per minute.
  • wait_for_reply waits at most 60 seconds per call. To wait longer, call the tool again with the returned cursor.
  • Each account can have up to 10 wait_for_reply calls at the same time. The next call responds TOO_MANY_WAITS.
  • The tools see only the instances of the account of the connection. With a connection by login, only the authorized instances.

Agents that run all the time

An interactive agent, such as Claude Code, uses wait_for_reply to wait for a reply. An agent that answers conversations all the time receives the messages through a webhook. The instance notifies the agent, and the agent answers with the MCP tools.
1

Expose a URL in the agent

The agent needs an HTTPS URL that receives POST requests.
2

Register the webhook in the instance

Point the webhook of the instance to this URL and subscribe to the messages.upsert event. The procedure is in Webhooks.
3

Validate the signature

Check the x-webhook-signature header of each delivery, as Webhooks describes. The signature uses the API key of the instance. Copy this key in the panel, with Copy X-Api-Key in Instances, and configure it only in the code that receives the webhook. Do not put this key in the MCP client.
4

Answer through the MCP

On each event, the agent calls the tools. Use instanceId as instance and key.remoteJid as chat. For example, call read_messages to read the context and send_text to answer.
The webhook also delivers the messages that the account itself sends. Ignore the events with key.fromMe equal to true. Without this filter, the agent answers its own messages. For a ready-made support agent, with no server of your own, see AI agents.

Documentation MCP

The ZapperHub documentation also has an MCP server, at https://docs.zapperhub.com/mcp. It lets the agent search this documentation. It needs no key and does not access your instances. Add it to the client in the same way, without the Authorization header. In Claude Code:

See also