跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 Customer.io,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
让你的 AI 使用 Customer.io:查看用户及其属性、分群、活动和消息,分析自动化流程、广播和一次性发送及其指标,并在你确认后发送交易邮件或触发广播。
试试这样问
Customer.io 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Customer.io、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
Customer.io + Gemini
让你的 AI 使用 Customer.io:查看用户及其属性、分群、活动和消息,分析自动化流程、广播和一次性发送及其指标,并在你确认后发送交易邮件或触发广播。
前提条件
完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:
CUSTOMERIO_API_URL, CUSTOMERIO_APP_API_KEY
步骤 1 — 获取凭证
设置大约需要 3 分钟。你需要一个能创建 App API key 的 Customer.io 用户,并且要知道账户托管在美国还是欧盟。
- 在 Customer.io 中打开 Settings → Account Settings → API Credentials → App API Keys(fly.customer.io/settings/api_credentials),点击 Create App API Key。选择工作区和密钥的权限:完全访问,或者在 AI 只需读取和发送时选择只读加发送。
- 立即复制密钥:Customer.io 只显示一次。按原样粘贴到
CUSTOMERIO_APP_API_KEY,不要加 Bearer 前缀。这是 App API key,不是 Track API key。 - 把
CUSTOMERIO_API_URL设为账户所在的数据中心:美国账户用https://api.customer.io,欧盟账户用https://api-eu.customer.io,不要加/v1或其他路径。区域在创建账户时就已确定。 - 安装连接器,先运行
customer_io_list_workspaces:它会检查密钥,并显示工作区及其用户数和消息数。
一个密钥对应整个工作区:App API key 代表的是工作区,而不是某个人。使用这个连接器的人可以看到该密钥能读取的所有用户、分群和消息,所以只把 MCP 服务器分享给有权查看这些数据的人。
覆盖范围:用户(按邮箱查找,或按分群归属和属性值搜索),以及他们的属性、分群、最近 30 天的活动和收到的消息;分群的条件、当前人数和成员;自动化流程(Customer.io API 中称为 campaigns)及其消息指标;通过 API 触发的广播和一次性发送(API 中称为 newsletters)及其指标;整个工作区的投递和活动;以及交易消息模板。
发送前先等你确认:只有两个工具会发送,其余都只读。
customer_io_send_transactional_email发送一封真实邮件(收据、密码重置、通知),to、cc 和 bcc 合计最多 15 个地址,可以使用交易模板,也可以自定主题和正文。AI 会先给你看收件人、主题和内容。customer_io_trigger_broadcast会一次发给很多人。AI 先展示广播、受众人数(customer_io_get_segment_customer_count)和数据,只有在你明确回复 "yes, send" 后才会触发。之后用customer_io_get_broadcast_trigger跟踪进度。
不包含 Track API:识别用户、记录事件和删除用户需要使用 Customer.io 的 Track API,它使用另一套凭证(Site ID 和 Track API key)。本连接器不使用 Track API,因此不能修改用户资料,也不会删除任何人。
限制:App API 每秒约允许 10 个请求。交易邮件共享每 3 秒 3,000 个请求的软限制,广播每 10 秒最多触发一次。较长的列表分页返回,AI 会一直读到最后一页。时间戳为 Unix 秒。
常见错误:401 表示 App API key 错误或已删除,或者账户在另一个区域;请检查 CUSTOMERIO_API_URL。403:密钥的权限不包括此操作,例如用只读密钥发送。404:该 ID 在此工作区中不存在。400 或 422:某个参数或搜索过滤条件无效,错误信息会指出是哪一个。429:达到速率限制,请稍后重试。
本连接器不使用 Track API 和 Pipelines API,不执行导出或导入,不管理 collections、snippets、报告 Webhook 或 ESP 屏蔽列表,也不修改自动化流程和广播的内容。
步骤 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 — 在 Gemini 中添加连接器
你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(
https://cloud.anythingmcp.com/mcp/…)。本指南中出现YOUR_SERVER_ID的地方都用它替换。
Gemini CLI 从 ~/.gemini/settings.json(Windows 上为 %USERPROFILE%\.gemini\settings.json)读取 MCP 服务器。添加:
{
"mcpServers": {
"anythingmcp": {
"httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
"headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
}
}
}
- 在 AnythingMCP 的 MCP Servers → 你的服务器 → API keys 中创建 MCP API 密钥,并用它替换
YOUR_MCP_API_KEY。 - 保存文件并重启
gemini。 - 在 Gemini CLI 中运行
/mcp(或在终端运行gemini mcp list),anythingmcp应显示为已连接。 - 开始输入提示,Gemini CLI 现在可以调用
Customer.io的工具。
可用工具
| Tool | What it does |
|---|---|
customer_io_list_workspaces | List the workspaces of the Customer.io account with their id, name and counts of people, objects and messages sent in the billing period… |
customer_io_find_customers_by_email | Find the people in the workspace with an email address: returns their id, email and cio_id |
customer_io_search_customers | Search people in the workspace with a filter on segment membership and attribute values, up to 1000 per page; returns their identifiers… |
customer_io_get_customer_attributes | Get a person's profile: all attributes (stored as strings), identifiers, subscription preferences, timestamps and devices |
customer_io_get_customer_segments | List the segments a person currently belongs to (id, name, description) |
customer_io_list_customer_activities | List what happened to a person in the last 30 days or more: events, attribute changes, messages attempted, sent, opened, clicked, bounced… |
customer_io_list_customer_messages | List the deliveries sent to a person (newest six months unless start_ts and end_ts are given): message id, automation, broadcast or… |
customer_io_list_campaigns | List the automations (campaigns) of the workspace: id, name, type of trigger, state, active flag, created and updated times, trigger and… |
customer_io_get_campaign | Get one automation (campaign) with its trigger, segments, state, tags and actions (messages, delays, branches) |
customer_io_get_campaign_metrics | Get an automation's message metrics over a window: series of attempted, sent, delivered, opened, clicked, converted, bounced, spammed… |
customer_io_list_broadcasts | List the API-triggered broadcasts of the workspace: id, name, active flag, created and updated times, tags and actions |
customer_io_get_broadcast | Get one API-triggered broadcast: name, state, active flag, created, updated and first started times, tags and actions |
customer_io_get_broadcast_metrics | Get a broadcast's message metrics per period: series of attempted, sent, delivered, opened, clicked, converted, bounced, unsubscribed… |
customer_io_get_broadcast_trigger | Get the status of one broadcast trigger (as returned by customer_io_trigger_broadcast): created, processed and cancelled times, schedule… |
customer_io_list_newsletters | List the one-time sends (newsletters) of the workspace: id, name, type, sent and created times, recipient segments, tags and variant… |
customer_io_get_newsletter_metrics | Get a one-time send's message metrics per period: series of attempted, sent, delivered, opened, clicked, converted, bounced, unsubscribed… |
customer_io_list_segments | List the segments of the workspace (not archived ones): id, name, description, type (data-driven or manual), state, progress and tags |
customer_io_get_segment | Get one segment with its conditions (for data-driven segments), type, state and tags |
customer_io_get_segment_customer_count | Count the people currently in a segment, for example to size a broadcast audience before sending |
customer_io_list_segment_members | List the people in a segment, page by page: their identifiers (id, email, cio_id) |
customer_io_list_messages | List deliveries across the workspace, newest first, filtered by message type, metric (sent, delivered, opened, clicked, bounced… |
customer_io_get_message | Get one delivery by id: recipient, parent automation, broadcast, one-time send or transactional message, subject, template, created, sent… |
customer_io_list_activities | List activities across the workspace, newest first: events, attribute changes and message activity, optionally for one person, one type or… |
customer_io_list_transactional_messages | List the transactional message templates of the workspace (id, name, description, link tracking, body retention) |
customer_io_send_transactional_email | Send one transactional email (receipts, password resets, notifications) to up to 15 addresses in to, cc and bcc, from a transactional… |
customer_io_trigger_broadcast | Trigger an API-triggered broadcast: send it to its default audience set in Customer.io, or to listed emails or ids, per-person data, or… |
示例提示
- “在 Customer.io 中查找 [email protected],显示她的属性、所属分群以及我们最近发给她的邮件。”
- “我们的 Onboarding 自动化流程最近 30 天表现如何:发送、送达、打开、点击和退订各多少?”
- “Trial ending 分群现在有多少人?其中哪些人是 pro 套餐?”
- “触发 Product update 广播,但发送前先告诉我会发给谁、一共多少人。”
FAQ
Gemini CLI 从哪里读取 MCP 服务器? 用户级配置位于 ~/.gemini/settings.json,项目级配置位于项目内的 .gemini/settings.json。gemini mcp list 会列出每个服务器及其连接状态。
下一步
这份指南对你有帮助吗?