Connect Klaviyo to Claude Code
Klaviyo in Claude Code
Claude Code reads the Klaviyo data of one Adrails workspace through the MCP server, from the terminal, in the project you are working in. It reads daily totals for your campaigns and flows, messages received, opened and clicked, unsubscribes, and the revenue Klaviyo attributes to its own sends. Nothing writes back to Klaviyo, and each figure keeps its source and currency, so a Klaviyo figure sits next to Meta Ads spend without being mixed into it.
Reviewed Oct 4, 2026
Klaviyo tools
What Claude Code can ask Adrails about Klaviyo
| Tool | What it returns | Example question |
|---|---|---|
| metrics_daily | The daily series the integrations measure, with emails received, opened and clicked on the marketing side; without a metric list it returns everything measured, which is how to discover the names | How many emails went out last week, and how many were opened and clicked? |
| business_review | A check of a calculation you state, such as a blended revenue note, where every number must quote a tool result or your own words from this connection's history | Does my blended revenue note count Klaviyo revenue and Meta revenue twice? |
| integrations_status | What the workspace has connected, what each source can do and how fresh each of its data streams is | When was Klaviyo last read, and is the connection healthy? |
| workflows_preview | A preview of one automation source, such as the Email revenue template's read of Klaviyo, without sending a message or applying anything | Preview what the Email revenue automation would report today. |
From the Adrails MCP tools reference and the Klaviyo integration documentation on 4 October 2026.
01
What Claude Code reads from Klaviyo
Klaviyo is connected once in Adrails, under Integrations, by pasting a private API key created in Klaviyo as a Read-Only Key. Adrails reads daily totals for your campaigns and flows, messages received, opened and clicked, unsubscribes, and the revenue Klaviyo attributes to its own sends, and Claude Code reaches the same data through the MCP server, with your sign-in and inside the one workspace you chose.
In Claude Code, the Klaviyo reads come from 4 tools: metrics_daily, business_review, integrations_status and workflows_preview. The table above says what each one returns and gives a question to type as it is. Every result comes back twice, as exact data for the model and as a readable table for you, so a figure Claude Code states can be traced to the call that produced it.
02
Connect Claude Code
Claude Code adds remote MCP servers from the command line. By default the server is added for the current project only; --scope user adds it for every project, and --scope project writes it to a .mcp.json file at the project root that your team can share through version control. If the browser does not open for the sign-in, copy the address Claude Code prints and open it yourself.
Every client uses the same server URL, https://adrails.ai/api/mcp, and the same sign-in: Claude Code registers itself, you sign in to Adrails, then choose the workspace and the permissions on the consent screen. Klaviyo needs nothing on the Claude Code side, since it is already connected in that workspace under Integrations.
- 1. From your project directory, run claude mcp add --transport http adrails https://adrails.ai/api/mcp
- 2. In Claude Code, run /mcp, select adrails and authenticate
- 3. Your browser opens Adrails: sign in, choose the workspace and the permissions, and choose Allow access
- 4. Return to Claude Code and ask your first question
03
Three questions to start with
Ask in your own words: Claude Code picks the tool, Adrails returns the figures, and Claude Code's model does the reasoning, so a tool call uses no agent credit. Each result carries the exact data in structuredContent.result and the same figures as readable tables.
A result is at most 256,000 bytes, so a long history is asked for in shorter ranges or pages. metrics_daily, business_review, integrations_status and workflows_preview are the tools Claude Code reaches for; the table above shows what each returns.
- How many emails went out last week, and how many were opened and clicked?
- What revenue does Klaviyo attribute to its sends this month, next to what Meta attributes?
- Does my blended revenue note count Klaviyo revenue and Meta revenue twice?
04
What stays out of reach
No tool writes to Klaviyo. Adrails never writes to Klaviyo: it sends no message, edits no flow and works from a read-only key. The write permissions the consent screen can offer concern ad accounts, integrations, automations, Knowledge and campaign drafts, and none of them reaches Klaviyo.
Each source and currency stays separate in every result: a Klaviyo figure is never added to a Shopify, Stripe or Meta Ads one, never converted, and always named with its source, so Claude Code can set them side by side but cannot blur them into one total.
A read covers the whole workspace, every ad account and integration it has, and never another workspace. Klaviyo data arrives as daily totals for campaigns and flows, never as individual recipients, so Claude Code sees counts and revenue, not people.
05
Permissions, cadence and limits
Read workspace data, the one permission every connection needs, covers every integration of the workspace, Klaviyo included. No write permission exists for Klaviyo, so a member and an owner read the same data, and Claude Code lists no tool that could change it.
Klaviyo is read every 6 hours, as daily totals for your campaigns and flows. Klaviyo attributes revenue to its own sends, so its figure and the revenue Meta attributes are two measurements, never one total.
Calls on one connection run one at a time, at most 60 a minute per access token, and a connection works in the one workspace you chose at consent: to work in another, connect Claude Code again and choose it. Revoke Claude Code under Your connections on the MCP page in Adrails; removing the server in Claude Code does not revoke it there.
Go further
Read more
- Claude Code integrationClaude Code with Adrails: setup, the 63 tools and the controls, for every source of the workspace.
- Klaviyo in AdrailsThe Klaviyo connector: the read-only key, the message and revenue metrics it reads, and why its revenue keeps its source.
- Connect an AI clientEvery client, step by step, then how to check the connection.
- MCP tools referenceEvery tool, its inputs and who can call it.
FAQ
Common questions
Does Claude Code need an API key for Klaviyo?
No. Klaviyo is connected once in Adrails, under Integrations, by pasting a private API key created in Klaviyo as a Read-Only Key. Claude Code signs in to Adrails with OAuth, with no client ID or secret to copy, and tool results never contain provider credentials or Adrails tokens.
Can Claude Code change my Klaviyo data?
No. Adrails never writes to Klaviyo: it sends no message, edits no flow and works from a read-only key. Claude Code may still ask for your permission in the terminal before a tool call; that governs the call, and the call only reads.
How fresh is the Klaviyo data?
Klaviyo is read every 6 hours, as daily totals for your campaigns and flows. integrations_status returns how fresh each data stream is, so Claude Code can check the last read before quoting a figure.
Can I connect several Klaviyo accounts?
A Claude Code connection reads every integration of the workspace it was given, Klaviyo included, and never another workspace's. To read another workspace's Klaviyo data, connect Claude Code again and choose that workspace.