miskakaskinen/Smartlead-Campaign-MCP-server
If you are the rightful owner of Smartlead-Campaign-MCP-server 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.
The Smartlead MCP Server is a Model Context Protocol server designed to interact with the Smartlead API, facilitating campaign management through a standardized protocol.
Smartlead MCP Server
A Model Context Protocol (MCP) server implementation for interacting with the Smartlead API. This server provides tools for managing campaigns through Smartlead's API.
Overview
This project implements an MCP server that exposes Smartlead API endpoints as tools for AI assistants. It enables AI agents to perform operations like creating, updating, and analyzing email campaigns in Smartlead through a standardized protocol.
Features
The server provides comprehensive tools for:
Campaign Management
- List, create, and manage campaigns
- Update campaign schedules and settings
- Save and manage campaign sequences
- Export campaign data and analytics
Prerequisites
- Python 3.12+
- Docker (recommended for deployment)
- Smartlead API credentials
Installation
Using uv
-
Install uv if you don't have it:
pip install uv
-
Clone this repository:
git clone https://github.com/miskakaskinen/Smartlead-Campaign-MCP-server.git cd Smartlead-Campaign-MCP-server
-
Install dependencies:
uv pip install -e .
-
Create a
.env
file based on.env.example
:cp .env.example .env
Using Docker (Recommended)
-
Build the Docker image:
docker build -t smartlead/mcp-campaign .
-
Create a
.env
file and configure your environment variables
Configuration
Configure the following environment variables in your .env
file:
Variable | Description | Required |
---|---|---|
TRANSPORT | Transport protocol (sse) | Yes |
SMARTLEAD_API_KEY | Your Smartlead API key | Yes |
SMARTLEAD_API_URL | Smartlead API URL | Yes |
HOST | Host to bind to (default: 0.0.0.0) | Yes |
PORT | Port to listen on (default: 8050) | Yes |
LOG_LEVEL | Logging level (INFO/DEBUG) | Yes |
Running the Server
Using uv
SSE Transport
# Set TRANSPORT=sse in .env then:
uv run src/main.py
The MCP server will essentially be run as an API endpoint that you can then connect to with config shown below.
Using Docker with SSE Transport (Recommended)
Run the container with SSE transport:
docker run -p 8050:8050 --env-file .env smartlead/mcp-campaign
Integration with MCP Clients
Add this configuration to your MCP client (e.g., Claude Desktop, Windsurf):
{
"mcpServers": {
"smartlead": {
"transport": "sse",
"url": "http://localhost:8050/sse"
}
}
}
Note for n8n users: Use host.docker.internal instead of localhost since n8n has to reach outside of its own container to the host machine:
So the full URL in the MCP node would be: http://host.docker.internal:8050/sse
Available Tools
Campaign Management
list_campaigns
: List all campaignsget_campaign
: Get campaign by IDcreate_campaign
: Create a new campaignupdate_campaign_schedule
: Update campaign scheduleupdate_campaign_settings
: Update campaign settingssave_campaign_sequence
: Save campaign sequencepatch_campaign_status
: Update campaign statusget_campaign_analytics
: Get campaign analyticsget_campaign_sequence
: Get campaign sequenceget_campaigns_by_lead_id
: Get campaigns by lead IDexport_campaign_data
: Export campaign dataget_campaign_sequence_analytics
: Get sequence analytics