Smartlead Simplified MCP Server

Smartlead Simplified MCP Server

A Multi-Channel Proxy server that provides a structured interface for interacting with Smartlead's API, organizing functionality into logical tools for campaign management, lead management, and other marketing automation features.

Category
访问服务器

README

Smartlead Simplified MCP Server (with Licensing)

This application provides a simplified interface or Multi-Channel Proxy (MCP) for interacting with the Smartlead API. It organizes Smartlead API calls into logical tools and categories, facilitating integration with various clients and workflows.

Licensing: This server integrates with an external license server (smartlead-license-server) to manage feature access based on user subscription tiers (e.g., Free, Basic, Premium). Availability of certain features and tool categories depends on the active license tier validated against the configured license server.

Core Features

  • Proxies Smartlead API: Acts as an intermediary for Smartlead API calls.
  • Tool Abstraction: Provides a structured set of tools for managing:
    • Campaign Management
    • Lead Management
    • Campaign Statistics
    • Smart Delivery (Spam Tests, DNS Checks, etc.)
    • Webhooks
    • Client Management
    • Smart Senders (Domain/Mailbox Purchase)
  • License Validation: Checks license status against an external server to enable appropriate features.
  • Multiple Operation Modes: Supports standard STDIO communication, Server-Sent Events (SSE) for web clients, and optional Supergateway integration.
  • Configurable: Retry logic, API endpoints, and feature flags can be configured via environment variables.

Prerequisites

  • Node.js (v18+ recommended)
  • npm or yarn
  • A Smartlead API Key.
  • A running instance of the smartlead-license-server application (either deployed or running locally).
  • A valid License Key obtained from the smartlead-license-server instance.

Setup Instructions

  1. Clone this repository:

    git clone https://github.com/your-username/smartlead-simplified.git
    cd smartlead-simplified
    
  2. Install dependencies:

    npm install
    # or
    yarn install
    
  3. Configure Environment Variables: Copy the example environment file .env.example to a new file named .env:

    cp .env.example .env
    

    Edit the .env file and provide the necessary values:

    # --- Core Smartlead Configuration ---
    SMARTLEAD_API_KEY=your_smartlead_api_key_here # (Required)
    # SMARTLEAD_API_URL=https://custom-server.smartlead.ai/api/v1 # (Optional)
    
    # --- License Server Integration ---
    LICENSE_SERVER_URL=https://sea-turtle-app-64etr.ondigitalocean.app # (Required) URL of your license server
    
    # License Key for this application instance (required)
    # The license key generated by your smartlead-license-server after a successful purchase.
    # Obtain your key by purchasing a plan at: https://sea-turtle-app-64etr.ondigitalocean.app/
    JEAN_LICENSE_KEY=SL-XXXX-XXXX-XXXX # (Required) Your license key
    
    # --- Optional Configurations ---
    # Retry Logic
    SMARTLEAD_RETRY_MAX_ATTEMPTS=3
    SMARTLEAD_RETRY_INITIAL_DELAY=1000
    SMARTLEAD_RETRY_MAX_DELAY=10000
    SMARTLEAD_RETRY_BACKOFF_FACTOR=2
    
    # Supergateway Integration
    # USE_SUPERGATEWAY=false
    # SUPERGATEWAY_API_KEY=your_supergateway_api_key
    
    # License Level Override (for Development/Testing)
    # Force a specific tier locally, bypassing the server check.
    # Values: 'free', 'basic', 'premium'. Leave blank for normal operation.
    # LICENSE_LEVEL_OVERRIDE=
    
  4. (If using TypeScript) Build the project:

    npm run build
    

Running the Application

The server can operate in different modes depending on your integration needs:

1. Standard Mode (STDIO)

This is the default mode for direct communication with clients like the Claude VSCode extension or other tools expecting MCP communication over standard input/output.

npm start

(You may need to configure your MCP client (e.g., Claude settings JSON) to point to the dist/index.js script and pass the required environment variables like SMARTLEAD_API_KEY, LICENSE_SERVER_URL, JEAN_LICENSE_KEY).

2. Server-Sent Events (SSE) Mode (for Web Clients like n8n)

This mode exposes an HTTP endpoint for clients that communicate via Server-Sent Events. Requires a BASIC or PREMIUM license.

  1. Start the server in SSE mode:

    npm run start:sse
    

    (This script likely starts the server configured to listen on an HTTP port, e.g., 3000, and handle SSE connections at an endpoint like /sse.)

  2. Connect from Client (e.g., n8n):

    • In your web client (like n8n's MCP Client node), configure it to connect to the server's SSE endpoint (e.g., http://localhost:3000/sse).
    • If you need to expose your local server running in SSE mode to the internet (e.g., for n8n cloud), use a tunneling tool like ngrok:
      # Install ngrok if you haven't: npm install -g ngrok
      ngrok http 3000 # Or the port your SSE server runs on
      
      Use the public HTTPS URL provided by ngrok (e.g., https://xxxxxxx.ngrok.io/sse) in your client configuration.

3. Supergateway Mode (Alternative SSE/Management)

The Supergateway package can manage running the MCP server and exposing it via SSE. Requires a BASIC or PREMIUM license.

# Ensure supergateway is installed (e.g., npx -y ...)
npx supergateway --stdio "node dist/index.js" --port 3000 --passEnv SMARTLEAD_API_KEY,LICENSE_SERVER_URL,JEAN_LICENSE_KEY

This runs the MCP server in stdio mode but makes it accessible via SSE on port 3000, automatically handling session management and passing necessary environment variables.

Licensing System Integration

Feature access is controlled by the external smartlead-license-server.

  • Validation: The app validates the JEAN_LICENSE_KEY against the LICENSE_SERVER_URL on startup and before critical actions.
  • Feature Enabling: The license level (free, basic, premium) returned by the server determines which tool categories are enabled locally (based on src/licensing/index.ts).
  • Offline Fallback: If the license server is unreachable, the app may use cached data or default to FREE tier functionality.
  • Feature Tokens: Critical premium actions require secure feature tokens obtained from the license server for stronger validation.

Available Tool Categories (Subject to License)

FREE Tier:

  • Campaign Management: Create, update, manage campaigns/sequences.
  • Lead Management: Add, update, track leads.

BASIC Tier (includes all FREE features plus):

  • Campaign Statistics: Fetch and analyze performance metrics.
  • Smart Delivery: Optimize email delivery, spam tests, DNS checks.
  • Webhooks: Manage webhook integrations.
  • n8n Integration: Connect with n8n workflows via SSE.

PREMIUM Tier (includes all BASIC features plus):

  • Client Management: Manage clients and permissions.
  • Smart Senders: Search, generate, purchase domains/mailboxes. (Note: Uses https://smart-senders.smartlead.ai/api/v1)
  • Advanced Features: Higher usage limits and premium capabilities.

(You can add sections on Contributing, License, etc. if applicable)

Contact

For support or questions, please contact:

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选