MCP Integration

Manage campaigns from any AI app

Sendflo's MCP integration lets you control campaigns, contacts, and segments using natural language — in Claude Desktop, Cursor, Windsurf, Zed, or any MCP-compatible AI. No switching tabs, no copying IDs.

What you can do

💬
"Send a Diwali sale campaign to all VIP contacts"
💬
"Generate a friendly email about our 50% off sale and create a campaign for it"
💬
"How many credits do I have left and what's my open rate?"
💬
"Score my contacts and tell me who the hot leads are"
💬
"Add Priya Sharma, phone 9876543210, to my contacts with tag VIP"

Setup (5 minutes)

1
Install a supported AI app
Any MCP-compatible app works — Claude Desktop, Cursor, Windsurf, Zed, Cline, or Continue.dev. The config format is the same for all of them.
2
Install uv
uv is a fast Python package runner — it handles everything so you don't need to install Python manually.
Mac / Linux — Terminal
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows — PowerShell
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
3
Get your Sendflo API key
Go to app.sendflo.io → Settings → API Keys → Create. Copy the key starting with sk_sf_.
4
Add Sendflo to your AI app config
Open your app's MCP config (Claude Desktop: Settings → Developer → Edit Config) and paste this, replacing the API key:
JSON
{
  "mcpServers": {
    "sendflo": {
      "command": "uvx",
      "args": ["sendflo-mcp"],
      "env": {
        "SENDFLO_API_KEY": "sk_sf_your_key_here"
      }
    }
  }
}

Claude Desktop config: Mac: ~/Library/Application Support/Claude/claude_desktop_config.json  |  Windows: %APPDATA%\Claude\claude_desktop_config.json

Cursor / Windsurf / Zed: check your app's MCP settings panel — the JSON structure (mcpServers) is the same.

5
Restart your AI app
Quit completely and reopen. In Claude Desktop the 🔨 hammer icon shows Sendflo tools. In Cursor/Windsurf check the MCP panel. You're ready.

Available tools

Claude uses these tools automatically based on your prompts. You never need to call them directly.

list_contacts
List contacts, optionally filtered by tag and limit
create_contact
Add a new contact with name, phone, email, and tags
list_segments
List all contact segments
list_campaigns
List campaigns, optionally filtered by status
get_campaign
Get campaign details and delivery stats by ID
create_email_campaign
Create a draft email campaign with subject and HTML body
send_campaign
Send a campaign to its segment — irreversible
get_analytics
Credits remaining, plan, total sent, avg open rate
generate_email
AI-generate an email subject + HTML body from a prompt
score_contacts
Score contacts hot / warm / cold by engagement. Pro plan.
list_workspaces
List agency sub-workspaces

REST API

Build your own integration

Every Sendflo feature is available via REST API. Use your sk_sf_ key as a bearer token on any endpoint — the same auth that powers the MCP integration.

Base URL: https://api.sendflo.io

Authentication

Create an API key in app.sendflo.io → Settings → API Keys. Pass it as a bearer token on every request.

HTTP
Authorization: Bearer sk_sf_your_key_here

Endpoints

Contacts

Method & PathDescription
GET/contactsList contacts. Query: tag, limit
POST/contactsCreate contact. Body: name, phone, email, tags
PATCH/contacts/{id}/tagsUpdate contact tags
DELETE/contacts/{id}Delete a contact

Campaigns

Method & PathDescription
GET/campaignsList campaigns. Query: status
POST/campaignsCreate campaign. Body: name, channel, subject, message, segment_id
GET/campaigns/{id}Get campaign with delivery stats
POST/campaigns/{id}/sendSend campaign to segment
DELETE/campaigns/{id}Delete a draft campaign

Segments

Method & PathDescription
GET/segmentsList all segments
POST/segmentsCreate segment. Body: name, filters
DELETE/segments/{id}Delete a segment

AI

Method & PathDescription
POST/ai/generate-emailGenerate subject + HTML. Body: prompt, tone
POST/ai/score-contactsScore contacts hot/warm/cold. Pro plan.

Account

Method & PathDescription
GET/auth/meAccount info: credits, plan, email

Code examples

List contacts tagged "VIP"

Python
import httpx

client = httpx.Client(
    base_url="https://api.sendflo.io",
    headers={"Authorization": "Bearer sk_sf_your_key_here"},
)

contacts = client.get("/contacts", params={"tag": "VIP"}).json()
print(contacts)

Create and send an email campaign

Python
# 1. Create the campaign
campaign = client.post("/campaigns", json={
    "name": "Diwali Sale",
    "channel": "email",
    "subject": "🪔 50% off everything this Diwali",
    "message": "<h1>Happy Diwali!</h1><p>Use code DIWALI50</p>",
    "segment_id": 3,
}).json()

# 2. Send it
result = client.post(f"/campaigns/{campaign['id']}/send").json()
print(result)

Generate an email with AI

Python
email = client.post("/ai/generate-email", json={
    "prompt": "Announce our new summer collection with 30% off",
    "tone": "friendly",
}).json()

print(email["subject"])
print(email["html"])

curl

Shell
curl https://api.sendflo.io/contacts \
  -H "Authorization: Bearer sk_sf_your_key_here"