Get the FREE Ultimate OpenClaw Setup Guide →

Klaviyo

MCP server from mattcoatsworth/Klaviyo-MCP-Server

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 npm run dev \
  --env KLAVIYO_API_KEY="your_private_api_key_here"

How to use

This MCP server exposes a comprehensive wrapper around the Klaviyo API, enabling programmatic access to profiles, lists, segments, campaigns, flows, templates, catalogs, events, and more. It provides MCP tools and resources that allow large language models and other clients to query, create, update, and manage Klaviyo data in a structured way. Use the available tools to perform common operations such as fetching profiles, creating lists, updating campaigns, managing flows, and querying metrics. The MCP Inspector interface (started with npm run inspect) lets you explore and test each tool and resource interactively, making it easy to understand inputs, outputs, and optional parameters.

How to install

Prerequisites:

  • Node.js and npm installed on your system
  • Git (optional, for cloning the repo)

Install and run:

  1. Clone the repository (replace with the actual repo URL):
git clone https://github.com/your-organization/mattcoatsworth-klaviyo-mcp-server.git
cd mattcoatsworth-klaviyo-mcp-server
  1. Install dependencies:
npm install
  1. Create a .env file based on .env.example and set your Klaviyo API key:
KLAVIYO_API_KEY=your_private_api_key_here
  1. Start the server in development mode:
npm run dev

Optional testing with MCP Inspector:

npm run inspect

Note: If you are using a different environment, you can adapt the command in mcp_config to match your runner (for example, uvx, docker, or python) but this project uses Node.js and npm scripts by default.

Additional notes

Tips and common issues:

  • Ensure KLAVIYO_API_KEY is valid and has the necessary permissions for the operations you intend to perform.
  • If you encounter rate limiting from Klaviyo, implement appropriate retry logic and backoff in your integration.
  • The MCP Inspector provides an interactive way to test all tools; use it to validate inputs and inspect responses.
  • If .env.example changes, keep your .env in sync to avoid runtime errors.
  • For deployment, consider securing the API key using environment-specific secret management and avoiding hard-coded values.

Related MCP Servers

Sponsor this space

Reach thousands of developers