packages/docs/plugin-registry/platform/mattermost.md
The Mattermost plugin connects Eliza agents to a Mattermost server as a bot, supporting channel messages and DMs with configurable mention requirements and chat modes.
Package: @elizaos/plugin-mattermost
eliza plugins install @elizaos/plugin-mattermost
{
"connectors": {
"mattermost": {
"enabled": true,
"botToken": "YOUR_BOT_TOKEN",
"baseUrl": "https://chat.example.com"
}
}
}
Or via environment variables:
export MATTERMOST_BOT_TOKEN=YOUR_BOT_TOKEN
export MATTERMOST_SERVER_URL=https://chat.example.com
| Variable | Required | Description |
|---|---|---|
MATTERMOST_BOT_TOKEN | Yes | Bot token from Mattermost System Console |
MATTERMOST_SERVER_URL | No | Mattermost server URL |
MATTERMOST_TEAM_ID | No | Team/tenant ID |
MATTERMOST_DM_POLICY | No | DM policy |
MATTERMOST_GROUP_POLICY | No | Group message policy |
MATTERMOST_ALLOWED_USERS | No | Comma-separated list of allowed user IDs |
MATTERMOST_ALLOWED_CHANNELS | No | Comma-separated list of allowed channel IDs |
MATTERMOST_REQUIRE_MENTION | No | Only respond when mentioned |
MATTERMOST_IGNORE_BOT_MESSAGES | No | Ignore messages from other bots |
MATTERMOST_ENABLED | No | Enable or disable the connector |
| Field | Required | Description |
|---|---|---|
botToken | Yes | Bot token from Mattermost System Console |
baseUrl | Yes | Base URL for your Mattermost server |
chatmode | No | Chat mode: dm-only, channel-only, or all (default: all) |
requireMention | No | Only respond when @mentioned (default: false) |
oncharPrefixes | No | Custom command prefixes for triggering responses |
configWrites | No | Allow config writes from channel events (default: true) |
enabled | No | Set false to disable (default: true) |
| Variable | Required | Description |
|---|---|---|
MATTERMOST_BOT_TOKEN | Yes | Bot token (primary auto-enable trigger) |
MATTERMOST_SERVER_URL | No | Mattermost server URL |
MATTERMOST_ENABLED | No | Enable or disable the connector |
MATTERMOST_TEAM_ID | No | Team ID to connect to |
MATTERMOST_DM_POLICY | No | DM acceptance policy |
MATTERMOST_GROUP_POLICY | No | Group message policy |
MATTERMOST_ALLOWED_USERS | No | Comma-separated allowed user IDs |
MATTERMOST_REQUIRE_MENTION | No | Only respond when @mentioned |
MATTERMOST_ALLOWED_CHANNELS | No | Comma-separated allowed channel IDs |
MATTERMOST_IGNORE_BOT_MESSAGES | No | Ignore messages from other bots |
The plugin auto-enables when the connectors.mattermost block contains a botToken:
{
"connectors": {
"mattermost": {
"botToken": "YOUR_BOT_TOKEN",
"baseUrl": "https://chat.example.com"
}
}
}
Ensure the bot account has been added to the channels where it should respond. By default, bots must be explicitly invited to channels.
Verify the baseUrl is correct and the Mattermost server is reachable from the Eliza host. For self-hosted instances, check firewall rules.
Bot tokens can be regenerated from System Console → Integrations → Bot Accounts. Update the token in your Eliza configuration after regeneration.