kopexa / mautic-mcp-bundle
Model Context Protocol (MCP) server for Mautic: lets Claude, ChatGPT and other MCP clients read contacts, segments, emails and campaigns, write brand emails and campaign drafts, create and update contacts, companies, fields and segments, with the user's Mautic permissions. OAuth 2.1 via kopexa/mauti
Package info
github.com/kopexa-grc/mautic-mcp-bundle
Type:mautic-plugin
pkg:composer/kopexa/mautic-mcp-bundle
Requires
- php: ~8.4
- firebase/php-jwt: ^7.0
- guzzlehttp/psr7: ^2.7
- kopexa/mautic-oauth-bundle: ^0.4
- mautic/core-lib: ^7.2
- mcp/sdk: ^0.9
- symfony/cache: ^7.4
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Model Context Protocol server for
Mautic 7 at /mcp (Streamable HTTP). It is built on the official
MCP PHP SDK.
Installation
Requires Mautic 7.2+ (Composer-based installation) and PHP 8.4+:
composer require kopexa/mautic-mcp-bundle php bin/console mautic:plugins:reload
Requires kopexa/mautic-oauth-bundle (installed automatically by Composer) with a signing key configured, see its README.
Already included in the hardened Mautic image
ghcr.io/kopexa-grc/mautic.
Claude, ChatGPT and other MCP clients can:
- read contacts, segments, emails, campaigns and email statistics
- create unpublished emails and campaigns
- create emails in the brand theme from panels and elements (themes with a block library, e.g. Kopexa), editable in Mautic's builder, and send a test to oneself
- create and update contacts and companies (matched by their unique fields, up to 100 per call), add custom fields, build static and dynamic segments (filters on fields, tags and behaviour), e.g. to sync with a CRM. Adding contacts to a segment can start running campaigns and segment emails for them; results and dry runs report it
- read a contact's activity (opens, clicks, visits, forms, points)
- give emails their topic (Mautic categories): recipients switch topics off in their email preferences, Mautic then skips those emails for them; emails without a topic come with a warning
- set up lead scoring: point groups, point actions (points for visits, downloads, forms, emails) and point triggers (tag, segment, stage, campaign or email when a contact reaches a score), all unpublished, and give contacts points. Mautic fires published triggers when a contact crosses their score; dry runs list the ones that would fire
- manage stages (lifecycle phases, created unpublished) and move contacts between published stages; group emails, campaigns, segments, forms, stages, ... into projects (Mautic 7)
- build and edit complete campaign flows (actions, decisions, conditions, waits). This also works on running campaigns, where changes are live: Mautic's scheduler executes them and may send emails. Publishing and direct sending are not possible.
Every call runs with the Mautic permissions of the user who approved the client. OAuth 2.1 comes from kopexa/mautic-oauth-bundle.
Setup, tools and permission model: docs/mcp.md.
Development
bin/check.shchecks the package (PHP lint,composer validate, version consistency). CI runs it on every push and pull request.tests/functional/run.shinstalls the plugin into a real Mautic 7 and tests it over HTTP; CI runs it on PHP 8.4 and 8.5. The tool tests are split by topic (core.sh: drafts, scopes, campaign flows run by Mautic's cron, running campaigns and their locks, roles;scenarios.sh: two realistic campaigns incl. a tracked email open;contacts.sh,crm.sh,points.sh,stages.sh,topics.sh).- kopexa-grc/mautic-stack only tests the integration in its image: discovery behind the public URL, MCP sessions across replicas, the operator switch via environment, brand layouts with its themes.
- Commits follow Conventional Commits
(
feat:,fix:,docs:,chore:…); they drive versions and the changelog. - Releases are automated with
release-please: it keeps a
release PR open that bumps
VERSION, the plugin version andMcpServerFactory::VERSIONandCHANGELOG.md. Merging it tagsv<version>and creates the GitHub release. Packagist and mautic-stack's Renovate pick the tag up. - Dependencies are kept current by Renovate, once a month
(security fixes immediately). Composer constraint updates
are committed as
fix(deps):and so lead to a patch release; CI-only updates (ci:) do not.
Apache-2.0 · Kopexa