Use the Mautic CLI from KosmoKrator to call Mautic tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.
9 functions6 read3 writeUsername and password auth
Mautic can be configured headlessly with `kosmokrator integrations:configure mautic`.
# Install KosmoKrator first if it is not available on PATH.curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash# Configure and verify this integration.kosmokrator integrations:configure mautic --set hostname="$MAUTIC_HOSTNAME" --set username="$MAUTIC_USERNAME" --set password="$MAUTIC_PASSWORD" --enable --read allow --write ask --jsonkosmokrator integrations:doctor mautic --jsonkosmokrator integrations:status --json
Credentials
Authentication type: Username and passwordbasic. Configure credentials once, then use the same stored profile from
scripts, coding CLIs, Lua code mode, and the MCP gateway.
Key
Env var
Type
Required
Label
hostname
MAUTIC_HOSTNAME
URL url
yes
Mautic URL
username
MAUTIC_USERNAME
Text text
yes
Username
password
MAUTIC_PASSWORD
Secret secret
yes
Password
Call Mautic Headlessly
Use the generic call form when another coding CLI or script needs a stable universal interface.
Every function below can be called headlessly. The generic form is stable across all integrations;
the provider shortcut is shorter but specific to Mautic.
mautic.mautic_list_contacts
Read read
List contacts in Mautic. Supports search, filtering, pagination, and ordering. Returns contact details including email, name, and custom fields.
Create a new contact in Mautic. Provide at least an email address; additional fields like first name, last name, phone, company, and tags are optional.
Create a new contact in Mautic. Provide at least an email address; additional fields like first name, last name, phone, company, and tags are optional.
Headless calls still follow the integration read/write permission policy. Configure read/write defaults
with integrations:configure. Add --force only for trusted automation that should bypass that policy.