docs/book/src/channels/mattermost.md
Mattermost integration speaks the native REST API v4. Self-hosted, air-gapped, and sovereign-communication-friendly — your agent's conversation history stays on infrastructure you control.
zeroclaw-bot. Enable post:all and channel:read (or whichever scopes you want). Save the access token.[channels.mattermost]
enabled = true
server_url = "https://mattermost.example.com"
access_token = "..." # bot account token
team_id = "..." # required when bot has multi-team access
allowed_channels = ["7j8k9l..."] # channel IDs
allowed_users = ["user-id-1", "user-id-2"] # empty = allow everyone in allowed_channels
mention_only = false # true = only respond when @-mentioned
thread_replies = true # reply in thread by default
Full field reference: Config.
thread_replies = true (default), the reply creates a new thread rooted on the user's post. If false, the reply goes to channel root.Threading keeps conversations readable in busy channels.
mention_only = true adds a second-stage filter after allowed_users:
@bot_username are ignoredUseful in high-traffic channels to skip all the "hey does anyone" chatter the bot wasn't meant to see.
Mattermost attachments on inbound messages are stored under <workspace>/attachments/mattermost/<channel>/. The agent gets file paths in its context and can read them via file_read.
Outbound file uploads are not yet supported — the agent replies with links or inline content only.
draft_update_interval_ms (default 500)Mattermost supports draft updates (edits in place) on streaming replies. Multi-message streaming is not enabled — long replies come as one message, sent on stream completion.
A Mattermost bot token grants the scopes you configured. Treat it as privileged:
allowed_users / allowed_channels to limit blast radius even if the token leaksSee Security → Overview for the broader policy model.