Skip to main content
MCP server CX Codex

mcp-z-api — Claude Code MCP server: WhatsApp via Z-API

An MCP server that lets your agent send WhatsApp messages through a Z-API instance: text, media, contacts and groups.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add mcp-z-api -e ZAPI_TOKEN=<ZAPI_TOKEN> -- npx -y @codespar/mcp-z-api
Open on GitHub

What mcp-z-api does

The package sits between the agent and Z-API and exposes 27 tools. An agent can fire off text, an image, a document or audio, pull the contact list, test whether a number is on WhatsApp, and read a contact's avatar and metadata. Another set covers chats and groups: paged chat listing, marking things read, creating a group, adding or removing members, fetching group metadata.

Interactive payloads are there too — a button list, the native option list, and CALL, URL or REPLY action buttons. Labels let you tag a chat and enumerate the tags. Z-API authenticates with an instance ID and a token that travel inside the request URL.

Sign up at the Z-API developer portal and copy your instance ID and token first; without them the server has nothing to talk to. The platform configs shown below only carry ZAPI_TOKEN, so check Z-API's docs for how the second value is passed. MIT licensed, shipped as the npm package @codespar/mcp-z-api.

What it helps with

  • send a WhatsApp message or file from inside an agent session
  • verify a number is on WhatsApp before you message it
  • page through chat and group lists
  • spin up a group and add members to it
  • mark messages read or delete them

Example prompts for the agent

  • Send a WhatsApp text to the number listed in contacts.json
  • Check whether that number has WhatsApp and fetch its profile picture
  • Create a group called Project and add two participants

How to install mcp-z-api

Platform CLI

claude mcp add mcp-z-api -e ZAPI_TOKEN=<ZAPI_TOKEN> -- npx -y @codespar/mcp-z-api

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about mcp-z-api

How do I install mcp-z-api in Claude Code?

Run claude mcp add mcp-z-api -e ZAPI_TOKEN=<ZAPI_TOKEN> -- npx -y @codespar/mcp-z-api. Alternatively use claude mcp add --env ZAPI_TOKEN=<ZAPI_TOKEN> --transport stdio z-api -- npx -y @codespar/mcp-z-api.

What does mcp-z-api do?

It wires Z-API's WhatsApp tools into your agent: sending messages and media, contacts, chats, labels, groups, plus interactive lists and buttons.

What do I need before it works?

A Z-API instance — an account at the developer portal plus its instance ID and token. Tools have no WhatsApp connection without a live instance.

Similar MCP servers

All MCP servers for Automation and no-code: n8n, Zapier, Make →

From the same set40

mcp-worldpay An MCP server over Access Worldpay: authorize, capture, refund, tokenize cards and handle disputes from inside an AI agent. CX Codex +1 ★ 274repo stars mcp-whatsapp-cloud An MCP server for the WhatsApp Cloud API. Your agent sends messages, media and templates through Meta's Graph API directly. CX Codex +1 ★ 274repo stars mcp-unico Adds Unico verification tools to your agent: CPF/CNPJ checks, document OCR, face matching, PEP and court-record screening. The default endpoint no longer resolves, so it only runs against your own URL. CX Codex +1 ★ 274repo stars mcp-twilio Wires Twilio into your agent: SMS and WhatsApp sending, outbound calls, Verify codes for 2FA, and phone validation through Lookups. CX Codex +1 ★ 274repo stars mcp-tiny Wires Tiny ERP into your coding agent: 21 tools for products, stock, warehouses, orders, NF-e invoices and receivables. Useful when ERP data should be reachable from chat. CX Codex +1 ★ 274repo stars mcp-stripe-acp Wires Stripe into your agent: ACP checkout, payment links, invoices, subscriptions and the product catalog. Useful when the agent has to build a cart or finish a purchase. CX Codex +1 ★ 274repo stars mcp-stone An MCP server that puts Stone Open Bank inside your coding agent: payments, Pix, transfers, receivables. Useful when the assistant has to move money, not just draft code for it. CX Codex +1 ★ 274repo stars mcp-siigo Gives your agent Siigo tools for invoices, credit notes, customers and products, with DIAN e-invoicing built in. CX Codex +1 ★ 274repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor