mautic-mcp
Allows interaction with a Mautic marketing automation platform to manage contacts, send emails, run campaigns, and pull analytics via natural language through Claude.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mautic-mcpGet all contacts tagged solar-dealer"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Mautic MCP Server
A lightweight Model Context Protocol (MCP) server that connects Claude AI to your Mautic marketing automation platform. Once connected, you can manage contacts, send emails, run campaigns, and pull analytics — all through natural language in Claude.
Built and open-sourced by Discret AI.
What This Enables
Claude ↔ MCP Server (Node.js) ↔ Mautic REST APIYou talk to Claude. Claude calls your Mautic instance. Examples of what you can say:
"Get all contacts tagged solar-dealer" "Send email ID 12 to all contacts in segment 5" "Create a contact for Ahmed at ahmed@example.com and add him to the solar campaign" "What's the open rate on email 7?" "Add tag follow-up to contact 234"
Tools Available to Claude
Tool | Description |
| Search/list contacts with optional filters |
| Fetch a single contact by ID |
| Create a new contact with fields and tags |
| Update an existing contact's fields |
| Delete a contact |
| Send a transactional email to one contact |
| Send an email to a list of contact IDs |
| Get open/click stats for an email |
| List all emails in Mautic |
| List all contact segments |
| Add a contact to a segment |
| Remove a contact from a segment |
| List all campaigns |
| Add a contact to a campaign |
| List all tags defined in Mautic |
| Add one or more tags to a contact |
| Get full event/activity history for a contact |
| List all Mautic forms |
| Get submissions for a specific form |
Prerequisites
Node.js v18 or higher
A running Mautic instance (self-hosted or cloud)
Mautic API enabled with Basic Auth credentials
Claude Desktop (for the MCP integration)
Setup
1. Enable the Mautic API
In your Mautic admin panel:
Go to Settings → Configuration → API Settings
Set API enabled to
YesSet Enable HTTP basic auth to
YesSave
2. Clone and Install
git clone https://github.com/abdulhadi-98/mautic-mcp.git
cd mautic-mcp
npm install3. Configure Credentials
Copy the example env file and fill in your details:
cp .env.example .envEdit .env:
MAUTIC_URL=https://your-mautic-domain.com
MAUTIC_USER=admin
MAUTIC_PASS=yourpasswordNote: The URL should be your Mautic root URL — no trailing slash. The server automatically appends
/api.
4. Connect to Claude Desktop
Open (or create) your Claude Desktop config file:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Add the mautic server entry:
{
"mcpServers": {
"mautic": {
"command": "node",
"args": ["/absolute/path/to/mautic-mcp/index.js"]
}
}
}Windows example:
{
"mcpServers": {
"mautic": {
"command": "node",
"args": ["C:\\Users\\YourName\\mautic-mcp\\index.js"]
}
}
}Restart Claude Desktop. You'll see the Mautic tools appear in the toolbar (hammer icon).
Connecting from claude.ai (Web)
The server implements OAuth2 so it works directly from claude.ai in the browser — no desktop app needed.
Extra environment variable required
Add SERVER_URL to your deployment environment (the public HTTPS URL of your server, no trailing slash):
SERVER_URL=https://mcp.yourdomain.comConnect on claude.ai
Go to claude.ai → Settings → Integrations → Add Integration
Enter your server URL:
https://mcp.yourdomain.comClaude will redirect you to a sign-in page — enter your
MCP_API_KEYYou'll be redirected back to Claude, connected and ready
Every team member goes through the same flow with the same API key. The server issues each browser session its own bearer token after the key is verified.
How the OAuth flow works
claude.ai → GET /.well-known/oauth-authorization-server (discovery)
→ GET /oauth/authorize (login page)
→ POST /oauth/authorize (submit API key) (issues auth code)
→ POST /oauth/token (exchange code) (issues bearer token)
→ POST /mcp (all tool calls) (requires bearer token)No database is needed — auth codes expire in 5 minutes, bearer tokens are held in memory. Restarting the server invalidates all tokens (users re-authenticate once).
Usage Examples
Once connected, try these prompts in Claude:
Contact management
Get the first 20 contacts in Mautic
Search for contacts with the email domain @example.com
Create a contact: name Ahmed Khan, email ahmed@example.com, company Solar Co
Add tag "hot-lead" to contact 145Email sending
Send email ID 8 to contact 312
Send email ID 8 to all of these contacts: 100, 101, 102, 103, 104
What are the open and click stats for email 12?Segments and campaigns
List all segments
Add contact 200 to segment 3
List all campaigns and tell me which ones are activeBulk operations
Get all contacts tagged "solar-dealer" and send them email ID 5
Add the 10 contacts I'll paste below to segment 7Project Structure
mautic-mcp/
├── index.js # MCP server — all tools and Mautic API calls
├── package.json # Dependencies
├── .env.example # Credentials template
└── README.mdAuthentication
This server uses HTTP Basic Auth — the simplest method supported by Mautic. For production use cases, Mautic also supports OAuth2. To switch to OAuth2, replace the auth config in index.js with token-based headers using Mautic's OAuth2 flow.
Contributing
Contributions are welcome. To add a new tool:
Add its schema to the
ListToolsRequestSchemahandler inindex.jsAdd its execution logic to the
CallToolRequestSchemaswitch blockOpen a PR with a description of what the tool does and which Mautic API endpoint it wraps
Please keep tools focused — one tool per Mautic API action.
License
MIT License — free to use, modify, and distribute.
Credits
Built and open-sourced by Discret AI
Discret AI builds AI-powered automation systems for businesses — from intelligent outreach pipelines to custom Claude integrations. This MCP server is part of our commitment to making AI + marketing automation accessible to everyone.
Related Resources
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/abdulhadi-98/mautic-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server