Klaviyo Integration
Manage Klaviyo accounts, profiles, lists, segments, campaigns, and metrics
The Klaviyo integration provides access to manage Klaviyo accounts, profiles, lists, segments, campaigns, and metrics through the Integrate MCP server.
Installation
The Klaviyo integration is included with the SDK:
import { klaviyoIntegration } from "integrate-sdk/server";Setup
1. Create a Klaviyo OAuth App
- Create an OAuth application for Klaviyo
- Configure your redirect URI
- Note your Client ID and Client Secret
2. Configure the Integration on Your Server
Add the Klaviyo integration to your server configuration. The integration automatically reads KLAVIYO_CLIENT_ID and KLAVIYO_CLIENT_SECRET from your environment variables:
import { createMCPServer, klaviyoIntegration } from "integrate-sdk/server";
export const { client: serverClient } = createMCPServer({
apiKey: process.env.INTEGRATE_API_KEY,
integrations: [
klaviyoIntegration({
scopes: ["accounts:read", "profiles:read", "profiles:write", "lists:read", "lists:write", "campaigns:read", "campaigns:write", "metrics:read"], // Optional
}),
],
});You can override the environment variables by passing explicit values:
klaviyoIntegration({
clientId: process.env.CUSTOM_KLAVIYO_ID,
clientSecret: process.env.CUSTOM_KLAVIYO_SECRET,
scopes: ["accounts:read", "profiles:read", "profiles:write", "lists:read", "lists:write", "campaigns:read", "campaigns:write", "metrics:read"], // Optional
});3. Client-Side Usage
The default client automatically includes all integrations. You can use it directly:
import { client } from "integrate-sdk";
await client.authorize("klaviyo");
const result = await client.klaviyo.listAccounts({});
console.log(result);If you're using a custom client, add the integration to the integrations array:
import { createMCPClient, klaviyoIntegration } from "integrate-sdk";
const customClient = createMCPClient({
integrations: [klaviyoIntegration()],
});Configuration Options
export interface KlaviyoIntegrationConfig {
clientId?: string;
Default Scopes
These defaults are applied unless you override scopes in the integration config:
accounts:readprofiles:readprofiles:writelists:readlists:writecampaigns:readcampaigns:writemetrics:read
Tools
klaviyo_list_accounts
List accounts
export interface KlaviyoListAccountsParams {
"page[size]"?: number;
klaviyo_list_profiles
List profiles
export interface KlaviyoListProfilesParams {
"page[size]"?: number;
klaviyo_get_profile
Get profile
export interface KlaviyoGetProfileParams {
"profile_id": string;
klaviyo_create_profile
Create profile
export interface KlaviyoCreateProfileParams {
"profile_json": string;
klaviyo_list_lists
List lists
export interface KlaviyoListListsParams {
"page[size]"?: number;
klaviyo_list_campaigns
List campaigns
export interface KlaviyoListCampaignsParams {
"page[size]"?: number;
klaviyo_create_campaign
Create campaign
export interface KlaviyoCreateCampaignParams {
"campaign_json": string;
klaviyo_list_metrics
List metrics
export interface KlaviyoListMetricsParams {
"page[size]"?: number;
Notes
- Category: Marketing
- Authentication mode: OAuth