Code Kit v5.2 is out, optimized for Claude Opus 4.7.
Claude FastClaude Fast
MCP & Extensions

Klaviyo MCP for Claude Code: Run Retention from Your Terminal

Set up Klaviyo's MCP in Claude Code. Build segments, edit flows, debug deliverability, and cut retention console workflow in half.

Stop configuring. Start shipping.Everything you're reading about and more..
Agentic Orchestration Kit for Claude Code.

Problem: Retention drives roughly half of ecommerce profit, but the work earning it lives in a Klaviyo console that punishes context switching. One decent abandoned cart flow means clicking through segment builder, flow logic, message editor, template gallery, deliverability dashboard, reporting. Multiply by six core flows and twelve campaigns a quarter and the retention lead is buried under clicks instead of doing strategy.

Quick Win: The official klaviyo mcp claude code setup turns your terminal into the retention console. One OAuth click connects Claude, and "create a win-back segment for customers inactive 90 days with LTV over $300, then draft three subject lines based on what worked last quarter" becomes a single prompt that returns a real segment, real flow draft, and copy variants from your own performance history.

claude mcp add --transport http klaviyo https://mcp.klaviyo.com/mcp

This guide covers the entire Klaviyo MCP surface for Claude Code: what shipped and when, how to connect the remote and local servers, six retention workflows that pay back the install in week one, the RFM and deliverability prompts most operators miss, how Klaviyo wires into the Shopify and Meta pillars, and the honest comparison against Triple Whale, Composio, and community wrappers.

What Klaviyo Just Shipped: The Klaviyo MCP Server in 2026

On September 25, 2025, Klaviyo announced general availability of its Klaviyo MCP server, an official model context protocol bridge that exposes the platform's API surface to any MCP client. On January 23, 2026, the integration was added to Claude's Connector directory, so any Claude.ai user can wire their account in two clicks. Claude Code users get the same surface through one terminal command.

This is not a community wrapper. The remote endpoint at https://mcp.klaviyo.com/mcp is hosted by Klaviyo, secured with OAuth, and ships on the platform's release cadence. Twenty-five tools cover campaigns, flows, profiles, segments, lists, templates, events, metrics, catalogs, and reporting. The klaviyo mcp server lives at the same level of vendor commitment as the official Shopify and Meta MCPs that landed in April 2026, which is why the full operator stack is suddenly real instead of theoretical.

Three things changed on launch day. The remote server eliminated the local Python install for most teams. OAuth replaced the private API key flow, removing a credential management chore. And Klaviyo added "read only" and "disable user generated content" toggles as first-class environment variables, so the same connector can run as a research assistant for an analyst and as a write-enabled operator for the retention lead, on the same account, with no IT ticket between them. For protocol fundamentals, our MCP basics guide walks how MCP works end to end.

A-Game Digital reported fifty percent time reduction on the work the MCP touches. Magnet Monster's Wiehan Britz called it "an extremely intuitive agent that looks at performance data, campaigns, and segments all in one go." Klaviyo's partner network reports forty one percent revenue per email lift on flows rebuilt with MCP-assisted iteration.

How Do You Connect Klaviyo to Claude Code?

There are three paths. Pick based on whether you want OAuth, a self-hosted server, or you are already standardized on Composio's tool router.

Path 1: Remote server with OAuth (recommended). Add it to Claude Code with one command:

claude mcp add --transport http klaviyo https://mcp.klaviyo.com/mcp

The first time Claude calls a Klaviyo tool, your browser opens, you grant the connector access through Klaviyo's OAuth flow, and Claude inherits the session. The role on the account must be Owner, Admin, or Manager. The OAuth grant is revocable from inside Klaviyo if the laptop walks.

Path 2: Local server with private API key. Run this when you need a sandbox account, corporate policy blocks remote OAuth connectors, or you want fine grained scope control per session.

{
  "mcpServers": {
    "klaviyo": {
      "command": "uvx",
      "args": ["klaviyo-mcp-server@latest"],
      "env": {
        "PRIVATE_API_KEY": "pk_xxx",
        "READ_ONLY": "false",
        "ALLOW_USER_GENERATED_CONTENT": "false"
      }
    }
  }
}

The private API key needs Accounts read, Campaigns full, Catalogs read, Events full, Flows read, Images full, Lists read, Metrics read, Profiles full, Segments full, Subscriptions full, Tags read, and Templates full. For analysis only, set READ_ONLY=true and grant read scopes only. The ALLOW_USER_GENERATED_CONTENT flag controls whether tools that emit content into customer-visible places (templates, push body, SMS body) are exposed to Claude at all.

Path 3: Composio's Klaviyo wrapper. If you already run Composio's tool router across Slack, Notion, and Google Workspace, the Klaviyo connector lives in the same registry. Trade off: two hundred plus operations through Composio versus twenty five curated tools on the official MCP. Composio adds dynamic tool loading, which matters less now that Claude Code shipped MCP tool search for the same problem.

To sanity check, ask Claude "list my five most recent campaigns and their click rates." If wired correctly, Claude calls get_campaigns and replies with real account data. For permission patterns across our tooling stack, see the configuration basics walkthrough.

Six Retention Workflows You Can Run From Your Terminal

Once Claude can reach Klaviyo, here are the six retention surfaces that pay the install back in the first week. Each one shrinks from a half-day of console clicks to a five-minute prompt.

1. Welcome series rebuild. "Pull the last sixty days of performance for my welcome flow, identify the message with the lowest click-through, and draft two subject line variants based on the top quartile of campaigns from the past quarter." Claude reads get_flow_messages, pulls metrics, surfaces the dropoff, and seeds variants from your campaign archive.

2. Abandoned cart and abandoned browse. "Find every abandoned cart event over $75 in the last seven days where the profile has a prior purchase and is not in any active flow. Draft a recovery sequence with a fifteen percent code, scheduled forty five minutes after trigger." The MCP resolves the segment, builds the flow logic, drafts the template, and queues for human approval. The klaviyo flow trigger for abandoned cart (Checkout Started) and for abandoned browse (Viewed Product) are both exposed, so you can configure the exact metric trigger in the same prompt rather than hunting through the flow builder UI.

3. Post-purchase nurture. "For every order in the last thirty days where SKU includes 'starter-kit', confirm the customer is enrolled in the post-purchase education flow. If not, add them." This prevents the silent dropoff most stores never notice: a post-purchase flow excluding twenty percent of buyers because the trigger was misconfigured during a theme migration.

4. Win-back at ninety days. "Build a win-back segment of customers inactive ninety days, with LTV over $300, who opened at least one email in the past sixty days. Draft a three message flow: twenty percent off, fifteen percent plus free shipping, brand story." This canonical klaviyo flow automation workflow is the highest revenue per recipient flow most stores run. Magnet Monster's case study cited a forty one percent revenue per email lift on flows rebuilt this way.

5. Replenishment for consumables. "For every customer who bought from consumables more than once, calculate average days between orders, then build a replenishment flow that sends ten days before predicted next order." Usually the second highest ROI flow after win-back, built last because the manual math is annoying.

6. VIP tagging and exclusion list management. "Tag every profile with LTV over $500 as 'VIP', tag every hard bounce in the last thirty days as 'suppression candidate', and exclude both from the standard promotional flow. Also flag any out-of-stock flow klaviyo subscribers waiting on back-in-stock triggers and confirm they are enrolled correctly." The klaviyo trigger split and tag operations are exposed, so segment math, tag application, and flow exclusion happen in one chain.

The pattern: operator names the goal in plain English, the MCP resolves the data and drafts the artifact, the operator approves before anything ships. Thinking stays human. Drudgery becomes terminal-level work.

RFM Segmentation From Claude Code

Recency, frequency, monetary segmentation is the discipline most retention leads talk about and most stores never actually run, because building it by hand is a half day exercise repeated every quarter. With the Klaviyo MCP, RFM becomes a single conversation.

A workable starter prompt: "Build an RFM segmentation across my active customer list. Score recency by days since last order in five buckets (0-30, 31-60, 61-120, 121-180, 181+). Score frequency by orders in the last twelve months (1, 2-3, 4-6, 7-10, 11+). Score monetary by LTV (under $50, $50-150, $151-300, $301-600, $601+). Output the definition, then create the eleven canonical RFM groups and tag every profile."

Claude reads order data, builds bucket math, and calls create_segment eleven times. The canonical groups with score thresholds: Champions (R5, F4-5, M4-5), Loyal Customers (R3-5, F3-5, M3-5), Potential Loyalists (R3-5, F1-3, M1-3), New Customers (R4-5, F1, M1), Promising (R3-4, F1, M1), Need Attention (R2-3, F2-3, M2-3), About to Sleep (R2-3, F1-2, M1-2), At Risk (R1-2, F2-4, M2-4), Cannot Lose (R1, F4-5, M4-5), Hibernating (R1-2, F1-2, M1-2), Lost (R1, F1-2, M1-2). Segments populate within minutes, and next month "rerun the RFM segmentation with the same definitions" refreshes them without rebuilding the prompt.

Running RFM quarterly requires knowing what to do with each segment after it populates. That is the gap the Shopify Kit addresses directly: its RFM segmentation framework maps each of the eleven groups to a specific flow type, cadence, and discount strategy, so Claude has not just the tools to build the segments but the senior-operator judgment about what to send to each one.

Deliverability Debugging: High Bounce Rate, Engagement Decay, and Anomaly Detection

This is the section that most Klaviyo MCP guides skip, and the one that pays for itself the first time a platform migration tanks your sender reputation. The MCP exposes deliverability data most wrappers do not surface, and Claude is unusually good at cross-metric pattern matching.

Bounce rate triage. "Pull the bounce rate for every campaign in the last sixty days. Bucket by domain. Identify any domain where hard bounce is over two percent, and pull the list of profiles that bounced." Claude reads metrics, groups by domain, surfaces the cohort. List cleanup is one more prompt. A high bounce rate in Klaviyo is one of the fastest ways to damage domain reputation; the MCP turns klaviyo hard bounce triage from a multi-tab research project into a single prompt.

Engagement decay detection. "For every customer added to the active list more than ninety days ago who has not opened or clicked in the last thirty days, flag them as 'engagement risk' and build a sunset segment." The sunset segment runs through a re-engagement flow first; profiles that still do not engage are excluded from sends, protecting reputation when volume scales for BFCM.

Anomaly detection on send health. "Compare this week's open rate, click rate, and unsubscribe rate to the trailing twelve week average across each list. Flag any list more than two standard deviations from baseline on any of the three." Most teams do not have a dashboard that runs this query weekly. With the MCP, you do.

Klaviyo holds the data already. The console hides it behind ten clicks. The MCP exposes it through a flat tool surface, and Claude is good at the cross-tab pattern matching humans do badly when tired.

Wiring Klaviyo to Your Shopify + Meta Stack

Retention is not a closed loop. The customer who enters your win-back flow came from a Meta ad, hit a Shopify storefront, bought (or did not), got tagged in Klaviyo, and is eligible for a flow that should know what they actually browsed. Three vendors shipped official MCPs in 2025 and 2026, which is the first time the full operator loop is stitchable inside one tool.

The stack: Higgsfield generates creative, Meta runs paid distribution, Shopify executes store-side response, Klaviyo closes the retention loop. Claude Code orchestrates because every layer speaks MCP. Concretely: "pull the meta campaigns with CTR above 1.5 percent in the last two weeks, identify the winning creative angles, find the Klaviyo segment that converted on those angles, and build a follow up flow that mirrors the language." A four-MCP query that was a multi-tool consulting engagement six months ago.

Companion pillars cover each layer: Shopify MCP and AI Toolkit for store control, Meta CLI and Meta MCP for paid media targeting, and Higgsfield MCP for creative production at scale. The four pillars cross-link because the operator stack is one job, not four.

Running four MCPs simultaneously inflates context. A fresh Claude Code session can balloon to fifteen thousand tokens of tool definitions before any user prompt lands. This is the exact problem MCP tool search solves: load tool schemas on demand, and the same four-MCP setup stays under one thousand tokens of permanent context. Enable it the day you wire your second connector. For curated server inventory, our 50+ MCP servers guide walks the landscape.

This is exactly the gap the Shopify Kit was built to close. The kit ships eight retention files that pair directly with the Klaviyo MCP surface: a six-flow Klaviyo playbook, an SMS playbook, an RFM framework, a win-back framework, subscription and churn playbooks, a referral guide, and a campaign cadence framework. Each file is a Claude Code skill the agent reads during execution, so Claude has not just the tools but the senior-operator playbook for what to build and in what sequence. The MCP is the hands; the kit is the brain.

Pricing, Limits, and Caveats Worth Knowing

The Klaviyo MCP server is free for any Klaviyo customer on any plan. No separate add-on charge. What costs is the underlying Klaviyo plan, billed by active profile count.

Rate limits inherit from the Klaviyo API. Read endpoints are seventy five requests per second burst, seven hundred per minute steady state. Bulk segment creation can hit the ceiling on enterprise accounts. For catalog operations on millions of profiles, batch explicitly in the prompt.

Role permission gating. Editor and Analyst roles cannot grant the OAuth connector. Upgrade them to Manager or use the local server path with a scoped private API key.

Run "read only" mode for the first week. Spend the first ten sessions in READ_ONLY=true. Validate that data Claude pulls matches the console. Once trust is established, enable writes. Production retention sends are not where you discover the connector returned a stale segment.

Mutations are immediate. When Claude creates a campaign and you approve sending, the email goes out. No preview hold step at the protocol layer. Klaviyo's "send to test list" is a manual prompt step the operator chains in.

Attribution windows are account-level. If your window is twenty four hours and you ask for "revenue from this campaign," you get the twenty four hour number. Ask the connector to confirm the attribution window before quoting numbers upstream.

Klaviyo MCP vs Triple Whale, Composio, and Community Wrappers

Four ways to put Klaviyo data in front of Claude in 2026, each solving a different problem.

The official Klaviyo MCP at https://mcp.klaviyo.com/mcp is the right default for retention operators who want the canonical surface, OAuth security, and Klaviyo's release cadence. Twenty five tools, scoped to retention work, zero maintenance.

Composio's Klaviyo connector ships two hundred plus operations, dynamic tool loading, and SOC 2 Type 2 audit. Trade off: a Composio subscription and a third-party gatekeeper. Right answer for agencies running ten plus client accounts.

Triple Whale's Moby + MCP pulls Klaviyo alongside Shopify, Meta, and Google Ads into a unified attribution layer. Right answer for "what is my CAC by channel," wrong answer for "build me a segment."

Community SDK wrappers like mattcoatsworth/Klaviyo-MCP-Server predate the official server and still work. Trade off is maintenance: when Klaviyo ships a new API version, the wrapper breaks until a maintainer pushes a fix. The official server tracks the platform.

Mental model: official MCP for retention work, Composio for multi-tenant agency control, Triple Whale for cross-channel attribution, community wrappers for niche tools the official MCP does not expose. Most operators only need the first.

The Loop Is Closed

Three vendor MCPs shipped between September 2025 and April 2026: Klaviyo on September 25, Shopify on April 9, Meta on April 29. Run all three inside Claude Code (plus Higgsfield for creative) and you have the full ecommerce operator stack, Claude orchestrating because every layer speaks MCP. Retention was the missing piece for six months. As of January 2026, that gap is closed.

The infrastructure is shipped. The white space is in the operator playbooks that connect it. The Shopify Kit ships the playbook layer the MCPs leave to you: the eight retention files, the RFM framework, and a thirty-day owned channel rebuild playbook from list cleanup through win-back launch. One hundred and ninety nine dollars and a Claude Code session replaces the thirty thousand dollar quarterly retention retainer. The Klaviyo MCP gives Claude Code hands on your retention stack. The Shopify Kit gives it the judgment to know what to build.

Retention is not the loud part of ecommerce. Paid media gets the attention, creative gets the quotes, store launches get the press. Retention compounds in the background, accounting for half of profit on every store that runs it well, and it has been the hardest layer to automate because the work lived behind a console nobody wanted to click through. With the official Klaviyo MCP and Claude Code, the console becomes a terminal. The terminal becomes a strategy session. The retention lead becomes the highest leverage role on the team again.

Last updated on

On this page

Stop configuring. Start shipping.Everything you're reading about and more..
Agentic Orchestration Kit for Claude Code.
Claude Fast Shopify Kit
New

Shopify Kit just dropped

Your in-house Shopify x Claude team for Growth, Scaling ,CRO, Paid ads, retention, SEO, ops and Media gen.

Learn more