Skip to main content
Glama

Smartlead MCP Server

A Model Context Protocol (MCP) server that provides AI assistants with access to the Smartlead API for managing email campaigns, leads, email accounts, and analytics.

Features

This MCP server exposes 28 tools covering the core Smartlead API functionality:

Campaign Management (10 tools)

  • create_campaign - Create a new email campaign

  • get_campaign - Get campaign details by ID

  • list_campaigns - List all campaigns

  • update_campaign_schedule - Update scheduling settings

  • update_campaign_settings - Update general settings

  • update_campaign_status - Pause, stop, or start campaigns

  • delete_campaign - Delete a campaign

  • list_campaign_email_accounts - List email accounts for a campaign

  • add_campaign_email_accounts - Add email accounts to a campaign

  • remove_campaign_email_accounts - Remove email accounts from a campaign

Lead Management (9 tools)

  • list_campaign_leads - List leads in a campaign (with pagination)

  • add_leads_to_campaign - Add up to 100 leads to a campaign

  • pause_lead - Pause a lead in a campaign

  • resume_lead - Resume a paused lead

  • delete_lead_from_campaign - Delete a lead from a campaign

  • unsubscribe_lead_from_campaign - Unsubscribe lead from specific campaign

  • get_lead_by_email - Get lead details by email address

  • unsubscribe_lead_globally - Unsubscribe lead from all campaigns

  • get_lead_campaigns - Get all campaigns for a lead

Email Account Management (5 tools)

  • list_email_accounts - List all email accounts

  • get_email_account - Get email account details

  • update_warmup_settings - Configure email warmup settings

  • get_warmup_stats - Get warmup statistics (last 7 days)

  • reconnect_failed_accounts - Reconnect failed email accounts

Analytics (3 tools)

  • get_campaign_statistics - Get detailed campaign statistics

  • get_campaign_analytics - Get top-level campaign analytics

  • get_campaign_analytics_by_date - Get analytics for a date range

Related MCP server: Zapmail MCP Server

Installation

  1. Install dependencies:

npm install
  1. Build the project:

npm run build
  1. Get your Smartlead API key:

    • Log in to Smartlead

    • Navigate to Settings → Integrations

    • Copy your API key

  2. Set up environment variables:

cp .env.example .env
# Edit .env and add your API key

Configuration

For Claude Desktop

Add this configuration to your Claude Desktop config file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "smartlead": {
      "command": "node",
      "args": ["/absolute/path/to/smartlead-mcp/build/index.js"],
      "env": {
        "SMARTLEAD_API_KEY": "your_api_key_here"
      }
    }
  }
}

For Other MCP Clients

Use the standard MCP server connection with:

  • Command: node /path/to/smartlead-mcp/build/index.js

  • Environment: SMARTLEAD_API_KEY=your_api_key_here

Usage Examples

Once configured, you can use natural language to interact with Smartlead through your AI assistant:

Campaign Management

"Create a new campaign called 'Q1 Outreach'"
"List all my campaigns"
"Update the campaign schedule to run Monday-Friday 9am-5pm EST"
"Pause campaign 12345"

Lead Management

"Add these 5 leads to campaign 12345: [lead data]"
"Show me all leads in campaign 12345"
"Pause lead 67890 in campaign 12345"
"Get all campaigns for the lead with email john@example.com"

Email Accounts

"List all my email accounts"
"Get warmup stats for email account 456"
"Enable warmup for email account 456 with 20 emails per day"

Analytics

"Get analytics for campaign 12345"
"Show me campaign statistics for campaign 12345 from 2025-01-01 to 2025-01-31"
"Get top-level analytics for campaign 12345"

Development

Build

npm run build

Watch mode (for development)

npm run watch

Project Structure

smartlead-mcp/
├── src/
│   ├── index.ts              # Main MCP server entry point
│   ├── smartlead-client.ts   # API client wrapper
│   ├── tools/                # MCP tool implementations
│   │   ├── campaigns.ts      # Campaign management tools
│   │   ├── leads.ts          # Lead management tools
│   │   ├── email-accounts.ts # Email account tools
│   │   └── analytics.ts      # Analytics tools
│   └── types/
│       └── smartlead.ts      # TypeScript type definitions
├── openapi.yaml              # OpenAPI spec reference
├── package.json
├── tsconfig.json
└── README.md

API Reference

This MCP server is built on the Smartlead API. For detailed API documentation, see:

Security

  • Never commit your API key to version control

  • API keys are passed as query parameters to the Smartlead API (per their API design)

  • Store your API key in environment variables only

  • The .env file is gitignored by default

Troubleshooting

API Key Not Found

Error: SMARTLEAD_API_KEY environment variable is required

Solution: Make sure you've set the SMARTLEAD_API_KEY environment variable in your MCP client configuration.

API Errors

The server provides detailed error messages from the Smartlead API. Common issues:

  • 401 Unauthorized: Invalid API key

  • 404 Not Found: Campaign/Lead/Account ID doesn't exist

  • 429 Too Many Requests: Rate limit exceeded (wait and retry)

Build Errors

# Clean build directory and rebuild
rm -rf build/
npm run build

License

MIT

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

Support

For Smartlead API issues, contact Smartlead Support

For MCP server issues, please open an issue on this repository.

Available Tools

30 tools
add_campaign_email_accountsC

Add email accounts to a campaign

Inputs: campaign_id (required), email_account_ids (required).

add_leads_to_campaignB

Add leads to a campaign (max 100 leads per request)

Inputs: campaign_id (required), lead_list (required), settings.

create_campaignC

Create a new email campaign in Smartlead

Inputs: name (required), client_id.

create_email_accountC

Create a new email account by connecting existing SMTP/IMAP credentials (Gmail, Outlook, custom SMTP, etc.)

Inputs: from_name (required), from_email (required), username (required), password (required), +7 more.

delete_campaignC

Delete a campaign permanently

Inputs: campaign_id (required).

delete_lead_from_campaignC

Delete a lead from a campaign

Inputs: campaign_id (required), lead_id (required).

get_campaignC

Get details of a specific campaign by ID

Inputs: campaign_id (required).

get_campaign_analyticsC

Get top-level campaign analytics summary

Inputs: campaign_id (required).

get_campaign_analytics_by_dateC

Get campaign analytics for a specific date range

Inputs: campaign_id (required), start_date (required), end_date (required).

get_campaign_statisticsC

Get detailed campaign statistics with optional filters

Inputs: campaign_id (required), offset, limit, email_sequence_number, +1 more.

get_email_accountC

Get details of a specific email account

Inputs: account_id (required).

get_lead_by_emailC

Get lead details by email address

Inputs: email (required).

get_lead_campaignsC

Get all campaigns associated with a lead

Inputs: lead_id (required).

get_warmup_statsC

Get warmup statistics for an email account (last 7 days)

Inputs: account_id (required).

list_campaign_email_accountsC

List all email accounts associated with a campaign

Inputs: campaign_id (required).

list_campaign_leadsC

List all leads in a campaign with pagination

Inputs: campaign_id (required), offset, limit.

list_campaignsB

List all campaigns in your Smartlead account

Inputs: no named parameters.

list_email_accountsC

List all email accounts with pagination

Inputs: offset, limit.

pause_leadC

Pause a lead in a campaign

Inputs: campaign_id (required), lead_id (required).

reconnect_failed_accountsB

Reconnect all failed email accounts (bulk operation)

Inputs: no named parameters.

remove_campaign_email_accountsC

Remove email accounts from a campaign

Inputs: campaign_id (required), email_account_ids (required).

resume_leadC

Resume a paused lead in a campaign

Inputs: campaign_id (required), lead_id (required), resume_lead_with_delay_days.

save_campaign_sequencesA

Create or update email sequences for a campaign. Pass id to update existing sequence, omit or set null to create new. Supports A/B testing with multiple variants.

Inputs: campaign_id (required), sequences (required), ab_testing_config.

unsubscribe_lead_from_campaignC

Unsubscribe a lead from a specific campaign

Inputs: campaign_id (required), lead_id (required).

unsubscribe_lead_globallyA

Unsubscribe a lead from all campaigns globally

Inputs: lead_id (required).

update_campaign_scheduleC

Update campaign schedule settings (timezone, days, hours, lead limits)

Inputs: campaign_id (required), timezone, days_of_the_week, start_hour, +4 more.

update_campaign_settingsC

Update campaign general settings (tracking, unsubscribe text, etc.)

Inputs: campaign_id (required), track_settings, stop_lead_settings, unsubscribe_text, +4 more.

update_campaign_statusC

Update campaign status (PAUSED, STOPPED, or START)

Inputs: campaign_id (required), status (required).

update_email_accountC

Update email account settings (SMTP/IMAP credentials, message limits, etc.)

Inputs: email_account_id (required), from_name, from_email, username, +8 more.

update_warmup_settingsC

Update warmup settings for an email account

Inputs: email_account_id (required), warmup_enabled (required), total_warmup_per_day, daily_rampup, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

    TDQS

    B3.2/5.0

    Scored across 30 tools

    Disambiguation4/5

    Most tools have distinct purposes targeting specific resources and actions, but there is some overlap between analytics tools (get_campaign_analytics, get_campaign_analytics_by_date, get_campaign_statistics) that could cause confusion. The lead management tools (pause_lead, resume_lead, unsubscribe_lead_from_campaign, unsubscribe_lead_globally) are well-differentiated.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern with clear action verbs (add, create, delete, get, list, pause, reconnect, remove, resume, save, unsubscribe, update). The naming is uniform throughout, using snake_case exclusively without any deviations.

    Tool Count3/5

    With 30 tools, the count is borderline high for an email campaign management server. While it covers many operations, it may feel heavy and could benefit from consolidation or better scoping. The number is not extreme but pushes the upper limit of typical well-scoped sets.

    Completeness5/5

    The tool set provides comprehensive coverage for email campaign management, including full CRUD for campaigns, email accounts, and leads, plus analytics, scheduling, warmup, and sequence management. There are no obvious gaps, and agents can handle complete workflows without dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      F
      maintenance
      A Model Context Protocol server that provides AI coding assistants (Claude, Cursor, etc.) with access to SmartLead's cold email automation platform through 116+ API endpoints for campaign management, lead tracking, and email delivery.
      1,893 npm
      21
      MIT
    • A
      license
      C
      quality
      D
      maintenance
      Enables AI assistants to interact with the Zapmail API through natural language commands for domain management, mailbox operations, and exports to third-party platforms like Reachinbox and Instantly. Provides complete coverage of 46+ Zapmail tools with dynamic API integration and multi-workspace support.
      100
      309 npm
      3
      MIT
    • A
      license
      A
      quality
      F
      maintenance
      Enables interaction with Instantly.ai email outreach platform through 31 tools across accounts, campaigns, leads, emails, and analytics. Supports both local and remote deployment with multi-tenant authentication.
      27
      MIT