连接器指南阅读约 4 分钟17 个 MCP 工具7 种语言

如何通过 MCP 将 Zalo Official Account 连接到 Cursor

Zalo Official Account(越南):OA 资料和消息配额,关注者和用户及其详情和标签,最近的聊天和会话,含文本或图片的咨询消息,以及 OA 的文章。使用手动粘贴的 OA 访问令牌,有效期约 25 小时。

HC作者:HelpCode 团队更新于 4 分钟阅读 在 GitHub 开源

无需信用卡 · 7 天试用 · 提供自托管方案

Zalo Official Account

Zalo Official Account

Zalo Official Account (Vietnam): OA profile and message quota, followers and users with their details and labels, recent chats and conversations, consultation messages with text or an image, and the OA's articles. Uses a pasted OA access token, valid about 25 hours.

个工具

17

区域

INTL

类别

即时通讯

身份验证

API Key

所需环境变量

ZALO_OA_ACCESS_TOKEN
在 Cloud 上一键安装

7 天免费试用 · 无需信用卡

  • 7 天免费试用
    无需信用卡
  • 符合 GDPR,SOC 2 就绪
    数据驻留欧盟,审计日志
  • 在 GitHub 开源
    开源 · AGPL-3.0
  • 支持 ChatGPT、Claude、Gemini
    任何兼容 MCP 的客户端

跳过安装。2 分钟内即可运行。

在 cloud.anythingmcp.com 开始免费试用,一键添加 Zalo Official Account,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。

开始免费试用

摘要

Zalo Official Account(越南):OA 资料和消息配额,关注者和用户及其详情和标签,最近的聊天和会话,含文本或图片的咨询消息,以及 OA 的文章。使用手动粘贴的 OA 访问令牌,有效期约 25 小时。

试试这样问

Zalo Official Account 的示例提示

点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。

Zalo Official Account · 通过 MCP 实时
分享
Opus 4.7

Claude 是 AI,可能会出错。请核对回答。

💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Zalo Official Account、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无 git clone、无本地服务器。

Zalo Official Account + Cursor

Zalo Official Account(越南):OA 资料和消息配额,关注者和用户及其详情和标签,最近的聊天和会话,含文本或图片的咨询消息,以及 OA 的文章。使用手动粘贴的 OA 访问令牌,有效期约 25 小时。

前提条件

完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:

ZALO_OA_ACCESS_TOKEN

步骤 1 — 获取凭证

设置大约需要 5 分钟,令牌需要每天更新(见下文)。你需要一个 Zalo Official Account,以及一位负责批准权限的 OA 管理员。

  1. 在 https://developers.zalo.me 创建应用或打开你的应用,将其关联到你的 Official Account,并在 Official Account > OA permissions 下申请连接器使用的权限组:OA 信息管理、用户信息管理、用户消息管理、通过 OA 发送消息和通知,以及文章管理。由 OA 管理员批准。
  2. 打开 Tools > API Explorer(https://developers.zalo.me/tools/explorer),选择你的应用,访问令牌类型选择 OA Access Token,选择 OA,允许所请求的权限,然后复制 access token。
  3. 把它粘贴到 ZALO_OA_ACCESS_TOKEN。它通过 Zalo 要求的 access_token 请求头发送。
  4. 安装连接器并运行 zalo_oa_get_oa_info 进行检查。

令牌有效期约 25 小时。 Zalo 只通过自己的 OAuth v4 流程更新 OA 访问令牌,而 AnythingMCP 无法为此连接器运行该流程,因此需要手动粘贴令牌。当调用返回错误 -216 或 -220 时,请在 API Explorer 中创建新令牌,并保存到连接器设置中。如果你在自己的系统中更新令牌,可以通过 AnythingMCP API 把每个新令牌写入 ZALO_OA_ACCESS_TOKEN。

可读取的内容:OA 资料(名称、ID、认证状态、关注者、服务套餐)及其消息配额;关注 OA 或与 OA 聊过天的用户,每页 50 个,可按标签、最近互动或关注状态筛选;单个用户的名称、别名、关注状态、最近互动日期、标签、备注和共享信息;OA 的标签;所有聊天中的最新消息以及与某个用户的消息,每次调用 10 条;以及 OA 的文章和视频及其正文。

可写入的内容:用户详情(别名、你自己的客户 ID 和共享信息)和标签:AI 可以给用户打上标签(标签不存在时会先创建),也可以移除标签。zalo_oa_send_text 发送一条咨询文本,可引用用户的消息;zalo_oa_send_image 发送一条带一张图片的咨询消息。两者都会送达真实的人,因此 AI 会先展示文本并等你同意。

何时可以发送咨询消息:只能发给过去 7 天内与 OA 互动过的用户。自 2026 年 1 月 1 日起,在用户最近一次互动后 48 小时内发送的咨询消息免费且不限量;之后发送的消息会消耗 OA 套餐配额或需要付费。zalo_oa_get_user_quota 会告诉 AI 还能给某个用户发送什么。错误 -230 或 -232 表示用户最近一次互动距今太久,-213 表示用户未关注 OA。

安装时关闭:zalo_oa_delete_tag,它会从 OA 以及所有带有该标签的用户身上移除该标签,且无法撤销。

格式:每个响应都有 error(0 = 成功)和 message,数据在 data 中;错误以 HTTP 200 和负数的 error 返回。用户、OA 和消息 ID 都是很长的数字字符串。在消息中,用户发送的消息 src 为 1,OA 发送的为 0。消息时间为 Unix 毫秒,user_last_interaction_date 的格式为 dd/MM/yyyy。

限制:每个应用每分钟 4,000 次请求,另有取决于 OA 套餐的单个 OA 限制;错误 -32 表示需要等到下一分钟。用户列表最多覆盖前 10,000 个用户。

常见错误:-216 或 -220 表示令牌无效或已过期(请粘贴新令牌),-223 表示 OA 尚未向应用授予某项权限,-224 表示 OA 套餐不包含某项功能,-201 表示参数无效,-211 表示配额已用完。

连接器不会发送交易、促销或 ZNS 模板消息,也不会发送文件或贴纸,不涵盖群聊、通话、文章创建或 OA 商店。Webhook 在 Zalo 应用设置中配置。

步骤 2 — 安装 adapter

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

步骤 3 — 在 Cursor 中添加连接器

你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(https://cloud.anythingmcp.com/mcp/…)。本指南中出现 YOUR_SERVER_ID 的地方都用它替换。

Cursor 从 ~/.cursor/mcp.json 读取 MCP 服务器。添加以下条目:

{
  "mcpServers": {
    "anythingmcp": {
      "url": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
      "headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
    }
  }
}
  1. 在 AnythingMCP 的 MCP Servers → 你的服务器 → API keys 中创建 MCP API 密钥,并用它替换 YOUR_MCP_API_KEY。
  2. 保存文件并重启 Cursor。
  3. 打开 Cursor → Settings → MCP,确认 anythingmcp 已列出并处于已连接状态。
  4. 开始对话,智能体现在可以调用 Zalo Official Account 的工具。

可用工具

ToolWhat it does
zalo_oa_get_oa_infoProfile of the Official Account the token belongs to: OA id (oaid), name, description, alias, verification status, OA type, category…
zalo_oa_get_quotaMessage quota of the OA or the app: one row per quota asset with the product type (cs = consultation, transaction), the quota source…
zalo_oa_get_user_quotaWhat the OA can still send to one user: the time of the user's last interaction with the OA (last_interaction, Unix milliseconds) and the…
zalo_oa_list_usersPage through the users who interacted with the OA (followers and people who messaged it)
zalo_oa_filter_usersPage through the OA's users with filters: by label (tag), by when they last interacted, or by whether they follow the OA
zalo_oa_get_userDetails of one user: display name, alias, your own customer id (user_external_id), whether the user follows the OA, last interaction date…
zalo_oa_update_userUpdate what the OA stores about a user: the alias, your own customer id (user_external_id, unique per user) and the shared information…
zalo_oa_list_tagsAll labels (tags) defined in the OA, as a list of label names
zalo_oa_tag_userPut a label on a user
zalo_oa_untag_userRemove a label from one user
zalo_oa_delete_tagDelete a label from the OA, which also takes it off every user who has it
zalo_oa_list_recent_chatsThe latest messages across all of the OA's conversations, newest first: sender and recipient ids and names, direction (src 1 = from the…
zalo_oa_get_conversationMessages between the OA and one user, newest first, 10 at most per call: message_id (use it as quote_message_id to reply), direction…
zalo_oa_send_textSend a consultation (customer care) text message from the OA to a user, optionally as a reply quoting one of the user's messages
zalo_oa_send_imageSend a consultation message with one image (JPG or PNG, at most 1 MB, best at 16:9) and an optional caption
zalo_oa_list_articlesThe OA's published content: articles (type normal) or videos (type video), with id, title, status, views, shares, creation and update…
zalo_oa_get_articleOne article with its title, author, cover, description, status, comment setting and body blocks (text, images, videos)

示例提示

  • “过去 24 小时有哪些用户给 OA 发了消息?他们问了什么?”
  • “显示我和这位用户的对话,并为对方最后一个问题起草回复。”
  • “给本周所有询问过配送问题的用户打上 delivery-question 标签。”
  • “OA 还剩多少咨询消息配额?”
  • “列出 OA 浏览量最高的五篇文章。”

FAQ

Cursor 免费套餐支持自定义 MCP 服务器吗? 支持,Hobby、Pro 和 Business 套餐均可使用 MCP。

下一步

这份指南对你有帮助吗?

你的 Zalo Official Account 智能体只差一次点击。

安装连接器,粘贴密钥,向 Cursor 提问。免费试用 7 天,无需信用卡。

相关指南

连接器

如何通过 MCP 将 Zalo Official Account 连接到 ChatGPT

Zalo Official Account(越南):OA 资料和消息配额,关注者和用户及其详情和标签,最近的聊天和会话,含文本或图片的咨询消息,以及 OA 的文章。使用手动粘贴的 OA 访问令牌,有效期约 25 小时。

连接器

如何通过 MCP 将 Zalo Official Account 连接到 Claude

Zalo Official Account(越南):OA 资料和消息配额,关注者和用户及其详情和标签,最近的聊天和会话,含文本或图片的咨询消息,以及 OA 的文章。使用手动粘贴的 OA 访问令牌,有效期约 25 小时。

连接器

如何通过 MCP 将 Zalo Official Account 连接到 Microsoft Copilot

Zalo Official Account(越南):OA 资料和消息配额,关注者和用户及其详情和标签,最近的聊天和会话,含文本或图片的咨询消息,以及 OA 的文章。使用手动粘贴的 OA 访问令牌,有效期约 25 小时。

连接器

如何通过 MCP 将 Zalo Official Account 连接到 Gemini

Zalo Official Account(越南):OA 资料和消息配额,关注者和用户及其详情和标签,最近的聊天和会话,含文本或图片的咨询消息,以及 OA 的文章。使用手动粘贴的 OA 访问令牌,有效期约 25 小时。

连接器

如何通过 MCP 将 Zalo Official Account 连接到 Meta Muse

Zalo Official Account(越南):OA 资料和消息配额,关注者和用户及其详情和标签,最近的聊天和会话,含文本或图片的咨询消息,以及 OA 的文章。使用手动粘贴的 OA 访问令牌,有效期约 25 小时。

连接器

Zalo Official Account 接入 MCP:在任意 AI 智能体中管理关注者、会话、咨询消息和文章

Zalo Official Account(越南):OA 资料和消息配额,关注者和用户及其详情和标签,最近的聊天和会话,含文本或图片的咨询消息,以及 OA 的文章。使用手动粘贴的 OA 访问令牌,有效期约 25 小时。