# Klaviyo MCP: an MCP server by Scalably

Canonical: https://scalably.io/mcp/klaviyo-mcp
Source: https://github.com/scalably-io/klaviyo-mcp
Registry: https://registry.modelcontextprotocol.io/v0.1/servers/io.scalably%2Fklaviyo-mcp/versions/1.0.0
Provenance: derived from `container/tools/klaviyo-mcp` at `ef174fc3` (2026-08-31) in the private ScalablyAI repository
Integrity: sha256 of the raw README served at https://scalably.io/mcp/klaviyo-mcp.md is 9992c3930fc9c8102a5f6af6f40f9c374ea5834019eac47a4db66862a6e1d57f. Verify: curl -s https://scalably.io/mcp/klaviyo-mcp.md | shasum -a 256
This is the machine-readable representation of the page at the canonical URL. Same facts, denser format.

## Direct answer
Klaviyo MCP: campaigns, flows, segments, metrics, reports, profiles across many accounts. 24 tools.

Campaign, flow and segment reporting across several Klaviyo accounts.

## Install
- Claude Code: `claude mcp add klaviyo -e KLAVIYO_KEY_MAIN=pk_your_key -- npx -y @scalably-io/klaviyo-mcp`
- Codex: `codex mcp add klaviyo --env KLAVIYO_KEY_MAIN=pk_your_key -- npx -y @scalably-io/klaviyo-mcp`
- Claude Desktop: download `klaviyo-mcp.mcpb` from the latest GitHub release and open it. Claude Desktop's install form only accepts one account (`KLAVIYO_KEY_MAIN`).

## Environment
| Variable | Required | Secret | Purpose |
|---|---|---|---|
| `KLAVIYO_KEY_MAIN` | yes | yes | Private API key for your main Klaviyo account. Add more accounts with extra KLAVIYO_KEY_<name> variables. |
| `KLAVIYO_API_BASE` | no | no | Klaviyo API base URL, default https://a.klaviyo.com/api |
| `KLAVIYO_RETRY_BASE_MS` | no | no | Base delay in milliseconds for the retry backoff, default 1000 |

## Tools
| Tool | Description |
|---|---|
| `list_accounts` | List all configured Klaviyo accounts. |
| `list_campaigns` | List recent email campaigns for a specific Klaviyo account. |
| `campaign_report` | Get email campaign performance metrics for a Klaviyo account. |
| `list_metrics` | List available metrics for a Klaviyo account. |
| `multi_account_summary` | Pull campaign performance summary from ALL configured Klaviyo accounts. |
| `flow_report` | Get email flow (automation) performance for a Klaviyo account. |
| `campaign_ab_report` | Get per-variation (A/B arm) email/SMS campaign metrics for a Klaviyo account. |
| `flow_series_report` | Time-series flow (automation) metrics for a Klaviyo account. |
| `segment_report` | Segment performance metrics for a Klaviyo account. |
| `form_report` | Sign-up form performance for a Klaviyo account. |
| `list_segments` | List all segments in a Klaviyo account. |
| `list_lists` | List all email lists in a Klaviyo account. |
| `list_flows` | List all flows (automations) in a Klaviyo account. |
| `get_campaign_detail` | Get full details for a single campaign by ID. |
| `list_suppressed_profiles` | List profiles suppressed from email marketing for a single reason. |
| `metric_aggregate` | Aggregate values for any Klaviyo metric over a custom timeframe and interval. |
| `get_template` | Fetch an email template by ID, including HTML/text content. |
| `list_recent_events` | List recent events for a Klaviyo account. |
| `account_info` | Get Klaviyo account metadata. |
| `list_tags` | List all tags in a Klaviyo account. |
| `list_templates` | List email templates in a Klaviyo account. |
| `get_profile` | Look up a customer profile by email or profile ID. |
| `get_flow_detail` | Get a flow's structure by ID. |
| `custom_report` | Expert escape hatch: run any Klaviyo values or series report. |

## Setup
1. Create a private API key in Klaviyo under Settings > API Keys.
2. Set one `KLAVIYO_KEY_<name>=pk_xxx` environment variable per account, for example `KLAVIYO_KEY_MAIN` or `KLAVIYO_KEY_STOREONE`. The server auto-discovers every `KLAVIYO_KEY_*` variable at startup; `list_accounts` shows what it found.
3. Multiple Klaviyo accounts (agencies, multi-brand portfolios) work only through Claude Code or Codex, since both let you pass arbitrary extra environment variables. Add as many `KLAVIYO_KEY_<name>` variables as you have accounts, then call tools with the matching `account` argument (the name after `KLAVIYO_KEY_`, lowercased).
4. All 24 tools are read-only.

## Limits
Reporting endpoints (`campaign_report`, `flow_report`, `campaign_ab_report`, `flow_series_report`, `segment_report`, `form_report`, `custom_report` for values/series reports) are rate limited by Klaviyo to 2 requests per minute per account. Reporting data is only available from 2023-06-01 onward; a custom range starting earlier is clamped to that floor. A single reporting request cannot span more than one calendar year, so a longer custom range is auto-windowed into consecutive yearly chunks with a spacing delay between them.

## Reply shape
Every tool returns plain JSON with `status` (`succeeded`, `partial`, `no_op`), `operation`, `summary`, `target`, `result`, `proof`, `warnings`, `recovery`. Failures throw a plain error string: `<code>: <message> <hint>`.

## Reliability
- CI: https://github.com/scalably-io/klaviyo-mcp/actions/workflows/validate.yml
- Release 1.0.0
- Verified 2026-08-31
- Each of ours started as an internal ScalablyAI MCP server. We stripped the internal envelope, the auth wrapper and client dispatch that only make sense inside our own platform, and kept the tool surface. Every release runs through a clean-install CI job, publishes under the io.scalably namespace with trusted publishing so no long-lived token ever leaves our CI, and registers on the official MCP registry.

## Related
- Read more: [How to build an MCP server in TypeScript (the right way)](https://scalably.io/blog/mcp-server-typescript), [What is an MCP server? A clear explainer for developers](https://scalably.io/blog/what-is-an-mcp-server)
