SM

Smartlead MCP Server for Workflow Automation

Connect your tools with the Smartlead MCP server to automate workflows, integrate toolsets, and streamline data flow across automation platforms.

Quick Install
npx -y @jean-technologies/smartlead-mcp-server-local

Overview

The Smartlead MCP Server is a lightweight Model Context Protocol (MCP) server for local development and small-scale workflow automation. It acts as a central routing and orchestration layer that accepts events from external tools, maps those events to workflows or connectors, and dispatches payloads to registered integrations (webhooks, APIs, or local adapters). Running the server locally makes it easy to prototype integrations and automate cross-tool data flows without deploying a full automation stack.

This server is useful when you want a predictable, extensible bridge between events (webhooks, user actions, scheduled jobs) and actions (API calls, email sends, database writes). It provides a simple REST surface, developer-friendly startup scripts, and a basic runtime for registering “tools” and firing MCP-style messages. Use it to centralize automation for testing, demos, or small production jobs.

Repository: https://github.com/jean-technologies/smartlead-mcp-server-local

Features

  • REST API to register tools, list connectors, and dispatch MCP events
  • Local-first design: run on your laptop or a private server
  • Simple webhook and connector model for integrating third-party services
  • Configurable via environment variables (.env)
  • Docker-friendly for containerized development and CI use
  • Example client snippets for triggering events from scripts or other services
  • Logging and basic persistence (file or in-memory) for quick iteration

Installation / Configuration

Clone the repository and run the server locally using Node.js:

git clone https://github.com/jean-technologies/smartlead-mcp-server-local.git
cd smartlead-mcp-server-local
npm install
cp .env.example .env
# Edit .env to set PORT, STORAGE_PATH, REDIS_URL, etc.
npm start

Common environment variables (edit .env):

PORT=3000            # port the server listens on
HOST=0.0.0.0         # optional host binding
STORAGE_PATH=./data  # local folder for persistence
LOG_LEVEL=info       # debug|info|warn|error
REDIS_URL=           # optional Redis for distributed state

Docker usage:

docker build -t smartlead-mcp .
docker run -p 3000:3000 \
  -e PORT=3000 \
  -e STORAGE_PATH=/app/data \
  -v $(pwd)/data:/app/data \
  smartlead-mcp

Systemd example (for simple server management):

[Unit]
Description=Smartlead MCP Server
After=network.target

[Service]
Type=simple
User=smartlead
WorkingDirectory=/opt/smartlead-mcp
ExecStart=/usr/bin/npm start
Environment=PORT=3000
Restart=on-failure

[Install]
WantedBy=multi-user.target

Available Resources

The server exposes a small REST surface for common developer tasks. (Adjust paths if you’ve customized the server.)

EndpointMethodPurpose
/api/toolsGETList registered tools/connectors
/api/toolsPOSTRegister a new tool (name, type, webhook URL, metadata)
/api/mcp/eventsPOSTDispatch an MCP event into the server (eventName + payload)
/api/workflowsGETList configured workflows (if the repo includes examples)
/api-docsGETOpenAPI / Swagger UI (if provided)

Example: register a tool with curl

curl -X POST http://localhost:3000/api/tools \
  -H "Content-Type: application/json" \
  -d '{
    "name": "crm-connector",
    "type": "webhook",
    "endpoint": "https://crm.example.com/webhook",
    "metadata": {"authToken":"xxx"}
  }'

Dispatch an event:

curl -X POST http://localhost:3000/api/mcp/events \
  -H "Content-Type: application/json" \
  -d '{
    "eventName": "lead.created",
    "source": "landing-page",
    "payload": {"email":"[email protected]","name":"Jane"}
  }'

Node.js client example:

import fetch from 'node-fetch';
await fetch('http://localhost:3000/api/mcp/events', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    eventName: 'lead.created',
    payload: { email: '[email protected]' }
  })
});

Use Cases

  1. Lead enrichment pipeline

    • A landing page posts a webhook to Smartlead MCP Server when a new lead signs up. The server forwards the payload to a data enrichment tool, waits for the response, then dispatches the enriched profile to your CRM connector.
  2. Cross-platform notifications

    • Route an internal “support ticket created” event to multiple destinations: create a ticket in a helpdesk, send a Slack message, and enqueue a follow-up task in a task manager. Register each destination as a tool and let the MCP server fan out the payload.
  3. Local development for integrations

    • Use the server to simulate production automation while building connectors