Get the FREE Ultimate OpenClaw Setup Guide →

Klaviyo -4-15

MCP server from mattcoatsworth/Klaviyo-MCP-Server-4-15

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio mattcoatsworth-klaviyo-mcp-server-4-15 node src/server.js \
  --env KLAVIYO_API_KEY="your_private_api_key_here"

How to use

The Klaviyo MCP Server exposes a comprehensive set of tools mirroring Klaviyo's API, wrapped as MCP resources. It provides profiles, lists, events, campaigns, flows, templates, segments, metrics, catalogs and data privacy endpoints, all validated with Zod and accompanied by documentation resources to help you construct correct inputs and interpret responses. You can browse, test, and inspect the behavior of each tool via the MCP Inspector interface, then use the available operations to manage your Klaviyo data programmatically. Typical workflows include creating and updating profiles, managing email lists and campaigns, triggering campaigns, rendering templates with dynamic context, and querying metrics and catalogs for reporting and analytics.

How to install

Prerequisites:

  • Node.js (14+ recommended) and npm installed on your system
  • Access to a Klaviyo API key with appropriate permissions

Step-by-step installation:

  1. Clone the repository
git clone <repository-url>
cd <repository-directory>
  1. Install dependencies
npm install
  1. Configure environment
# Create a .env file or set environment variables directly
KLAVIYO_API_KEY=your_private_api_key_here
  1. Run the server in development mode
npm run dev
  1. (Optional) Open MCP Inspector to test and explore tools
npm run inspect

If you plan to deploy, ensure the entry point matches your environment (the server expects a Node-based entry like src/server.js).

Additional notes

Notes and tips:

  • Ensure KLAVIYO_API_KEY is kept secret; do not commit it to version control.
  • The MCP Inspector provides a convenient UI to browse tools, supply inputs, and view responses. Use it to verify shapes before integrating into your apps.
  • Validation is handled via Zod; if a tool returns validation errors, adjust input types/fields accordingly.
  • If starting the server in a production environment, consider using a process manager (e.g., PM2) and configuring proper logging and environment handling.
  • You can extend or customize environment variables as needed for additional Klaviyo features or debugging options.
  • When dealing with large datasets (profiles, lists, events), implement pagination or batch processing where supported by the tool set.

Related MCP Servers

Sponsor this space

Reach thousands of developers