mcp-mautic
Comprehensive MCP server for the Mautic marketing automation API, providing 203 tools for managing contacts, campaigns, emails, segments, and more.
README
mcp-mautic
A comprehensive Model Context Protocol (MCP) server for the Mautic marketing automation API.
Features
- 203 tools covering the full Mautic REST API
- OAuth2 client-credentials authentication with automatic token refresh
- Covers: Contacts, Companies, Segments, Campaigns, Emails, Forms, Pages, Assets, Points, Stages, Tags, Notes, Webhooks, Reports, Stats, Users, Roles, Dynamic Content, Focus Items, SMS, Notifications, and more
- Campaign import/export with ZIP packaging
- CSV contact import
- GDPR-compliant contact erasure and DNC management
- Batch operations for contacts and segments
- Stats API with advanced filtering
Requirements
- Node.js >= 18
- A Mautic instance with OAuth2 API credentials (client credentials grant)
Installation
git clone https://github.com/esanum/mcp-mautic.git
cd mcp-mautic
npm install
Configuration
Set the following environment variables:
| Variable | Description |
|---|---|
MAUTIC_BASE_URL |
Your Mautic instance URL (e.g. https://mautic.example.com) |
MAUTIC_CLIENT_ID |
OAuth2 client ID |
MAUTIC_CLIENT_SECRET |
OAuth2 client secret |
MAUTIC_TOKEN_URL |
(optional) Token endpoint, defaults to ${MAUTIC_BASE_URL}/oauth/v2/token |
Setting up OAuth2 in Mautic
- Go to Settings > API Credentials in your Mautic instance
- Create a new OAuth 2 credential
- Set the Grant Type to
Client Credentials - Copy the Client ID and Client Secret
Usage with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"mautic": {
"command": "node",
"args": ["/path/to/mcp-mautic/server.js"],
"env": {
"MAUTIC_BASE_URL": "https://mautic.example.com",
"MAUTIC_CLIENT_ID": "your_client_id",
"MAUTIC_CLIENT_SECRET": "your_client_secret"
}
}
}
}
macOS Setup Guide (Step by Step)
This walks you through a clean setup on a Mac, from installing Node.js to seeing the Mautic tools inside Claude Desktop. Replace yourusername with your actual macOS user (run whoami in Terminal to check).
1. Install Node.js via nvm
If you don't have Node 18+ already, the easiest way is nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
Close and reopen Terminal, then:
nvm install 20
nvm use 20
Find the absolute path to your node binary — you'll need it in the config:
which node
You'll get something like /Users/yourusername/.nvm/versions/node/v20.18.1/bin/node. Claude Desktop does not inherit your shell's PATH, so using the absolute path is the most reliable option.
2. Clone and install the MCP server
cd ~
git clone https://github.com/esanum/mcp-mautic.git
cd mcp-mautic
npm install
3. Locate and edit the Claude Desktop config
The config file lives at:
~/Library/Application Support/Claude/claude_desktop_config.json
In Finder you can jump there with Cmd+Shift+G and pasting the path. If the file doesn't exist yet, create it with the skeleton below.
4. Single-instance example
{
"mcpServers": {
"mautic": {
"command": "/Users/yourusername/.nvm/versions/node/v20.18.1/bin/node",
"args": ["/Users/yourusername/mcp-mautic/server.js"],
"env": {
"MAUTIC_BASE_URL": "https://mautic.example.com",
"MAUTIC_TOKEN_URL": "https://mautic.example.com/oauth/v2/token",
"MAUTIC_CLIENT_ID": "your_client_id",
"MAUTIC_CLIENT_SECRET": "your_client_secret",
"PATH": "/Users/yourusername/.nvm/versions/node/v20.18.1/bin:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin"
}
}
}
}
The PATH entry in env isn't strictly required when you use an absolute command path, but it helps if any child processes (git, etc.) need to be found.
5. Multi-instance example
You can connect several Mautic instances in parallel — each one gets its own server entry with its own MAUTIC_BASE_URL and credentials. Claude will expose each as a separate toolset (e.g. mautic, mautic-staging, mautic-de):
{
"mcpServers": {
"mautic": {
"command": "/Users/yourusername/.nvm/versions/node/v20.18.1/bin/node",
"args": ["/Users/yourusername/mcp-mautic/server.js"],
"env": {
"MAUTIC_BASE_URL": "https://mautic.example.com",
"MAUTIC_TOKEN_URL": "https://mautic.example.com/oauth/v2/token",
"MAUTIC_CLIENT_ID": "your_client_id_prod",
"MAUTIC_CLIENT_SECRET": "your_client_secret_prod",
"PATH": "/Users/yourusername/.nvm/versions/node/v20.18.1/bin:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin"
}
},
"mautic-staging": {
"command": "/Users/yourusername/.nvm/versions/node/v20.18.1/bin/node",
"args": ["/Users/yourusername/mcp-mautic/server.js"],
"env": {
"MAUTIC_BASE_URL": "https://staging.mautic.example.com",
"MAUTIC_TOKEN_URL": "https://staging.mautic.example.com/oauth/v2/token",
"MAUTIC_CLIENT_ID": "your_client_id_staging",
"MAUTIC_CLIENT_SECRET": "your_client_secret_staging",
"PATH": "/Users/yourusername/.nvm/versions/node/v20.18.1/bin:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin"
}
}
}
}
Tip: each Mautic instance needs its own OAuth2 credential pair — create one per instance under Settings → API Credentials and keep the IDs straight by naming the server entries clearly.
6. Restart Claude Desktop
Quit Claude fully (Cmd+Q — just closing the window is not enough), then reopen it. Under Search and tools the Mautic servers should now appear. Click one to see the list of available Mautic tools.
7. Troubleshooting on macOS
Logs live here:
~/Library/Logs/Claude/mcp*.log
Common issues:
- Server fails to start / "command not found" — the
commandpath is wrong. Re-runwhich nodeand paste the exact path. - "Cannot find module" — you forgot
npm installin themcp-mauticfolder, or theargspath doesn't point to the actualserver.js. - 401 from Mautic — OAuth credentials or
MAUTIC_BASE_URLwrong; double-check the grant type isClient Credentials. - JSON parse error on startup —
claude_desktop_config.jsonhas a syntax error. Missing comma between server blocks is the usual culprit. Validate withjsonlintor any online JSON validator before restarting. - Changes don't take effect — make sure you fully quit Claude Desktop (
Cmd+Q), not just closed the window.
Tool Categories
| Category | Tools | Examples |
|---|---|---|
| Contacts | 25+ | list, get, create, update, delete, merge, batch ops, GDPR erase |
| Segments | 8+ | list, get, create, update, delete, membership, batch add/remove |
| Campaigns | 12+ | list, get, create, update, delete, clone, import/export, events |
| Emails | 12+ | list, get, create, update, delete, send to contact/segment, stats |
| Forms | 10+ | list, get, create, update, delete, submissions, fields, actions |
| Companies | 8+ | list, get, create, update, delete, contacts, fields |
| Pages | 6+ | list, get, create, update, delete, hit stats |
| Assets | 6+ | list, get, create, update, delete, download stats |
| Points | 10+ | actions, triggers, groups, add/subtract, change log |
| Stages | 6+ | list, get, create, update, add/remove contacts |
| Tags | 5 | list, get, create, update, delete |
| Notes | 5 | list, get, create, update, delete |
| Reports | 3 | list, get report, get report data |
| Stats | 3 | list tables, get columns, query stats |
| Users & Roles | 8+ | list, get, create, update, delete, permissions |
| Webhooks | 6+ | list, get, create, update, delete, triggers, logs |
| Dynamic Content | 5+ | list, get, create, update, delete, stats |
| Focus Items | 5+ | list, get, create, update, delete, stats |
| SMS | 5+ | list, get, create, update, send, stats |
| Notifications | 5+ | list, get, create, update, send, stats |
| Dashboard | 2 | get data, get data by type |
| Categories | 5 | list, get, create, update, delete |
| Files | 3 | list, create, delete |
| Audit Log | 1 | get audit log entries |
License
ISC
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.