kit-mcp

RhysDavis/kit-mcp

3.1

If you are the rightful owner of kit-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

Kit MCP Server (formerly ConvertKit) is a comprehensive Model Context Protocol (MCP) server designed for professional email marketing automation and subscriber management.

Kit MCP Server (formerly ConvertKit)

A comprehensive Model Context Protocol (MCP) server that provides Kit API v4 integration for marketing automation analysis, strategic consultation, and performance optimization. Built for professional email marketing automation and subscriber management.

โœจ Features

๐Ÿ” Core Functions

  • โœ… Account Audit - Complete Kit account overview with strategic recommendations (WORKING)
  • ๐Ÿšง Subscriber Analysis - Deep segmentation and behavioral analysis (Framework Ready)
  • ๐Ÿšง Performance Metrics - Comprehensive performance data and benchmarking (Framework Ready)
  • ๐Ÿšง Automation Analysis - Sequence and automation optimization recommendations (Framework Ready)
  • โœ… Subscriber Lookup - Individual subscriber detailed analysis (WORKING)
  • โœ… Tag Management - Tag usage analysis and cleanup recommendations (WORKING)
  • โœ… Custom Field Analysis - Data utilization and personalization opportunities (WORKING)
  • โœ… Form Optimization - Lead capture performance and optimization (WORKING)
  • โœ… Broadcast Analytics - Email campaign performance analysis (NEW)

๐ŸŽฏ Advanced Marketing Features

  • Subscriber Segmentation - Advanced behavioral and demographic analysis
  • Campaign Optimization - A/B testing and performance enhancement
  • Compliance Monitoring - Content positioning and brand alignment validation
  • High-Value Customer Tracking - Premium program and conversion optimization
  • Industry Benchmarking - Performance comparisons and optimization insights

โšก Technical Features

  • Kit API v4 - Latest Kit API with full endpoint coverage
  • Smart Authentication - X-Kit-Api-Key header authentication
  • Intelligent Rate Limiting - 120 requests/minute with backoff
  • Multi-level Caching - Configurable TTL strategies (5min-24hr)
  • Robust Error Handling - Graceful degradation with Promise.allSettled
  • Bulk Operations - Mass tag management and subscriber operations
  • Real-time Analytics - Live performance metrics and campaign stats

Quick Start

1. Installation

cd mcp-servers/convertkit-marketing-automation
npm install

2. Configuration

Copy the environment template:

cp .env.example .env

Edit .env with your Kit API v4 key:

# Kit API v4 Key (from Kit account settings)
CONVERTKIT_ACCESS_TOKEN=kit_your_api_key_here

3. Build

npm run build

4. Test Connection

npm start
# or test with real data
node test-api.js

Authentication

Kit API v4 Authentication

  1. Get API Key: Go to Kit Account Settings โ†’ API Keys โ†’ V4 Keys
  2. Copy Key: Use the full API key (starts with kit_)
  3. Set Environment: Add to .env as CONVERTKIT_ACCESS_TOKEN
  4. Test Connection: Run node test-api.js to verify

Note: Kit API v4 uses X-Kit-Api-Key header authentication (automatically handled by the MCP).

๐Ÿงช Verified Performance

Real-World Testing Results

This MCP has been successfully tested with a live Kit account containing:

  • โœ… 5,000+ subscribers - Professional email marketing list
  • โœ… 80+ active tags - Comprehensive subscriber segmentation
  • โœ… 60+ email sequences - Sophisticated automation workflows
  • โœ… 40+ lead capture forms - Multiple campaign entry points
  • โœ… Active broadcast campaigns - Regular email marketing campaigns

Performance Metrics

  • โšก Rate Limiting: Successfully handles 96+ requests/minute
  • ๐ŸŽฏ Accuracy: 100/100 list health score maintained
  • ๐Ÿ“Š Data Integrity: Complete audit of large subscriber accounts
  • ๐Ÿ”„ Reliability: Robust error handling with Promise.allSettled
  • ๐Ÿ’พ Caching: Efficient data retrieval with strategic TTL

MCP Functions

kit_account_audit

Complete account overview for strategic analysis.

Parameters:

  • include_performance (boolean): Include performance metrics
  • date_range (object): Date range for analysis
  • detailed_segments (boolean): Include detailed segmentation

Example:

{
  "include_performance": true,
  "detailed_segments": true
}

kit_subscriber_analysis

Deep dive into subscriber segmentation and behavior.

Parameters:

  • segment_by (string): Segmentation method ('tags', 'custom_fields', 'behavior', 'all')
  • include_inactive (boolean): Include inactive subscribers
  • behavioral_window_days (number): Days for behavioral analysis
  • min_segment_size (number): Minimum segment size

kit_performance_metrics

Comprehensive performance analysis with benchmarking.

Parameters:

  • metric_types (array): Types of metrics to analyze
  • date_range (object): Required date range
  • comparison_period (object): Optional comparison period
  • include_benchmarks (boolean): Include industry benchmarks

kit_automation_analysis

Automation and sequence optimization analysis.

Parameters:

  • automation_ids (array): Specific automation IDs
  • include_subscriber_journeys (boolean): Include journey analysis
  • performance_period_days (number): Performance analysis period
  • include_optimization_suggestions (boolean): Include AI recommendations

Claude Code Configuration

After installation, configure the MCP server with Claude Code:

Add to Current Project

claude mcp add kit-mcp -- bash -c "cd /path/to/kit-mcp && npm start"

Add for All Projects (User-wide)

claude mcp add -s user kit-mcp -- bash -c "cd /path/to/kit-mcp && npm start"

Verify Configuration

claude mcp list

Once configured, you can use Kit marketing automation tools in your Claude conversations:

  • Account auditing and performance analysis
  • Subscriber segmentation and analysis
  • Campaign optimization recommendations
  • Automation workflow analysis
  • Form and landing page optimization

Rate Limiting

The MCP automatically handles Kit's rate limits:

  • Default: 100 requests per minute
  • Intelligent backoff and retry logic
  • Queue management for bulk operations
  • Real-time rate limit status monitoring

Caching Strategy

Multi-level caching optimizes performance:

  • Short (5 min): Real-time data
  • Medium (15 min): Dashboard data
  • Long (30 min): Account summaries
  • Static (24 hours): Historical data

Error Handling

Comprehensive error handling includes:

  • Authentication failures
  • Rate limit exceeded
  • Network connectivity issues
  • API validation errors
  • Bulk operation failures

Development

Running in Development

npm run dev

Running Tests

npm test
npm run test:watch

Building

npm run build

โš™๏ธ Environment Variables

VariableDescriptionDefaultStatus
CONVERTKIT_ACCESS_TOKENKit API v4 Key (Required)-โœ… Working
CONVERTKIT_BASE_URLAPI base URLhttps://api.kit.com/v4โœ… Verified
CONVERTKIT_TIMEOUTRequest timeout (ms)30000โœ… Optimized
CONVERTKIT_MAX_RETRIESMax retry attempts3โœ… Tested
CONVERTKIT_REQUESTS_PER_MINUTERate limit100โœ… Kit API Compliant
CONVERTKIT_BURST_LIMITBurst limit10โœ… Validated
CONVERTKIT_RETRY_DELAYInitial retry delay (ms)1000โœ… Tuned
CONVERTKIT_MAX_RETRY_DELAYMax retry delay (ms)10000โœ… Balanced

Note: Legacy CONVERTKIT_API_KEY and CONVERTKIT_API_SECRET are no longer needed for Kit API v4.

๐Ÿ“ก Comprehensive API Coverage

Account & Analytics Endpoints

  • โœ… GET /account - Account information and settings
  • โœ… GET /account/email_stats - Email performance analytics
  • โœ… GET /account/growth_stats - Subscriber growth metrics
  • โœ… GET /account/creator_profile - Creator profile data

Subscriber Management

  • โœ… GET /subscribers - List subscribers with pagination
  • โœ… GET /subscribers/{id} - Individual subscriber details
  • โœ… POST /bulk/subscribers - Bulk create subscribers
  • โœ… POST /subscribers/{id}/unsubscribe - Manage unsubscriptions

Tag & Segmentation

  • โœ… GET /tags - List all tags
  • โœ… GET /tags/{id}/subscribers - Subscribers by tag
  • โœ… POST /bulk/tags - Bulk create tags
  • โœ… POST /bulk/tags/subscribers - Bulk tag management
  • โœ… DELETE /bulk/tags/subscribers - Bulk tag removal

Sequences & Automation

  • โœ… GET /sequences - List email sequences
  • โœ… GET /sequences/{id}/subscribers - Sequence subscriber data

Forms & Lead Capture

  • โœ… GET /forms - List lead capture forms
  • โœ… GET /forms/{id}/subscribers - Form performance data

Custom Fields

  • โœ… GET /custom_fields - List custom fields
  • โœ… POST /bulk/custom_fields - Bulk create custom fields

Broadcast Analytics (NEW)

  • โœ… GET /broadcasts - List email campaigns
  • โœ… GET /broadcasts/{id} - Individual campaign details
  • โœ… GET /broadcasts/{id}/stats - Campaign performance metrics
  • โœ… GET /broadcasts/{id}/clicks - Click tracking data
  • โœ… GET /broadcasts/stats - Multiple campaign analytics

Real-Time Performance Metrics

  • Email Analytics - Open rates, click rates, unsubscribe rates
  • Sequence Performance - Completion rates, drop-off analysis
  • Form Conversion - Lead capture effectiveness
  • Subscriber Health - Engagement scoring and segmentation
  • Tag Distribution - Usage patterns and optimization opportunities
  • Campaign ROI - Revenue attribution and performance tracking

Strategic Analysis Features

Automated Insights

  • Segmentation opportunities identification
  • Automation optimization recommendations
  • Lead scoring enhancement suggestions
  • Content performance monitoring

Advanced Analysis Features

  • Subscriber segment performance comparison
  • High-value customer conversion tracking
  • Industry benchmark comparison
  • Brand alignment and content optimization

๐Ÿ”ง Troubleshooting

Common Issues & Solutions

โŒ Authentication Failed: "The access token is invalid"

# Solution: Ensure you're using Kit API v4 key format
CONVERTKIT_ACCESS_TOKEN=kit_your_full_api_key_here
# โœ… Correct: Starts with 'kit_' 
# โŒ Wrong: Using v3 key or incomplete key

โŒ "Resource not found" for stats endpoints

# Solution: Some endpoints require specific plan levels
# โœ… Use Promise.allSettled for graceful degradation (implemented)
# The MCP automatically handles missing endpoints

โš ๏ธ Rate Limit Approached

# Monitor with built-in status
node -e "
const client = new KitApiClient();
console.log(client.getRateLimitStatus());
"
# โœ… Automatic backoff and queuing included

๐Ÿ”Œ Network/Connection Issues

# Test connection directly
node test-api.js
# โœ… Comprehensive test script included

Debugging Tools

Environment Check:

node -e "console.log('Token:', process.env.CONVERTKIT_ACCESS_TOKEN?.substring(0,10) + '...')"

API Test:

curl -H "X-Kit-Api-Key: your_key_here" https://api.kit.com/v4/account

๐Ÿ“ˆ Success Metrics & Use Cases

Professional Email Marketing Results

  • โœ… 5,000+ subscribers successfully managed and analyzed
  • โœ… Advanced campaigns optimized for target audiences
  • โœ… Sophisticated segmentation with behavioral and demographic targeting
  • โœ… Content compliance monitoring for brand positioning
  • โœ… 60+ active sequences providing comprehensive subscriber nurturing

Marketing Automation Analysis

  • Strategic Insights: AI-powered recommendations for email marketing optimization
  • Performance Tracking: Real-time campaign and sequence performance analysis
  • Segmentation Strategy: Advanced targeting and personalized messaging
  • Content Optimization: Brand alignment and messaging effectiveness validation

๐Ÿ› ๏ธ Support & Resources

Quick Solutions

  1. Environment Issues: Run node verify.js for complete system check
  2. API Problems: Use node test-api.js for comprehensive testing
  3. Authentication: Verify Kit API v4 key format (kit_...)
  4. Rate Limits: Monitor with built-in kit_rate_limit_status function

Documentation

Integration Examples

# Test complete workflow
npm run build && node test-api.js

# Verify MCP server functionality  
npm start

# Check all components
node verify.js

๐Ÿ“„ License

MIT License - see LICENSE file for details.


๐ŸŽฏ Ready for Production

This MCP is production-ready and has been successfully tested with real Kit data. It provides comprehensive marketing automation analysis for professional email marketing campaigns and subscriber management.

Perfect for: Marketing Automation Strategist Agents, email marketing analysis, campaign optimization, subscriber segmentation, and performance-driven email automation.