Skip to main content
Glama

Mautic MCP Server

A comprehensive Model Context Protocol (MCP) server for Mautic 7 (Columba Edition) marketing automation platform. Supports both v1 (FOSRestBundle) and v2 (API Platform) endpoints with 68 tools.

GitHub Stars GitHub Issues GitHub License

Quick Start

# Clone and setup
git clone https://github.com/Cbrown35/mantic-MCP.git
cd mantic-MCP
npm install

# Configure your Mautic credentials
cp .env.example .env
# Edit .env with your Mautic API credentials

# Build and run
npm run build

Then add the server to your MCP configuration and start using natural language commands like:

  • "Search for all contacts with gmail in their email"

  • "Create a new project to organize my Q1 campaign resources"

  • "Clone campaign 5 and export it for staging"

  • "Send email template 12 to its assigned segment"

Related MCP server: mcp-mautic

What's New in v2.0 (Mautic 7 Support)

Projects (API v2)

Organize marketing resources under a single logical structure using Mautic 7's new API Platform v2 endpoints.

  • list_projects, get_project, create_project, update_project, patch_project, delete_project

Campaign Import/Export

Move complete campaign setups between environments.

  • clone_campaign - Clone an existing campaign

  • export_campaign - Export campaign data with all related assets

  • import_campaign - Import a campaign from JSON data

Campaign Analytics

  • get_campaign_event_details - Detailed metrics for campaign events

  • get_campaign_graph_stats - Campaign graph statistics for date ranges

  • get_campaign_map_stats - Geographic map statistics

Segment-Based Email Sending

  • send_email_to_segment - Send email to assigned segments with real-time audience adaptation

Email Reply Tracking

  • record_email_reply - Record email replies by tracking hash

  • get_email_graph_stats - Email graph statistics for date ranges

Deprecation Notice

SMS API classes have been removed in Mautic 7. The list_sms and create_sms tools include deprecation warnings.

Features

Authentication

  • OAuth2 authentication with automatic token refresh

  • Secure credential management through environment variables

  • Dual API support: v1 (FOSRestBundle) and v2 (API Platform)

Contact Management (6 tools)

  • create_contact - Create new contacts with custom fields

  • update_contact - Update existing contact information

  • get_contact - Retrieve contact details by ID or email

  • search_contacts - Search contacts with filters and pagination

  • delete_contact - Remove contacts from Mautic

  • add_contact_to_segment - Add contacts to specific segments

Campaign Management (13 tools)

  • list_campaigns - Get all campaigns with status and statistics

  • get_campaign - Get detailed campaign information

  • create_campaign - Create new campaigns

  • add_contact_to_campaign - Add contacts to campaigns

  • create_campaign_with_automation - Create campaigns with full event automation

  • execute_campaign - Manually execute/trigger campaigns

  • get_campaign_contacts - Get contacts in a campaign with their status

  • clone_campaign - Clone an existing campaign (Mautic 7)

  • export_campaign - Export campaign data with assets (Mautic 7)

  • import_campaign - Import campaign from JSON data (Mautic 7)

  • get_campaign_event_details - Campaign event metrics (Mautic 7)

  • get_campaign_graph_stats - Campaign graph statistics (Mautic 7)

  • get_campaign_map_stats - Campaign geographic stats (Mautic 7)

Email Operations (8 tools)

  • send_email - Send emails to specific contacts

  • list_emails - Get all email templates and campaigns

  • get_email - Get detailed email information

  • create_email_template - Create new email templates

  • get_email_stats - Get email performance statistics

  • send_email_to_segment - Send email to segments (Mautic 7)

  • record_email_reply - Record email reply by tracking hash (Mautic 7)

  • get_email_graph_stats - Email graph statistics (Mautic 7)

Form Management (3 tools)

  • list_forms - Get all forms with submission counts

  • get_form - Get form details and fields

  • get_form_submissions - Get form submission data

Segment Management (3 tools)

  • list_segments - Get all contact segments

  • create_segment - Create new contact segments with filters

  • get_segment_contacts - Get contacts in a specific segment

Content Management (7 tools)

  • list_assets - Get all assets (PDFs, images, documents)

  • get_asset - Get asset details by ID

  • create_asset - Create new assets (local or remote)

  • list_pages - Get all landing pages

  • create_page - Create new landing pages

  • list_sms - Get all SMS templates [DEPRECATED in Mautic 7]

  • create_sms - Create SMS templates [DEPRECATED in Mautic 7]

Business Entities (10 tools)

  • list_companies - Get all companies

  • create_company - Create new companies

  • add_contact_to_company - Associate contacts with companies

  • create_note - Add notes to contacts or companies

  • get_contact_notes - Get all notes for a contact

  • list_tags - Get all available tags

  • create_tag - Create new tags

  • add_contact_tags - Add tags to contacts

  • list_categories - Get all categories

  • create_category - Create new categories

Advanced Features (7 tools)

  • add_contact_points - Add points to contacts

  • subtract_contact_points - Subtract points from contacts

  • list_stages - Get all lifecycle stages

  • change_contact_stage - Change contact's lifecycle stage

  • list_contact_fields - Get all contact custom fields

  • create_contact_field - Create new contact custom fields

  • get_contact_activity - Get contact interaction history

Integration & Automation (5 tools)

  • list_webhooks - Get all webhooks

  • create_webhook - Create new webhooks

  • upload_file - Upload files to Mautic

  • list_reports - Get all reports

  • create_report - Create custom reports

Project Management - API v2 (6 tools, Mautic 7)

  • list_projects - List all projects

  • get_project - Get project details

  • create_project - Create a new project

  • update_project - Fully update an existing project

  • patch_project - Partially update a project

  • delete_project - Delete a project

Installation

Prerequisites

  • Node.js (v16 or higher)

  • npm or yarn

  • Access to a Mautic 7 instance with API credentials

Setup

  1. Clone the repository:

    git clone https://github.com/Cbrown35/mantic-MCP.git
    cd mantic-MCP
  2. Install dependencies:

    npm install
  3. Configure environment variables:

    cp .env.example .env

    Edit .env and fill in your Mautic API credentials:

    MAUTIC_BASE_URL=https://your-mautic-instance.com/api/
    MAUTIC_CLIENT_ID=your_client_id_here
    MAUTIC_CLIENT_SECRET=your_client_secret_here
    MAUTIC_TOKEN_ENDPOINT=https://your-mautic-instance.com/oauth/v2/token
  4. Build the server:

    npm run build
  5. Configure MCP settings: Add the server to your MCP configuration file:

    {
      "mcpServers": {
        "mautic-server": {
          "command": "node",
          "args": ["/path/to/mautic-server/build/index.js"],
          "env": {
            "MAUTIC_BASE_URL": "https://your-mautic-instance.com/api/",
            "MAUTIC_CLIENT_ID": "your_client_id",
            "MAUTIC_CLIENT_SECRET": "your_client_secret",
            "MAUTIC_TOKEN_ENDPOINT": "https://your-mautic-instance.com/oauth/v2/token"
          },
          "disabled": false,
          "autoApprove": []
        }
      }
    }

Architecture

Dual API Support

Mautic 7 has a three-tier API architecture:

Layer

Purpose

Endpoints

API Platform 4.x

New v2 REST endpoints (JSON-LD/Hydra)

/api/v2/projects

FOSRestBundle

Existing v1 endpoints

/api/contacts, /api/campaigns, etc.

FOSOAuthServerBundle

OAuth2 authentication

/oauth/v2/token

The MCP server automatically manages both API versions. v1 endpoints use the configured MAUTIC_BASE_URL directly, while v2 endpoints are derived automatically.

Project Structure

src/
├── index.ts              # Entry point: server setup and startup
├── types/                # TypeScript interfaces
│   ├── common.ts         # Shared types (OAuth2Token, ToolResult, etc.)
│   ├── contacts.ts       # MauticContact interface
│   ├── campaigns.ts      # MauticCampaign interface
│   ├── emails.ts         # MauticEmail interface
│   ├── forms.ts          # MauticForm interface
│   ├── segments.ts       # MauticSegment interface
│   └── projects.ts       # MauticProject interface (Mautic 7)
├── api/
│   └── client.ts         # Dual API client (v1 + v2) with OAuth2
└── tools/
    ├── index.ts           # Tool registry and dispatch
    ├── contacts.ts        # Contact tools
    ├── campaigns.ts       # Campaign tools (includes Mautic 7 additions)
    ├── emails.ts          # Email tools (includes Mautic 7 additions)
    ├── forms.ts           # Form tools
    ├── segments.ts        # Segment tools
    ├── projects.ts        # Project tools (Mautic 7 API v2)
    ├── content.ts         # Asset, page, and SMS tools
    ├── business.ts        # Company, note, tag, and category tools
    ├── advanced.ts        # Points, stages, fields, and activity tools
    └── integration.ts     # Webhook, file, and report tools

Configuration

Environment Variables

Variable

Description

Example

MAUTIC_BASE_URL

Your Mautic API base URL

https://your-mautic.com/api/

MAUTIC_CLIENT_ID

OAuth2 Client ID

1_abc123...

MAUTIC_CLIENT_SECRET

OAuth2 Client Secret

secret123...

MAUTIC_TOKEN_ENDPOINT

OAuth2 Token Endpoint

https://your-mautic.com/oauth/v2/token

Obtaining Mautic API Credentials

  1. Log into your Mautic instance as an administrator

  2. Go to Settings > Configuration > API Settings

  3. Enable API access

  4. Go to Settings > API Credentials

  5. Create a new API credential with OAuth2 authorization

  6. Note down the Client ID and Client Secret

Error Handling

The server includes comprehensive error handling:

  • Automatic OAuth2 token refresh

  • Detailed error messages from both v1 and v2 API formats

  • Graceful handling of authentication failures

  • Retry logic for transient errors

Security

  • All credentials are stored as environment variables

  • OAuth2 tokens are automatically refreshed

  • No sensitive data is logged or exposed

  • Secure HTTPS communication with Mautic API

Development

To modify or extend the server:

  1. Edit the source code in the src/ directory

  2. Add new tools by creating a file in src/tools/ and importing it in src/tools/index.ts

  3. Build the server: npm run build

  4. Test with the MCP Inspector: npm run inspector

Contributing

We welcome contributions! Please see the repository for contribution guidelines.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Available Tools

68 tools
add_contact_pointsC

Add points to contact

Inputs: contactId (required), points (required), eventName, actionName.

add_contact_tagsB

Add tags to contact

Inputs: contactId (required), tags (required).

add_contact_to_campaignC

Add a contact to a campaign

Inputs: campaignId (required), contactId (required).

add_contact_to_companyC

Associate contact with company

Inputs: contactId (required), companyId (required).

add_contact_to_segmentB

Add a contact to a specific segment

Inputs: contactId (required), segmentId (required).

change_contact_stageA

Change contact's lifecycle stage

Inputs: contactId (required), stageId (required).

clone_campaignB

Clone an existing campaign (Mautic 7)

Inputs: campaignId (required).

create_assetC

Create new asset (local or remote)

Inputs: title (required), storageLocation (required), file (required), description, +2 more.

create_campaignC

Create a new campaign

Inputs: name (required), description, isPublished, publishUp, +1 more.

create_campaign_with_automationB

Create campaign with full event automation including triggers, actions, and canvas settings

Inputs: name (required), description, isPublished, allowRestart, +4 more.

create_categoryC

Create new category

Inputs: title (required), bundle (required), alias, description, +1 more.

create_companyC

Create new company

Inputs: companyname (required), companyemail, companyphone, companyaddress1, +6 more.

create_contactC

Create a new contact in Mautic

Inputs: email (required), firstName, lastName, phone, +3 more.

create_contact_fieldB

Create new contact custom field

Inputs: label (required), type (required), alias, defaultValue, +3 more.

create_email_templateC

Create a new email template

Inputs: name (required), subject (required), fromAddress, fromName, +5 more.

create_noteC

Add note to contact or company

Inputs: text (required), type (required), contactId, companyId.

create_pageC

Create new landing page

Inputs: title (required), alias, customHtml, template, +3 more.

create_projectB

Create a new project to organize marketing resources (Mautic 7 API v2)

Inputs: name (required), description, properties.

create_reportC

Create custom report

Inputs: name (required), source (required), columns (required), description, +2 more.

create_segmentC

Create a new contact segment

Inputs: name (required), alias, description, isPublished, +2 more.

create_smsA

[DEPRECATED in Mautic 7] Create SMS template - SMS API classes have been removed

Inputs: name (required), message (required), isPublished.

create_tagC

Create new tag

Inputs: tag (required).

create_webhookC

Create new webhook

Inputs: name (required), webhookUrl (required), triggers (required), description, +2 more.

delete_contactA

Delete a contact from Mautic

Inputs: id (required).

delete_projectC

Delete a project (Mautic 7 API v2)

Inputs: id (required).

execute_campaignB

Manually execute/trigger a campaign

Inputs: campaignId (required), contactIds.

export_campaignC

Export campaign data with all related assets (Mautic 7)

Inputs: campaignId (required).

get_assetA

Get asset details by ID

Inputs: id (required).

get_campaignA

Get detailed campaign information

Inputs: id (required).

get_campaign_contactsB

Get contacts in a campaign with their status

Inputs: campaignId (required), start, limit.

get_campaign_event_detailsB

Get detailed metrics for a specific campaign event (Mautic 7)

Inputs: eventId (required), limit, start.

get_campaign_graph_statsB

Get campaign graph statistics for a date range (Mautic 7)

Inputs: campaignId (required), dateFrom (required), dateTo (required).

get_campaign_map_statsC

Get campaign geographic map statistics for a date range (Mautic 7)

Inputs: campaignId (required), dateFrom (required), dateTo (required).

get_contactA

Get contact details by ID or email

Inputs: id, email.

get_contact_activityB

Get contact interaction history

Inputs: contactId (required), search, includeEvents, excludeEvents, +3 more.

get_contact_notesC

Get all notes for a contact

Inputs: contactId (required), limit.

get_emailC

Get detailed email information

Inputs: id (required).

get_email_graph_statsC

Get email graph statistics for a date range (Mautic 7)

Inputs: emailId (required), dateFrom (required), dateTo (required), isVariant.

get_email_statsB

Get email performance statistics

Inputs: emailId (required).

get_formB

Get form details and fields

Inputs: id (required).

get_form_submissionsC

Get form submission data

Inputs: formId (required), limit, start, dateFrom, +1 more.

get_projectC

Get project details by ID (Mautic 7 API v2)

Inputs: id (required).

get_segment_contactsB

Get contacts in a specific segment

Inputs: segmentId (required), limit, start.

import_campaignC

Import a campaign from JSON data (Mautic 7)

Inputs: campaignData (required).

list_assetsB

Get all assets (PDFs, images, documents)

Inputs: search, limit, start, publishedOnly.

list_campaignsC

Get all campaigns with status and statistics

Inputs: search, limit, start, publishedOnly.

list_categoriesC

Get all categories

Inputs: bundle, limit.

list_companiesC

Get all companies

Inputs: search, limit, start.

list_contact_fieldsB

Get all contact custom fields

Inputs: limit.

list_emailsC

Get all email templates and campaigns

Inputs: search, limit, start, publishedOnly.

list_formsB

Get all forms with submission counts

Inputs: search, limit, start, publishedOnly.

list_pagesC

Get all landing pages

Inputs: search, limit, start, publishedOnly.

list_projectsC

List all projects - organize marketing resources (Mautic 7 API v2)

Inputs: page, itemsPerPage.

list_reportsC

Get all reports

Inputs: limit.

list_segmentsC

Get all contact segments

Inputs: search, limit, start, publishedOnly.

list_smsC

[DEPRECATED in Mautic 7] Get all SMS templates - SMS API classes have been removed

Inputs: search, limit.

list_stagesB

Get all lifecycle stages

Inputs: limit.

list_tagsC

Get all available tags

Inputs: search, limit.

list_webhooksC

Get all webhooks

Inputs: limit.

patch_projectA

Partially update an existing project (Mautic 7 API v2)

Inputs: id (required), name, description, properties.

record_email_replyB

Record an email reply by tracking hash (Mautic 7)

Inputs: trackingHash (required).

search_contactsC

Search contacts with filters and pagination

Inputs: search, limit, start, orderBy, +3 more.

send_emailC

Send an email to specific contacts

Inputs: emailId, contactIds, contactEmails.

send_email_to_segmentA

Send email to its assigned segment(s) with real-time audience adaptation (Mautic 7)

Inputs: emailId (required).

subtract_contact_pointsC

Subtract points from contact

Inputs: contactId (required), points (required), eventName, actionName.

update_contactC

Update an existing contact

Inputs: id (required), email, firstName, lastName, +4 more.

update_projectC

Fully update an existing project (Mautic 7 API v2)

Inputs: id (required), name (required), description, properties.

upload_fileC

Upload file to Mautic

Inputs: file (required), folder.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 68 tools

    Disambiguation4/5

    Tools are mostly well-distinguished by resource and action, but some pairs like create_campaign vs create_campaign_with_automation and send_email vs send_email_to_segment could cause confusion. Deprecated tools add minor ambiguity.

    Naming Consistency4/5

    Most tools follow verb_noun snake_case pattern consistently. Minor deviations like change_contact_stage instead of update_contact_stage, and record_email_reply instead of create_email_reply, but overall pattern is clear.

    Tool Count3/5

    68 tools is high for an MCP server, but Mautic is a comprehensive platform. The count borders on overwhelming, yet the tools are organized by domain, making it reasonably scoped for the intended coverage.

    Completeness2/5

    Significant gaps exist: missing update/delete for many resources like assets, emails, campaigns, segments, and forms. Only delete_contact and delete_project are present, leaving agents unable to perform full lifecycle management.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      Enables management of AI-powered email marketing automation, including subscriber segments, campaigns, and templates. It allows users to generate email sequences with AI and track detailed analytics through natural language commands.
      100
      2,983 npm
      3
      MIT
    • A
      license
      Not graded
      quality
      F
      maintenance
      Comprehensive MCP server for the Mautic marketing automation API, providing 203 tools for managing contacts, campaigns, emails, segments, and more.
      2
      ISC
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables interaction with the Mailchimp API for managing campaigns, lists, templates, reports, and automations through natural language.
      3
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables Claude Desktop to interact with the BusinessFlowPro marketing automation platform via natural language, supporting campaign, contact, template, landing page, form, analytics, and AI content operations.
      MIT