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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。