跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 Z-API,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
来自巴西的 Z-API WhatsApp 网关:检查实例连接状态,浏览聊天和联系人,验证号码是否开通 WhatsApp,并通过扫码关联的 WhatsApp 号码发送文本、图片和文档消息。
试试这样问
Z-API 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Z-API、粘贴凭证、生成 MCP API key — 完成。无 Docker、无
git clone、无本地服务器。
Z-API
来自巴西的 Z-API WhatsApp 网关:检查实例连接状态,浏览聊天和联系人,验证号码是否开通 WhatsApp,并通过扫码关联的 WhatsApp 号码发送文本、图片和文档消息。
设置
- 在 Z-API 面板(app.z-api.io)中打开 Instances,创建或选择一个实例并点击编辑。将实例 ID 复制到
ZAPI_INSTANCE_ID,将实例令牌复制到ZAPI_INSTANCE_TOKEN。 - 打开 Security 选项卡中的 Account Security Token 模块,点击 Set Up Now,将令牌复制到
ZAPI_CLIENT_TOKEN。然后点击 Activate Token,让每个请求都必须携带该令牌。 - 关联手机:用 WhatsApp(Linked devices)扫描该实例的二维码。号码关联完成之前,所有发送都会失败。
- 先调用
z_api_get_status:connected: false表示需要重新扫描二维码,smartphoneConnected: false表示手机处于离线状态。
Z-API 是第三方网关,它为你的号码运行一个 WhatsApp Web 会话。它不是 Meta 官方的 WhatsApp Business API,WhatsApp 可能会限制群发消息的号码。电话号码只能包含数字,需带国家代码和区号,不含 +、空格或连字符(5511999999999)。发送类工具会发出真实的 WhatsApp 消息:请先确认收件人和内容,已返回 messageId 的发送切勿重试。如果你在 Z-API 的 Security 选项卡中开启了 IP 限制,请将 AnythingMCP 的出站地址加入允许列表。
前提条件: ZAPI_INSTANCE_ID, ZAPI_INSTANCE_TOKEN, ZAPI_CLIENT_TOKEN
本地安装连接器
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
打开 http://localhost:3000/connectors/store,选择 Z-API 并填入前提条件中列出的环境变量。
可用工具
| Tool | What it does |
|---|---|
z_api_get_status | Check whether the Z-API instance is linked to a WhatsApp account and whether the phone is online |
z_api_get_instance | Get the Z-API instance name, connection flag, payment status and expiry date (Unix timestamp in due) |
z_api_get_device | Get the phone linked to the instance: its number, profile name, device model and whether it is a WhatsApp Business account |
z_api_check_phone_exists | Check whether a phone number has a WhatsApp account |
z_api_list_chats | List the WhatsApp chats of the linked number (people and groups) with phone or group ID, name, unread count and last message time |
z_api_get_chat | Get metadata of one chat: unread count, last message time, mute and spam flags, profile status and notes (WhatsApp Business only) |
z_api_list_contacts | List WhatsApp contacts known to the linked number, including people from shared groups, with phone, saved name and WhatsApp profile name |
z_api_list_queue | List messages still waiting in the instance's send queue, with phone, text and IDs |
z_api_send_text | Send a WhatsApp text message to a contact or group from the linked number |
z_api_send_image | Send an image by public HTTPS URL to a contact or group, with an optional caption |
z_api_send_document | Send a document (PDF, XLSX, DOCX...) by public HTTPS URL to a contact or group |
下一步
这份指南对你有帮助吗?