smartlead-mcp-server-sse

smartlead-mcp-server-sse

An MCP server that enables AI agents to manage Smartlead campaigns, including creating campaigns, updating schedules, managing email sequences, and adding leads, all over SSE.

Category
访问服务器

README

One Click Deploy Smartlead MCP Server with SSE

Deploy on Railway

This is a Model Context Protocol (MCP) server, enhanced with Supergateway, that allows AI agents to interact with the Smartlead campaign management API over Server-Sent Events (SSE).

Deployment

One-Click Deploy to Railway

Click the "Deploy on Railway" button above. Railway will guide you through creating a new project from this template and configuring the necessary environment variables (see "Configuration" below).

Docker Deployment (Manual / Local Testing)

The Dockerfile in this repository builds the smartlead-mcp-server and runs it with Supergateway.

  1. Build the Docker Image:

    docker build -t smartlead-mcp-server-supergateway .
    
  2. Run the Docker Container:

    # Replace YOUR_SMARTLEAD_API_KEY with your actual Smartlead API key
    # The server will be accessible via SSE on http://localhost:8001/sse (host port 8001 mapped to container port 8000)
    docker run --rm -it -p 8001:8000 \
      -e PORT=8000 \
      -e SMARTLEAD_API_KEY="YOUR_SMARTLEAD_API_KEY" \
      -e SMARTLEAD_API_URL="https://server.smartlead.ai/api/v1" \
      -e DEBUG=true \
      smartlead-mcp-server-supergateway
    

    Supergateway provides default paths: /sse for the event stream and /message for posting messages. The health check is at /healthz.

Configuration

The server requires the following environment variables. When deploying to Railway, you will be prompted for these. For local Docker runs, pass them using the -e flag.

  • SMARTLEAD_API_KEY: Your Smartlead API key. Required and should be treated as a secret.
  • SMARTLEAD_API_URL (Optional): Custom Smartlead API URL. Defaults to https://server.smartlead.ai/api/v1.
  • SMARTLEAD_RETRY_MAX_ATTEMPTS (Optional): Maximum retry attempts for API calls. Default: 3.
  • SMARTLEAD_RETRY_INITIAL_DELAY (Optional): Initial delay in milliseconds for retries. Default: 1000.
  • SMARTLEAD_RETRY_MAX_DELAY (Optional): Maximum delay in milliseconds for retries. Default: 10000.
  • SMARTLEAD_RETRY_BACKOFF_FACTOR (Optional): Backoff factor for retry delays. Default: 2.
  • DEBUG (Optional): Set to true for verbose logging from the server and Supergateway, or false for production. Default: false.
  • PORT (Set by Railway/Container): The port Supergateway will listen on inside the container. The Dockerfile default is 8000. When running locally with Docker, you map a host port to this container port (e.g., -p 8001:8000).

Connecting to the Server (Client Integration)

Once the smartlead-mcp-server is running (e.g., deployed on Railway or locally in Docker), it exposes an MCP interface over Server-Sent Events (SSE).

The Supergateway instance typically makes the MCP server available at:

  • SSE Stream: http://<server_address>:<port>/sse
  • Message Endpoint (if used): http://<server_address>:<port>/message

(If deployed on Railway, <server_address>:<port> will be your public Railway URL, e.g., https://my-smartlead-mcp.up.railway.app)

  1. Direct SSE Connection (Preferred for SSE-aware clients): If your MCP client (e.g., your AI agent's framework) natively supports connecting to an MCP server via an SSE URL, configure it accordingly.

    Example mcp.json configuration for direct SSE:

    {
      "mcpServers": {
        "smartlead_remote_sse": {
          "url": "https://YOUR_RAILWAY_DEPLOYMENT_URL/sse", // Replace with your actual Railway SSE URL
          "disabled": false,
          "alwaysAllow": [
            "smartlead_create_campaign",
            "smartlead_update_campaign_schedule",
            "smartlead_update_campaign_settings",
            "smartlead_get_campaign",
            "smartlead_list_campaigns",
            "smartlead_save_campaign_sequence",
            "smartlead_get_campaign_sequence",
            "smartlead_update_campaign_sequence",
            "smartlead_delete_campaign_sequence",
            "smartlead_add_email_account_to_campaign",
            "smartlead_update_email_account_in_campaign",
            "smartlead_delete_email_account_from_campaign",
            "smartlead_add_lead_to_campaign",
            "smartlead_update_lead_in_campaign",
            "smartlead_delete_lead_from_campaign"
          ],
          "timeout": 300
        }
      }
    }
    
  2. Using Supergateway on the Client-Side (SSE-to-stdio bridge): If your MCP client expects to launch a local command that communicates via stdio (standard input/output), you can use another Supergateway instance locally on the client's machine to bridge the remote SSE connection back to stdio.

    Example mcp.json or similar client configuration for the bridge:

    {
      "mcpServers": {
        "smartlead_remote_via_bridge": {
          "command": "npx",
          "args": [
            "-y",
            "supergateway",
            "--sse", "https://YOUR_RAILWAY_DEPLOYMENT_URL", // Replace with your actual Railway base URL (without /sse)
            // Supergateway will append /sse by default
            "--logLevel", "info" // Optional: for debugging Supergateway on the client
          ],
          "disabled": false,
          "alwaysAllow": [ /* ... list of Smartlead tools as above ... */ ]
        }
      }
    }
    

Original Features (from base Smartlead MCP Server)

  • 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)

Local Development Setup (without Docker/Supergateway)

  1. Clone the repository
  2. Install dependencies:
    npm install
    
  3. Create a .env file (e.g., from .env.example) and add your Smartlead API key:
    SMARTLEAD_API_KEY=your_api_key_here
    
  4. Build the project:
    npm run build
    
  5. Start the server directly (stdio mode):
    npm start 
    # or node dist/index.js
    

Example Local mcp.json for stdio mode (original setup)

{
  "mcpServers": {
    "smartlead_local_stdio": {
      "command": "node",
      // Adjust path to your local built server:
      "args": ["FULL_PATH_TO_YOUR_PROJECT/smartlead-mcp-server/dist/index.js"], 
      "env": {
        "SMARTLEAD_API_KEY": "your_api_key_here"
      },
      "disabled": false,
      "alwaysAllow": [ /* ... list of Smartlead tools ... */ ]
    }
  }
}

Available Tools

(This section lists the tools provided by the server. Refer to the original README sections for detailed parameters, or use MCP introspection if available.)

Campaign Management

  • smartlead_create_campaign
  • smartlead_update_campaign_schedule
  • smartlead_update_campaign_settings
  • smartlead_get_campaign
  • smartlead_list_campaigns

Campaign Sequence Management

  • smartlead_save_campaign_sequence
  • smartlead_get_campaign_sequence
  • smartlead_update_campaign_sequence
  • smartlead_delete_campaign_sequence

Email Account Management in Campaigns

  • smartlead_add_email_account_to_campaign
  • smartlead_update_email_account_in_campaign
  • smartlead_delete_email_account_from_campaign

Lead Management in Campaigns

  • smartlead_add_lead_to_campaign
  • smartlead_update_lead_in_campaign
  • smartlead_delete_lead_from_campaign

Credits

Based on: https://github.com/lkm1developer/smartlead-mcp-server

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选