This is a Model Context Protocol (MCP) server for Smartlead campaign management integration. It provides tools for creating and managing campaigns, updating campaign settings, and managing campaign sequences.
- Create new campaigns
- Update campaign schedule settings
- Update campaign general settings
- Get campaign details
- List all campaigns with filtering options
- Manage campaign email sequences (save, get, update, delete)
- Manage email accounts in campaigns (add, update, delete)
- Manage leads in campaigns (add, update, delete)
- Clone the repository
- Install dependencies:
npm install- Create a
.envfile based on.env.exampleand add your Smartlead API key:
SMARTLEAD_API_KEY=your_api_key_here
- Build the project:
npm run buildTo start the server directly:
npm startTo use this MCP server with Claude, you need to add it to the MCP settings file:
- For Claude VSCode extension, add it to
c:\Users\<username>\AppData\Roaming\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json - For Claude desktop app, add it to
%APPDATA%\Claude\claude_desktop_config.jsonon Windows
Example configuration:
{
"mcpServers": {
"smartlead": {
"command": "node",
"args": ["E:/mcp-servers/smartlead/dist/index.js"],
"env": {
"SMARTLEAD_API_KEY": "your_api_key_here"
},
"disabled": false,
"autoApprove": []
}
}
}Replace your_api_key_here with your actual Smartlead API key.
The server can be configured using environment variables:
SMARTLEAD_API_KEY(required): Your Smartlead API keySMARTLEAD_API_URL(optional): Custom API URL (defaults to https://server.smartlead.ai/api/v1)SMARTLEAD_RETRY_MAX_ATTEMPTS: Maximum retry attempts for API calls (default: 3)SMARTLEAD_RETRY_INITIAL_DELAY: Initial delay in milliseconds for retries (default: 1000)SMARTLEAD_RETRY_MAX_DELAY: Maximum delay in milliseconds for retries (default: 10000)SMARTLEAD_RETRY_BACKOFF_FACTOR: Backoff factor for retry delays (default: 2)
Create a new campaign in Smartlead.
Parameters:
name(required): Name of the campaignclient_id(optional): Client ID for the campaign
Update a campaign's schedule settings.
Parameters:
campaign_id(required): ID of the campaign to updatetimezone: Timezone for the campaign (e.g., "America/Los_Angeles")days_of_the_week: Days of the week to send emails (1-7, where 1 is Monday)start_hour: Start hour in 24-hour format (e.g., "09:00")end_hour: End hour in 24-hour format (e.g., "17:00")min_time_btw_emails: Minimum time between emails in minutesmax_new_leads_per_day: Maximum number of new leads per dayschedule_start_time: Schedule start time in ISO format
Update a campaign's general settings.
Parameters:
campaign_id(required): ID of the campaign to updatename: New name for the campaignstatus: Status of the campaign (active, paused, completed)settings: Additional campaign settings
Get details of a specific campaign by ID.
Parameters:
campaign_id(required): ID of the campaign to retrieve
List all campaigns with optional filtering.
Parameters:
status: Filter campaigns by status (active, paused, completed, all)limit: Maximum number of campaigns to returnoffset: Offset for pagination
Save a sequence of emails for a campaign with A/B testing variants.
Parameters:
campaign_id(required): ID of the campaignsequences(required): Array of email sequence items, each with:id: ID of the sequence (only for updates, omit when creating)seq_number(required): Sequence number (order in the sequence)seq_delay_details(required): Delay settings with:delay_in_days(required): Days to wait before sending this email
variant_distribution_type: Type of variant distribution (MANUAL_EQUAL, MANUAL_PERCENTAGE, AI_EQUAL)lead_distribution_percentage: Sample percentage size of the lead pool to use to find the winnerwinning_metric_property: Metric to use for determining the winning variant (OPEN_RATE, CLICK_RATE, REPLY_RATE, POSITIVE_REPLY_RATE)seq_variants: Array of email variants, each with:subject(required): Email subject lineemail_body(required): Email body content (HTML)variant_label(required): Label for the variant (e.g., "A", "B", "C")id: ID of the variant (only for updates, omit when creating)variant_distribution_percentage: Percentage of leads to receive this variant
subject: Email subject line (for simple follow-ups, blank makes it in the same thread)email_body: Email body content (HTML) for simple follow-ups
Get the sequence of emails for a campaign.
Parameters:
campaign_id(required): ID of the campaign
Update a specific email in a campaign sequence.
Parameters:
campaign_id(required): ID of the campaignsequence_id(required): ID of the sequence email to updatesubject: Updated email subject linebody: Updated email body contentwait_days: Updated days to wait before sending this email
Delete a specific email from a campaign sequence.
Parameters:
campaign_id(required): ID of the campaignsequence_id(required): ID of the sequence email to delete
Add an email account to a campaign.
Parameters:
campaign_id(required): ID of the campaignemail_account_id(required): ID of the email account to add
Update an email account in a campaign.
Parameters:
campaign_id(required): ID of the campaignemail_account_id(required): ID of the email account to updatesettings: Settings for the email account in this campaign
Remove an email account from a campaign.
Parameters:
campaign_id(required): ID of the campaignemail_account_id(required): ID of the email account to remove
Add leads to a campaign (up to 100 leads at once).
Parameters:
campaign_id(required): ID of the campaignlead_list(required): Array of lead information objects (max 100), each with:email(required): Email address of the leadfirst_name: First name of the leadlast_name: Last name of the leadcompany_name: Company name of the leadphone_number: Phone number of the leadwebsite: Website of the leadlocation: Location of the leadcustom_fields: Custom fields for the lead (max 20 fields)linkedin_profile: LinkedIn profile URL of the leadcompany_url: Company URL of the lead
settings: Settings for lead addition:ignore_global_block_list: If true, uploaded leads will bypass the global block listignore_unsubscribe_list: If true, leads will bypass the comparison with unsubscribed leadsignore_community_bounce_list: If true, uploaded leads will bypass any leads that bounced across the entire userbaseignore_duplicate_leads_in_other_campaign: If true, leads will NOT bypass the comparison with other campaigns
Update a lead in a campaign.
Parameters:
campaign_id(required): ID of the campaignlead_id(required): ID of the lead to updatelead(required): Updated lead information with:email: Email address of the leadfirst_name: First name of the leadlast_name: Last name of the leadcompany: Company of the leadcustom_variables: Custom variables for the lead
Remove a lead from a campaign.
Parameters:
campaign_id(required): ID of the campaignlead_id(required): ID of the lead to remove
MIT