HomeGuidesAPI Reference
ChangelogHelp CenterCommunityContact Us
Guides

(Beta) Klaviyo MCP server

Configure Klaviyo's MCP server to get AI assistance with your Klaviyo data.

🚧

The Klaviyo MCP server is currently in beta and is subject to change. To provide feedback, please fill out this form.

You will learn

The Klaviyo Model Context Protocol (MCP) server seamlessly integrates with Klaviyo’s APIs, enabling AI clients to interact with your Klaviyo data. This guide will walk you through configuring various MCP clients.

What is MCP?

MCP (Model Context Protocol) is an open protocol that helps AI models securely interface with different data sources and tools. You’ll connect Klaviyo’s MCP server to an MCP client, i.e., an AI agent like Claude or Cursor, to get assistance with your Klaviyo data. Your MCP client can help with a variety of tasks from campaign creation to flow performance reports. Here’s some examples of prompts you can give:

  • “Show me the performance of my email campaigns from the last 30 days.”
  • “Which flows are performing the best in terms of conversions?”
  • “Create an email campaign promoting our Memorial Day sale.”

Here’s an example of an MCP client working on a Klaviyo-related task using Klaviyo’s MCP tools:

Before you begin

To follow this guide, you’ll need to install the following:

  • uv
  • A compatible MCP client (e.g., Cursor). Note: This server runs locally, so web-based clients such as ChatGPT are not supported at this time.

Configure your MCP client

To communicate with the Klaviyo MCP server, each MCP client needs specific configuration. Follow the steps below to get started:

  1. To utilize all available tools, create a Klaviyo private API key with the following permissions:
ScopeAccess
AccountsRead
CampaignsFull
CatalogsRead
EventsFull
FlowsFull
ImagesFull
ListRead
MetricsRead
ProfilesFull
SegmentsFull
SubscriptionsFull
TagsRead
TemplatesFull
  1. Follow the steps below for the MCP client you’d like to configure.

Claude Desktop

  1. Download Claude Desktop.

  2. Open Claude Desktop. Within Settings > Developer > Edit Config, add the following, substituting your API key:

{
 "mcpServers": {
   "klaviyo": {
     "command": "uvx",
     "args": ["klaviyo-mcp-server@latest"],
     "env": {
       "PRIVATE_API_KEY": "YOUR_API_KEY",
       "READ_ONLY": "false"
     }
   }
 }
}
  1. Once you have saved all configuration changes, restart Claude Desktop to apply the new settings.

  2. Verify the connection by looking for visual indicators and asking a question to test the connection.

📘

If you get errors upon starting Claude, you may need to provide the full path to the uvx executable for the command key. On macOS, find this by running which uvx.

  1. (Recommended for security) To avoid storing your API key in plaintext, save your API key to an environment variable. Then, use the following command to launch Claude:
uvx --from klaviyo-mcp-server@latest run-claude NAME_OF_API_KEY_ENVIRONMENT_VARIABLE

Note that as of now, this only supports MacOS.

📘

Note for free users

The free version of Claude Desktop has a very limited context window, and you may and you may run into issues with all the tools enabled. Here are a few possible workarounds:

  1. Only enable the tools you need. To do this, click the Search and tools button near the prompt. Then, click klaviyo to toggle certain tools on or off.
  2. Use read-only mode, i.e., set READ_ONLY to true.
  3. Use a different client.

Cursor

  1. Download Cursor.

  2. Open Cursor. Within Settings > Cursor Settings > MCP Tools > Add Custom MCP, add the following, substituting your API key:

{
  "mcpServers": {
    "klaviyo": {
      "command": "uvx",
      "args": ["klaviyo-mcp-server@latest"],
      "env": {
        "PRIVATE_API_KEY": "YOUR_API_KEY",
        "READ_ONLY": "false"
      }
    }
  }
}
  1. Once you have saved all configuration changes, restart Cursor to apply the new settings.

  2. Verify the connection by looking for visual indicators and asking a question to test the connection.

  3. (Recommended for security) To avoid storing your API key in plaintext, save your API key to an environment variable. Then, use the following command to launch Cursor:

uvx --from klaviyo-mcp-server@latest run-cursor NAME_OF_API_KEY_ENVIRONMENT_VARIABLE

Note that as of now, this only supports MacOS.

VS Code

  1. Download VS Code.

  2. Open VS Code. Within settings (Ctrl + Shift + P > Preferences: Open Settings (JSON)), add the following:

{
  "mcp": {
    "servers": {
      "klaviyo": {
        "command": "uvx",
        "args": ["klaviyo-mcp-server@latest"],
        "env": {
          "PRIVATE_API_KEY": "${input:klaviyo_api_key}",
          "READ_ONLY": "false"
        }
      }
    },
    "inputs": [
      {
        "type": "promptString",
        "id": "klaviyo_api_key",
        "description": "Klaviyo API Key",
        "password": true
      }
    ]
  }
}
  1. Once you have saved all configuration changes, restart VS Code to apply the new settings.

  2. Verify the connection by looking for visual indicators and asking a question to test the connection.

📘

To enable only the tools that do not modify any Klaviyo data, set the READ_ONLY environment variable to true in your MCP client’s configuration file.

Troubleshooting

If your MCP client can’t find enabled MCP tools for Klaviyo:

  1. Review the steps above and ensure the MCP server is configured correctly.
  2. Restart the app to refresh your client.

If you’re getting inaccurate or inconsistent responses:

  • Start a new chat to reset the conversation context.
  • Make sure you’re being specific in your queries by providing necessary, relevant keywords.

Available tools

CategoryTool nameDescription
Accountsget_account_detailsGet details of your account.
Campaignsget_campaignsList your campaigns.
Campaignsget_campaignGet details of a campaign.
Campaignscreate_campaignCreate a campaign.
Campaignsassign_template_to_campaign_messageAssign an email template to a campaign message.
Catalogsget_catalog_itemsList your catalog items.
Eventsget_eventsList events.
Eventscreate_eventCreate an event for a profile.
Eventsget_metricsList event metrics.
Eventsget_metricGet details of an event metric.
Flowsget_flowsList your flows.
Flowsget_flowGet details of a flow.
Groupsget_listsList your lists.
Groupsget_listGet details of a list.
Groupsget_segmentsList your segments.
Groupsget_segmentGet details of a segment.
Imagesupload_image_from_fileUpload image from a local file.
Imagesupload_image_from_urlUpload image from a URL.
Profilesget_profilesList your profiles.
Profilesget_profileGet details of a profile.
Profilescreate_profileCreate a profile.
Profilesupdate_profileUpdate a profile.
Profilessubscribe_profile_to_marketingSubscribe a profile to marketing for a given channel and list.
Profilesunsubscribe_profile_from_marketingUnsubscribe a profile from marketing for a given channel and list.
Reportingget_campaign_reportGet a report of your campaign performance.
Reportingget_flow_reportGet a report of your flow performance.
Templatescreate_email_templateCreate an HTML email template.
Templatesget_email_templateGet the details of an email template.