Klaviyo MCP Server
Klaviyo MCP サーバー強化
Klaviyo APIとの連携を可能にする包括的なモデルコンテキストプロトコル(MCP)サーバー。この拡張バージョンは、オリジナルのMCPサーバーとの完全な互換性を維持しながら、高度な分析機能、パフォーマンス最適化、堅牢なエラー処理を提供します。
🌟 主な機能
高度な分析とレポート: キャンペーンのパフォーマンス指標、集計データ、詳細な分析情報にアクセスします
包括的な API カバレッジ: 最新リビジョン (2024-06-15) のすべての Klaviyo API エンドポイントをサポート
パフォーマンスの最適化: インテリジェントなキャッシュ、レート制限の処理、効率的なデータ処理
堅牢なエラー処理: フォールバックメカニズム、詳細なログ記録、そして正常なデグラデーション
簡単な統合: モデルコンテキストプロトコルを介してClaudeや他のLLMとシームレスに統合
Related MCP server: BolideAI MCP
📊 分析とレポート機能
この拡張バージョンでは、オリジナルにはなかった強力な分析機能が追加されています。
キャンペーンパフォーマンス指標: 開封率、クリック率、直帰率など
カスタムメトリック集計: 期間、ディメンション、測定値ごとにメトリックを集計します
収益帰属: キャンペーンやフローによって生成された収益を追跡します
加入者インサイト: 加入者の増加、エンゲージメント、行動を分析
🔧 技術的な強化
1. 集中設定✅
すべてのAPIパラメータの中央設定システム(
src/config.js)を作成しましたAPI の改訂日、有効な統計、その他のパラメータを簡単に設定できるようにしました
APIパラメータが変更された場合に異なるファイル間での不整合を防止
2. 強化されたログシステム✅
さまざまなログレベル(デバッグ、情報、警告、エラー)を備えた堅牢なログシステムを実装しました。
APIリクエストとレスポンスの特別なログ記録を追加しました
セキュリティのためログ内の機密データをマスク
設定可能なログ出力先と詳細度
3. インテリジェントなレート制限✅
レート制限エラーの再試行ロジックを追加しました
再試行時にジッターを伴う指数バックオフを実装しました
レート制限に遭遇したときに明確なフィードバックを追加しました
レート制限中に重要なリクエストを優先する
4. パフォーマンスキャッシュ✅
頻繁にアクセスされるデータに対してメモリ内キャッシュを実装
TTL(生存時間)に基づくキャッシュ無効化を追加
さまざまなデータ タイプ (メトリック、キャンペーンなど) に合わせて最適化されたキャッシュ
監視と最適化のためのキャッシュ統計
5. エラー処理とフォールバック✅
すべてのAPIインタラクションに対する包括的なエラー処理
プライマリリクエストが失敗した場合の、パフォーマンス低下時のフォールバックメカニズム
詳細なエラーメッセージとトラブルシューティング情報
JSON解析エラーの防止と処理
🔄 APIバージョン
この拡張バージョンは、最新の機能と改善を含むKlaviyo APIリビジョン2024-06-15を使用しています。サーバーは、集中管理された設定システムを通じて、将来のAPIリビジョンとの互換性を維持するように設計されています。
📋 帰属表示
このプロジェクトは、 Matt Coatsworth氏が作成したオリジナルのKlaviyo MCPサーバーの拡張版です。この拡張版の基盤は、オリジナルの作業に基づいています。
🚀 はじめに
前提条件
Node.js v18以上
APIアクセス可能なKlaviyoアカウント
適切なスコープ (campaigns:read、metrics:read など) を持つプライベート API キー
インストール
このリポジトリをクローンします:
git clone https://github.com/ivan-rivera-projects/Klaviyo-MCP-Server-Enhanced.git cd Klaviyo-MCP-Server-Enhanced依存関係をインストールします:
npm install.env.exampleに基づいて.envファイルを作成します。cp .env.example .env.envファイルを編集して、Klaviyo API キーを追加します。KLAVIYO_API_KEY=your_private_api_key_here LOG_LEVEL=info LOG_FILE=/tmp/klaviyo-mcp.log LOG_RESPONSES=false NODE_ENV=development
サーバーの起動
自動リロード付きの開発モードでサーバーを起動します。
npm run dev生産用途の場合:
npm startMCP Inspectorによるテスト
MCP Inspector を使用してサーバーをテストできます。
npm run inspectこれにより、利用可能なすべてのツールとリソースをテストできる Web インターフェイスが開きます。
📚 ドキュメント
分析機能と API パラメータの詳細については、以下を参照してください。
ANALYTICS.md - 分析機能と使用方法に関する包括的なドキュメント
docs/KLAVIYO_API_REFERENCE.md - Klaviyo APIパラメータのリファレンス
🔍 使用例
キャンペーンパフォーマンス指標の取得
// Retrieve open rates and click rates for a campaign
get_campaign_metrics({
id: "01JSQRND0PMH88186NREAJEGGN",
metrics: ["open_rate", "click_rate", "delivered", "bounce_rate"],
conversion_metric_id: "VevE7N", // Placed Order metric ID
start_date: "2025-04-01T00:00:00Z", // Optional: Custom date range
end_date: "2025-05-01T00:00:00Z" // Optional: Custom date range
})集計されたメトリックのクエリ
// Count placed orders grouped by month
query_metric_aggregates({
metric_id: "VevE7N", // Placed Order metric ID
measurement: "count",
group_by: ["month"],
timeframe: "last_30_days", // Predefined timeframe
// Or use custom dates:
start_date: "2025-01-01T00:00:00Z",
end_date: "2025-05-01T00:00:00Z"
})キャンペーンパフォーマンスサマリーの取得
// Get a comprehensive summary of campaign performance
get_campaign_performance({
id: "01JSQRND0PMH88186NREAJEGGN"
})🛠️ 利用可能なツール
分析とレポート(拡張バージョンの新機能)
get_campaign_metrics: 特定のキャンペーンのパフォーマンス指標 (開封率、クリック率など) を取得します。query_metric_aggregates: カスタム分析レポート用に集計されたメトリックデータをクエリするget_campaign_performance: キャンペーンの包括的なパフォーマンス概要を取得します
キャンペーン(拡張)
get_campaigns: Klaviyoからキャンペーンを取得するget_campaign: Klaviyoから特定のキャンペーンを取得するget_campaign_message: テンプレートの詳細を含む特定のキャンペーンメッセージを取得しますget_campaign_messages: 特定のキャンペーンのすべてのメッセージを取得するget_campaign_recipient_estimation: キャンペーンの推定受信者数を取得する
プロフィール
get_profiles: Klaviyoからプロファイルを取得するget_profile: Klaviyoから特定のプロファイルを取得するcreate_profile: Klaviyoで新しいプロフィールを作成するupdate_profile: Klaviyo の既存のプロフィールを更新するdelete_profile: Klaviyoからプロフィールを削除する
リストとセグメント
get_lists: Klaviyoからリストを取得するget_list: Klaviyoから特定のリストを取得するcreate_list: Klaviyo で新しいリストを作成するadd_profiles_to_list: Klaviyo のリストにプロフィールを追加するget_segments: Klaviyoからセグメントを取得するget_segment: Klaviyoから特定のセグメントを取得する
イベントとメトリクス
get_events: Klaviyoからイベントを取得するcreate_event: Klaviyoで新しいイベントを作成するget_metrics: Klaviyoからメトリクスを取得するget_metric: Klaviyoから特定のメトリックを取得する
フロー
get_flows: Klaviyoからフローを取得するget_flow: Klaviyoから特定のフローを取得するupdate_flow_status: Klaviyo のフローのステータスを更新する
コンテンツ管理
get_templates: Klaviyoからテンプレートを取得するget_template: Klaviyoから特定のテンプレートを取得するcreate_template: Klaviyo で新しいテンプレートを作成するget_images: Klaviyoから画像を取得するget_image: Klaviyoから特定の画像を取得する
電子商取引
get_catalogs: Klaviyoからカタログを取得するget_catalog_items: Klaviyo のカタログからアイテムを取得するget_catalog_item: Klaviyo のカタログから特定のアイテムを取得するget_coupons: Klaviyoからクーポンを入手create_coupon_code: Klaviyoで新しいクーポンコードを作成する
追加ツール
get_tags: Klaviyoからタグを取得するcreate_tag: Klaviyoで新しいタグを作成するadd_tag_to_resource: Klaviyo のリソースにタグを追加するget_webhooks: KlaviyoからWebhookを取得するcreate_webhook: Klaviyo で新しい Webhook を作成するdelete_webhook: Klaviyo から Webhook を削除しますrequest_profile_deletion: データプライバシーコンプライアンスのためのプロファイルの削除をリクエストするget_forms: Klaviyoからフォームを取得するget_form: Klaviyoから特定のフォームを取得するget_product_reviews: Klaviyo から製品レビューを取得するget_product_review: Klaviyo から特定の製品のレビューを取得する
🔗 利用可能なリソース
klaviyo://profile/{id}: 特定のプロフィールに関する情報を取得するklaviyo://list/{id}: 特定のリストに関する情報を取得するklaviyo://segment/{id}: 特定のセグメントに関する情報を取得するklaviyo://campaign/{id}: 特定のキャンペーンに関する情報を取得するklaviyo://flow/{id}: 特定のフローに関する情報を取得するklaviyo://template/{id}: 特定のテンプレートの情報を取得するklaviyo://metric/{id}: 特定のメトリックに関する情報を取得するklaviyo://catalog/{id}: 特定のカタログに関する情報を取得する
⚠️ 既知の問題と制限事項
Klaviyo APIはレポートエンドポイントにレート制限を課す可能性があります
一部の指標はAPIで利用できるようになるまでに時間がかかる場合があります
履歴データの利用可能範囲は、Klaviyoプランによって制限される場合があります。
Claude Desktop を使用する場合、機能に影響しない JSON 解析の警告が表示されることがあります。
📝 ライセンス
このプロジェクトはオリジナルのKlaviyo MCPサーバーから派生したものです。ライセンス情報については、オリジナルの作者にお問い合わせください。
👥 貢献者
マット・コートワースによるオリジナル作品
イヴァン・リベラによる強化版
🔗 外部リソース
Available Tools
47 toolsadd_profiles_to_listD
Inputs: list_id (required), profile_ids (required).
add_tag_to_resourceD
Inputs: tag_id (required), resource_type (required), resource_id (required).
create_coupon_codeD
Inputs: coupon_id (required), code (required).
create_eventD
Inputs: metric (required), profile (required), properties, time, +1 more.
create_listD
Inputs: name (required), list_type (required).
create_profileD
Inputs: email, phone_number, external_id, first_name, +2 more.
create_tagD
Inputs: name (required), tag_type (required).
create_templateD
Inputs: name (required), html (required), text.
create_webhookD
Inputs: endpoint (required), events (required), profile_id.
delete_profileD
Inputs: id (required).
delete_webhookD
Inputs: id (required).
get_campaignD
Inputs: id (required).
get_campaign_messageD
Inputs: id (required).
get_campaign_messagesD
Inputs: campaign_id (required).
get_campaign_metricsD
Inputs: id (required), metrics, start_date, end_date, +1 more.
get_campaign_performanceD
Inputs: id (required).
get_campaign_recipient_estimationD
Inputs: id (required).
get_campaignsD
Inputs: filter.
get_catalog_itemD
Inputs: catalog_id (required), item_id (required).
get_catalog_itemsD
Inputs: catalog_id (required), filter, page_size, page_cursor.
get_catalogsD
Inputs: page_size, page_cursor.
get_couponsD
Inputs: filter, page_size, page_cursor.
get_eventsD
Inputs: filter, page_size, page_cursor.
get_flowD
Inputs: id (required).
get_flowsD
Inputs: filter, page_size, page_cursor.
get_formD
Inputs: id (required).
get_formsD
Inputs: filter, page_size, page_cursor.
get_imageD
Inputs: id (required).
get_imagesD
Inputs: filter, page_size, page_cursor.
get_listD
Inputs: id (required).
get_listsD
Inputs: filter, page_size, page_cursor.
get_metricD
Inputs: id (required).
get_metricsD
Inputs: filter, page_size, page_cursor.
get_product_reviewD
Inputs: id (required).
get_product_reviewsD
Inputs: filter, page_size, page_cursor.
get_profileD
Inputs: id (required).
get_profilesD
Inputs: filter, page_size, page_cursor.
get_segmentD
Inputs: id (required).
get_segmentsD
Inputs: filter, page_size, page_cursor.
get_tagsD
Inputs: filter, page_size, page_cursor.
get_templateD
Inputs: id (required).
get_templatesD
Inputs: filter, page_size, page_cursor.
get_webhooksD
Inputs: page_size, page_cursor.
query_metric_aggregatesD
Inputs: metric_id (required), measurement (required), timeframe (required), group_by, +2 more.
request_profile_deletionD
Inputs: email, phone_number, profile_id.
update_flow_statusD
Inputs: id (required), status (required).
update_profileD
Inputs: id (required), email, phone_number, external_id, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 47 tools
Most tools have clearly distinct purposes targeting specific resources and actions, with minimal overlap. However, some pairs like get_campaign_message/get_campaign_messages or get_profile/get_profiles could cause minor confusion due to singular/plural naming without clear differentiation in descriptions.
Tool names follow a highly consistent verb_noun pattern throughout, with clear conventions for CRUD operations (create, get, update, delete, add) and resource naming. All tools use snake_case consistently without any deviations in style.
With 47 tools, the count is excessive for typical MCP server purposes, making it heavy and potentially overwhelming for agents. This suggests poor scoping, as many tools could likely be consolidated or omitted without losing functionality.
The tool set provides comprehensive coverage for a marketing/CRM domain, including profiles, campaigns, events, lists, and metrics. Minor gaps exist, such as missing update operations for resources like lists or templates, but core workflows are well-supported.
Maintenance
Related MCP Connectors
Hosted Klaviyo MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Marketo MCP server for AI. 130 tools to operate Marketo from Claude, Cursor, or ChatGPT.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides read-only access to Mailchimp's Marketing API for comprehensive email marketing data retrieval.38475 npm13MIT
- AlicenseNot gradedqualityDmaintenanceA comprehensive ModelContextProtocol server that provides AI-powered tools for marketing automation, content generation, research, and project management, integrating with various AI services to streamline workflows for developers and marketers.28 npm1MIT
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server for Marketing Connect AI integrations that provides tools, resources, and prompts for AI models to interact with marketing systems and data.-
- AlicenseAqualityBmaintenanceA Model Context Protocol server for Plunk, the open-source self-hosted email platform. Provides 84 tools for transactional email, contacts, campaigns, segments, templates, workflows, events, and analytics through the Plunk API.9419 npm2MIT