KosmoKrator

communication

Mattermost CLI for CI

Use the Mattermost CLI for CI with headless JSON commands, schema discovery, credentials, and permission controls.

7 functions 6 read 1 write Bearer token auth

Mattermost CLI for CI

Run integration calls from CI jobs with JSON output, explicit credentials, and predictable exit status.

Use this shape when a pipeline needs to read or update an external service. The Mattermost CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# Mattermost CLI for CI
kosmokrator integrations:configure mattermost --set access_token="$MATTERMOST_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call mattermost.mattermost_list_channels '{"page":1,"per_page":1}' --json

Discovery Before Execution

Agents and scripts can inspect Mattermost docs and schemas before choosing a function.

kosmo integrations:docs mattermost --json
kosmo integrations:docs mattermost.mattermost_list_channels --json
kosmo integrations:schema mattermost.mattermost_list_channels --json
kosmo integrations:search "Mattermost" --json
kosmo integrations:list --json

Useful Mattermost CLI Functions

FunctionTypeParametersDescription
mattermost.mattermost_list_channels Read page, per_page List channels the current user belongs to in Mattermost. Returns channel IDs, names, types, and team associations. Use this to discover available channels before posting messages or reading posts.
mattermost.mattermost_get_channel Read channel_id Get details of a specific Mattermost channel by ID. Returns channel name, display name, type, header, purpose, and member counts.
mattermost.mattermost_create_post Write channel_id, message Post a message to a Mattermost channel. Provide the channel_id and the message text. Returns the created post with its ID and timestamp.
mattermost.mattermost_list_posts Read channel_id, page, per_page List posts in a Mattermost channel. Returns post IDs, messages, author info, and timestamps. Use page and per_page for pagination.
mattermost.mattermost_get_post Read post_id Get a specific Mattermost post by ID. Returns the full post including message content, author, channel, and timestamps.
mattermost.mattermost_list_teams Read page, per_page List teams the current user belongs to in Mattermost. Returns team IDs, names, display names, and types. Use this to discover available teams before working with channels.
mattermost.mattermost_get_current_user Read none Get the profile of the currently authenticated Mattermost user. Returns username, email, display name, roles, and locale.

Automation Notes

Related Mattermost CLI Pages