mailtani MCP Server

Manage mailtani email marketing from Claude, Cursor, or any MCP-compatible AI agent — contacts, lists, campaigns, segments, and event tracking.

Documentation

Mailtani MCP Server

Manage your email marketing directly from Claude, Cursor, or any MCP-compatible AI agent.

The Mailtani MCP server exposes your contacts, lists, segments, campaigns, emails, tags, custom fields, and event tracking as native AI tools — so your agent can send campaigns, enroll contacts, and track events without leaving the chat.


What you can do

CategoryTools
ContactsList, create (or upsert), update, delete
ListsList all, create, add contacts, remove contact
SegmentsList all, create with conditions, get matching contacts
CampaignsList, create broadcast, create sequence, create flow (all as drafts)
EmailsList sent emails, send one-off transactional email
TagsList all, create, delete
Custom FieldsList all, create
EventsTrack a custom event (triggers flows)

Example prompts you can use

"Create a broadcast campaign called 'Q3 Newsletter' targeting my 'Leads' list."

"Create a contact for [email protected], tag him as VIP, and send him the onboarding email."

"Track a purchase_completed event for [email protected] with plan=pro."

"Show me all contacts added in the last 7 days."

"Set up a 3-step welcome sequence for new signups with delays of 0, 3, and 7 days."

"Create a flow that sends an email whenever a contact is added to my project."

Authentication

The MCP server uses the same API key system as the Mailtani REST API.

Every request requires two headers:

HeaderValue
AuthorizationBearer mk_YOUR_API_KEY
X-Project-IdYour project ID (found in Settings → API)

Generate an API key at Settings → API Keys inside your Mailtani account.


Setup

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (Mac) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "mailtani": {
      "type": "http",
      "url": "https://mailtani.com/mcp",
      "headers": {
        "Authorization": "Bearer mk_YOUR_API_KEY",
        "X-Project-Id": "YOUR_PROJECT_ID"
      }
    }
  }
}

Restart Claude Desktop. You will see a hammer icon confirming the server connected.

Claude Code

Run in your terminal:

claude mcp add --transport http mailtani https://mailtani.com/mcp \
  --header "Authorization: Bearer mk_YOUR_API_KEY" \
  --header "X-Project-Id: YOUR_PROJECT_ID"

Cursor

Add to your Cursor MCP settings (Cursor → Settings → MCP):

{
  "mailtani": {
    "type": "http",
    "url": "https://mailtani.com/mcp",
    "headers": {
      "Authorization": "Bearer mk_YOUR_API_KEY",
      "X-Project-Id": "YOUR_PROJECT_ID"
    }
  }
}

Codex

Add to ~/.codex/config.json:

{
  "mcpServers": {
    "mailtani": {
      "type": "http",
      "url": "https://mailtani.com/mcp",
      "headers": {
        "Authorization": "Bearer mk_YOUR_API_KEY",
        "X-Project-Id": "YOUR_PROJECT_ID"
      }
    }
  }
}

Any MCP-compatible client

Endpoint:  POST https://mailtani.com/mcp
Protocol:  MCP over HTTP (JSON-RPC 2.0)
Auth:      Authorization: Bearer mk_...
Scope:     X-Project-Id: <id>
Rate limit: 30 requests / minute

Tool reference

Contacts

ToolDescription
list-contactsList contacts with optional search, list/tag/status filter, pagination
create-contactCreate or upsert a contact by email; optionally assign lists and tags
update-contactUpdate contact fields, lists, and tags by contact ID
delete-contactPermanently delete a contact by ID

Lists

ToolDescription
list-listsList all contact lists with contact counts
create-listCreate a new contact list
add-contact-to-listAdd up to 500 contacts to a list at once
remove-contact-from-listRemove a single contact from a list

Segments

ToolDescription
list-segmentsList all segments with contact counts
create-segmentCreate a segment with filter conditions (max 50)
get-segment-contactsGet paginated contacts matching a segment

Campaigns

Campaigns are always created as drafts. Open the Mailtani app to review and activate them.

ToolDescription
list-campaignsList campaigns filtered by type or status
create-broadcastCreate a one-time email blast draft; optionally target lists and segments
create-sequenceCreate a multi-step drip sequence draft with per-step delays
create-flowCreate a visual automation flow draft triggered by contact behaviour

Emails

ToolDescription
list-emailsList sent emails, optionally filtered by contact
send-emailSend a one-off transactional email to any address

Tags

ToolDescription
list-tagsList all tags with contact counts
create-tagCreate a new tag
delete-tagDelete a tag by ID

Custom Fields

ToolDescription
list-custom-fieldsList all custom fields
create-custom-fieldCreate a custom field (idempotent by name)

Events

ToolDescription
track-eventTrack a custom event for a contact; persists properties and triggers flows

Security

  • All operations are scoped to your project via X-Project-Id — no tool can read or modify another project's data
  • API keys are SHA-256 hashed at rest; plaintext is never stored
  • Rate limited to 30 requests per minute
  • Daily email send limits are enforced per your plan

Links