Klaviyo MCP Server
Project description
Klaviyo MCP Server (Beta)
The Klaviyo Model Context Protocol (MCP) server integrates with Klaviyo's APIs, allowing you to interact with your Klaviyo data using a variety of MCP clients.
Setup
1. Create a Klaviyo private API key
To use all the available tools, you must either create a Full Access Key or a Custom Key with at least the following permissions:
| Scope | Access |
|---|---|
| Accounts | Read |
| Campaigns | Full |
| Catalogs | Read |
| Events | Full |
| Flows | Full |
| Images | Full |
| List | Read |
| Metrics | Read |
| Profiles | Full |
| Segments | Full |
| Subscriptions | Full |
| Tags | Read |
| Templates | Full |
2. Install uv
For macOS and Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
For Windows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
3. Add the server to your client
Claude Desktop
- Download Claude Desktop
- 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"
}
}
}
}
Note for free users: The free version of Claude Desktop has a very limited context window, and you may run into issues with all the tools enabled. Here are a few possible workarounds:
- Only enable the tools you need
- Use read-only mode
- Use a different client
Note on security: We do not recommend storing your API key in this file. See below for an alternative.
Cursor
- Download Cursor
- Open Cursor. Within Settings -> Cursor Settings -> MCP Tools -> New MCP Server, 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"
}
}
}
}
Note on security: We do not recommend storing your API key in this file. See below for an alternative.
VS Code
- Download VS Code
- 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
}
]
}
}
Configuration
Read-only mode
To enable only the tools that do not modify any Klaviyo data, set the READ_ONLY environment variable to "true" in the above configurations.
Securing your API key with Claude Desktop and Cursor
As of now, Claude Desktop and Cursor require that your API key exist in plaintext in your config file, which is not very secure.
Instead, we recommend saving your API key to an environment variable, and then using the below script to write from the environment variable to your config only while the client is running.
Note that as of now, this only supports macOS.
To run Claude Desktop:
uvx --from klaviyo-mcp-server run-claude NAME_OF_API_KEY_ENVIRONMENT_VARIABLE
To run Cursor:
uvx --from klaviyo-mcp-server run-cursor NAME_OF_API_KEY_ENVIRONMENT_VARIABLE
Available Tools
| Category | Tool name | Description |
|---|---|---|
| Accounts | get_account_details |
Get details of your account. |
| Campaigns | get_campaigns |
List your campaigns. |
| Campaigns | get_campaign |
Get details of a campaign. |
| Campaigns | create_campaign |
Create a campaign. |
| Campaigns | assign_template_to_campaign_message |
Assign an email template to a campaign message. |
| Catalogs | get_catalog_items |
List your catalog items. |
| Events | get_events |
List events. |
| Events | create_event |
Create an event for a profile. |
| Events | get_metrics |
List event metrics. |
| Events | get_metric |
Get details of an event metric. |
| Flows | get_flows |
List your flows. |
| Flows | get_flow |
Get details of a flow. |
| Groups | get_lists |
List your lists. |
| Groups | get_list |
Get details of a list. |
| Groups | get_segments |
List your segments. |
| Groups | get_segment |
Get details of a segment. |
| Images | upload_image_from_file |
Upload image from a local file. |
| Images | upload_image_from_url |
Upload image from a URL. |
| Profiles | get_profiles |
List your profiles. |
| Profiles | get_profile |
Get details of a profile. |
| Profiles | create_profile |
Create a profile. |
| Profiles | update_profile |
Update a profile. |
| Profiles | subscribe_profile_to_marketing |
Subscribe a profile to marketing for a given channel and list. |
| Profiles | unsubscribe_profile_from_marketing |
Unsubscribe a profile from marketing for a given channel and list. |
| Reporting | get_campaign_report |
Get a report of your campagin performance. |
| Reporting | get_flow_report |
Get a report of your flow performance. |
| Templates | create_email_template |
Create an HTML email template. |
| Templates | get_email_template |
Get the details of an email template. |
Feedback
We'd love to hear your feedback! Please fill out this form with any issues, questions, or comments.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file klaviyo_mcp_server-0.1.1.tar.gz.
File metadata
- Download URL: klaviyo_mcp_server-0.1.1.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea598d9c67bac72cbab4d87ff73759610065d7ba63ec2790a8c91a46e007d026
|
|
| MD5 |
5e16e7380c057d4a204e91d713f7ea1f
|
|
| BLAKE2b-256 |
5fbbe2320382a0a5e3a20ef8cbb0f3d1c7e6fa896607dbb5857f9898ef0062ff
|
File details
Details for the file klaviyo_mcp_server-0.1.1-py3-none-any.whl.
File metadata
- Download URL: klaviyo_mcp_server-0.1.1-py3-none-any.whl
- Upload date:
- Size: 33.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b5cb4eb04ebd3a1685da09669d4dced6d404788b107705bd52ff500b9691c65
|
|
| MD5 |
bc60df9528016be3de2ed452ff409096
|
|
| BLAKE2b-256 |
fb23b738aad704cd5a7b062828c378ee4b5d90044f15a7638fd62b9674f600e7
|