Klaviyo connector for Claude Code

Use Porter’s Klaviyo connector for Claude Code to pull campaigns, flows and email results into your terminal, then turn them into files, scripts and scheduled reports in your own project.

  • Save Klaviyo campaign results as CSV in your repo
  • Check drafts and scheduled campaigns before they send
  • Run a weekly email report from a script
  • Join email revenue with your ad spend
G2★★★★★Rated 4.6/5 from 288 G2 reviews (October 2026) · Used by 1,600+ marketing teams and agencies

By · Last updated November 26, 2026

Claude Codeporter connected
List last month’s Klaviyo campaigns with Campaign Name and Campaign Channel and save them to reports/klaviyo-campaigns.csv
porter / Klaviyo / Trailgear Demo✓ 4 rows
Saved reports/klaviyo-campaigns.csv with 4 campaigns. The Black Friday early access email drove the most revenue.
CampaignChannelStatus
Black Friday early accessEmailSent
New tents dropEmailSent
Trail tips SMSSMSSent
Winter saleEmailScheduled
Demo data, Trailgear Demo account
Campaigns, flows and profiles
01Setup

How to connect Klaviyo to Claude Code

Connecting Klaviyo to Claude Code takes 3 steps and no API keys: connect your Klaviyo accounts in Porter with a Klaviyo private API key, add Porter’s MCP server to Claude Code with one command, then sign in from /mcp and ask. The same server also works in Cursor, VS Code and Codex, as Porter’s Klaviyo MCP server page shows. Using the Claude app instead? See the Klaviyo connector for Claude.

Before you start

  • You need Claude Code installed (Anthropic’s Claude Code overview), a free Porter account and a Klaviyo private API key.
  • Works with any Claude model in Claude Code, from Opus to Sonnet and Haiku.
  1. Step 1: Connect Klaviyo in Porter

    Sign up free at Porter, pick Klaviyo as the source and sign in with a Klaviyo private API key. Tick every account you want Claude Code to read.

  2. Step 2: Add Porter to Claude Code

    In your terminal, run this command. It adds Porter for every project on your machine; drop --scope user to add it to the current project only.

    Terminal
    claude mcp add --transport http --scope user porter https://mcp.portermetrics.com/mcp

    Or, inside Claude Code, install Porter’s plugin, which adds the server and Porter’s skill together: /plugin marketplace add portermetrics/porter, then /plugin install porter-metrics@portermetrics.

  3. Step 3: Sign in and ask

    Start claude, type /mcp, pick porter and sign in with the Google account you use in Porter. When porter shows as connected, paste this prompt:

    Prompt
    Which Klaviyo accounts can you see? List campaigns sent last month with Campaign Name, Campaign Channel and Campaign Status, and save them to reports/klaviyo-campaigns.csv.

Guides and videos

app.portermetrics.com / create
Porter's Klaviyo authorization form with the account name and private API key fields
First, name the account and paste a Klaviyo private API key.
Porter's Select accounts window for Klaviyo with the connected account
Then, pick the Klaviyo accounts Claude can read and save.
$ claude mcp add --transport http --scope user porter https://mcp.portermetrics.com/mcp

$ claude mcp list
porter: https://mcp.portermetrics.com/mcp (HTTP)
Then, add Porter's MCP server from your terminal.
> /mcp
porter · needs authentication → Authenticate

> Which Klaviyo accounts can you see?
● porter - list_accounts (MCP)
Trailgear Demo
After you sign in from /mcp, Claude Code lists your Klaviyo accounts.
02Use cases and prompts

What you can do in Claude Code

Claude Code works inside your project, so Klaviyo answers can become files, scripts and dashboards instead of chat replies. Each use case has a prompt to copy and uses the Klaviyo fields Porter reads.

Can Claude Code export Klaviyo campaigns?

The problemKlaviyo reports export per campaign and need cleanup.

What Claude Code doesClaude Code lists campaigns with Campaign Name, Campaign Channel, Campaign Status and their results through Porter and writes them to a CSV.

What you getA clean campaign file in your repo, ready for analysis.

Prompt
For each connected Klaviyo account, list campaigns sent last month with Campaign Name, Campaign Channel, Campaign Status and their results, and save them as data/klaviyo-campaigns.csv.

Which Klaviyo campaigns are still in draft or scheduled?

The problemA scheduled send with the wrong audience is easy to miss.

What Claude Code doesClaude Code lists campaigns where Campaign Status is draft or scheduled with their channel and send time.

What you getA pre-send checklist in one file.

Prompt
List Klaviyo campaigns where Campaign Status is draft or scheduled, with Campaign Name, Campaign Channel and Campaign Scheduled time, and save them to reports/klaviyo-upcoming.md.

Can I schedule a Klaviyo report with Claude Code?

The problemKlaviyo shows each campaign on its own, so the weekly email recap means opening them one by one.

What Claude Code doesEach Monday claude -p compares campaigns sent and their results with the week before and picks the top 3 campaigns.

What you getreports/klaviyo-weekly.md naming the emails that worked this week.

Prompt
claude -p "Compare last week with the week before in Klaviyo: campaigns sent, their results and the top 3 campaigns. Write it to reports/klaviyo-weekly.md" --allowedTools "mcp__porter" "Write"

Can Claude Code compare Klaviyo revenue with my ad spend?

The problemEmail and paid media report revenue in different places.

What Claude Code doesClaude Code pulls Klaviyo results and spend from your connected ad platforms through the same porter server and writes one table by week.

What you getEmail and paid revenue side by side.

Prompt
For the last 8 weeks, pull weekly Klaviyo campaign results and weekly spend from Meta Ads and Google Ads, and save one table by week to reports/email-vs-paid.csv.
03Why Porter

Why Porter for Klaviyo in Claude Code

Klaviyo’s own MCP server covers Klaviyo alone. Porter puts Klaviyo next to Shopify, your ad platforms and 30+ other sources behind the same server.

✓

One server for all your sources

The same porter server answers about Klaviyo, Meta Ads, Google Ads, GA4 and Shopify, so one script can pull every channel.

⊞

Changes only after you approve

Claude Code can make changes through Porter where the platform allows them, and each change waits for your yes.

⚙

One key, kept in Porter

Your Klaviyo private API key lives in Porter, not in your project or terminal history.

↻

Hosted dashboards when a file isn’t enough

Ask for a Porter AI dashboard and it is published at its own link, synced automatically and ready to share with a client.

04Dashboard

Dashboard template

One prompt to the Klaviyo connector gets you a live dashboard in Claude: campaigns, flows and lists from your account. For a shared report your team opens every week, copy one of Porter’s free Klaviyo dashboard templates instead.

AI dashboards

Build a live Klaviyo dashboard from your terminal

Describe the dashboard in one sentence and Porter builds it. A client-ready dashboard in minutes, with no chart dragging and no BI tool to learn. Ask Claude Code:

Prompt
Build a live Klaviyo dashboard for my account with the last 30 days, the main KPIs and a weekly trend.
Live URLEach dashboard at its own link: no login, no app, no download
Auto-syncFresh Klaviyo data, nobody re-exports each period
Scheduled deliveryEmail or PDF sends on a set day
White labelYour logo and branding for clients
Sharing permissionsView or edit access per person
Klaviyo dashboard template by Porter
Template

The Klaviyo AI dashboard template

Start from Porter’s official Klaviyo dashboard template, or run the prompt above in Claude Code and Porter publishes the dashboard at its own link.

05Pricing

Pricing

You can start free, since Porter’s Klaviyo connector for Claude comes with every plan. Use the calculator for your number of accounts, or see Porter pricing for every plan.

What you get

  • Free plan: never expires, with unlimited connected accounts and the last 15 days of data in Claude (30 days in Data Studio and Sheets)
  • Reporting: from $12.50 per account a month billed annually, or $15 month to month for one account
  • Billing: each Klaviyo account counts as one account, with volume discounts and no per-seat fee
  • Changes: 1 AI credit per completed change; failed tasks are free, and the Free plan includes 100 credits a month
  • Trial: 14 days of full access, no card

Price calculator

$33.33/mo$6.67 per account

An account is one ad account, Stripe account, store, page or GA4 property. The Free plan never expires and has unlimited accounts, with the last 15 days of data in AI chats.

06Data and actions

Klaviyo data and actions in Claude Code

Through the Klaviyo connector, Claude reads 83 fields across campaigns, flows, lists and profiles. Actions let it read segments, metrics and events, as well as draft campaigns, templates, lists and profiles. The full list of Klaviyo fields also has every label and ID.

The 13 Klaviyo fields Claude uses most

FieldWhat it's for
Campaign NamecampaignNameNaming each send in answers
Campaign ChannelcampaignChannelEmail, SMS or push
Campaign StatuscampaignStatusDraft, scheduled or sent
Campaign Send TimecampaignSendTimeSend calendar (comes back as YYYYMMDD)
Campaign Scheduled AtcampaignScheduledAtUpcoming sends
Campaign Is Tracking Opens · Campaign Is Tracking ClickscampaignIsTrackingOpens · campaignIsTrackingClicksPre-send tracking check
Campaign Is Add UTMcampaignIsAddUTMUTM check before a send
Campaign Use Smart SendingcampaignUseSmartSendingSmart Sending check
Flow NameflowNameFlow inventory
Flow StatusflowStatusLive, draft or manual
Flow Trigger TypeflowTriggerTypeGrouping flows by trigger
List NamelistNameList cleanup
Account NameaccountNameComparing client accounts

Can Claude send Klaviyo campaigns, edit flows or build segments?

Yes, for campaigns, templates, lists and profiles. Claude can draft and update campaigns and templates, as well as create and rename lists. In addition, it can add up to 1,000 profiles to a list at a time, or remove them. It can also create or update profiles and track custom events.

Sending, scheduling and deleting campaigns, and deleting lists, follow the approval steps in the security section. For flows and segments, use Klaviyo's builder or Klaviyo's own connector.

Which Klaviyo numbers can't Claude get yet?

Claude counts opens and clicks from raw events (use case 3), and Klaviyo's own connector adds Klaviyo's campaign and flow report tools for sends, open rate, conversion value and revenue per recipient. Porter's Klaviyo fields cover campaigns, flows, lists and profiles.

Predicted CLV, churn and order-count fields return 0 for now, while event and subscription fields return errors or blanks.

How fresh is the Klaviyo data in Claude?

Porter answers from stored Klaviyo tables and tells Claude when they last refreshed. Event actions, however, read Klaviyo live. Klaviyo's app groups results by send date, while events are dated when they happened (Klaviyo's note on send date vs event date).

Product stats

WhatKlaviyo connector
Fields83 across campaigns, flows, lists and profiles
ActionsRead segments, metrics and events; draft and update campaigns and templates; create lists; add or update profiles, up to 1,000 per list at a time
FreshnessStored Klaviyo tables with their last refresh time; event actions read Klaviyo live
HistoryEvery campaign, flow and list in the account, plus profiles stored since the first sync; 30 days on the Free plan, 15 in AI chats
Rate limitsKlaviyo allows 3 requests a second on Tier S, and events are read page by page, so large sends take longer
Report metricsNot yet: sends, opens, clicks, open rate, conversion value and revenue per recipient
AccessPrivate API key from an Owner or Admin: Read-only to analyze, Full Access or write access for drafts

See all 83 Klaviyo fields

07Security

Is it safe?

Yes, if you pick the right key. Reading never changes your Klaviyo account. Before the Klaviyo connector creates anything, Claude asks you, then asks again before a send or delete. With a Read-only private API key, your account stays exactly as you set it, and profile data such as emails reaches Claude only when you ask.

How Claude asks before changing Klaviyo

Claude shows the draft or change first, and nothing runs until you approve it. Sending a campaign, deleting a campaign and deleting a list are permanent, so Claude asks twice before each one. A sent email stays sent, while a deleted list's profiles stay in Klaviyo.

What the connector needs from Klaviyo

Porter needs a private API key (pk_…) created by an Owner or Admin (Klaviyo user roles). If you only analyze, use Read-only access. For drafts, use Full Access or write access to campaigns, templates, lists and profiles instead.

To change access later, create a new key, since Klaviyo fixes a key's scopes when you create it (Klaviyo's note that key scopes can't be edited). When you want to cut access, delete the key in Klaviyo. Profile fields include emails and phone numbers, so only ask for what you need.

08FAQ

FAQ

Answers on setup, scope, scripts and credits, plus fixes for the most common Claude Code errors with Klaviyo. Setup questions every source shares, like where Claude Code saves the server and how to share it with your team, are in the Claude Code hub FAQ.

Can I add Shopify sales to the Klaviyo report?

Yes. Connect Shopify in Porter and ask for Net Sales next to campaign results. Claude Code reads both through one server and writes one file.

Can I report several Klaviyo accounts?

Yes. Each account connects in Porter with its own private API key, so Claude Code can report them together or one at a time.

Do Claude Code questions use Porter credits?

Reading Klaviyo data uses no AI credits. Each completed change, such as a change, uses 1 credit, and every Porter account gets 100 free credits a month.

Troubleshooting

Why does /mcp show porter as needing authentication?

Claude Code adds the server before you sign in. Pick porter in /mcp, choose Authenticate and sign in with the Google account you use in Porter.

Why does my claude -p script stop and ask for permission?

Scripts can’t answer permission prompts. Pass the tools the script may use, for example --allowedTools "mcp__porter" "Write", so Claude Code can read Porter and save files without stopping.

Why does Claude Code see my account but return no data?

Usually the private API key is missing a read scope, or the range had no sends. Create a key with read access in Klaviyo, reconnect in Porter, then ask again.

09Next

More Claude connectors

Klaviyo rarely runs alone, because store data and other channels usually sit next to it. Porter connects each of them to Claude the same way as the Klaviyo connector. Then pick the sources your team reports on from all Claude connectors, compare reporting tools, or start a client report from a template.

Not only Claude. Send Klaviyo data anywhere

The same Porter account and connection also send Klaviyo data to these destinations, at no extra cost.

Try the connector in Claude Code

Porter’s Klaviyo connector for Claude Code takes one command, so your first campaign file can land in your project today.

Free plan · 14-day trial · No card needed

Email and lifecycle marketers: campaign results and pre-send checks land in one file.

E-commerce marketers: email revenue sits next to paid media.

Agencies: one script builds the weekly email report for every client.