KosmoKrator

productivity

Mattermost CLI for AI Agents

Use the Mattermost CLI from KosmoKrator to call Mattermost tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

Mattermost CLI Setup

Mattermost can be configured headlessly with `kosmokrator integrations:configure mattermost`.

Install, configure, and verify
# 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 mattermost --enable --read allow --write ask --json
kosmokrator integrations:doctor mattermost --json
kosmokrator integrations:status --json

Credentials

Authentication type: Bearer token bearer_token. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

No credentials are required.

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call mattermost.mattermost_api_get '{}' --json
Provider shortcut
kosmo integrations:mattermost mattermost_api_get '{}' --json

Discovery

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

Discovery commands
kosmo integrations:docs mattermost --json
kosmo integrations:docs mattermost.mattermost_api_get --json
kosmo integrations:schema mattermost.mattermost_api_get --json
kosmo integrations:search "Mattermost" --json
kosmo integrations:list --json

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

mattermost.mattermost_api_get

Execute a raw Mattermost API GET request.

Read read
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_api_get '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_api_get '{}' --json

mattermost.mattermost_api_post

Execute a raw Mattermost API POST request.

Write write
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_api_post '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_api_post '{}' --json

mattermost.mattermost_api_put

Execute a raw Mattermost API PUT request.

Write write
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_api_put '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_api_put '{}' --json

mattermost.mattermost_api_patch

Execute a raw Mattermost API PATCH request.

Write write
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_api_patch '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_api_patch '{}' --json

mattermost.mattermost_api_delete

Execute a raw Mattermost API DELETE request.

Write write
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_api_delete '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_api_delete '{}' --json

mattermost.mattermost_get_current_user

Get the profile of the currently authenticated Mattermost user. Returns username, email, display name, roles, and locale.

Read read
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_get_current_user '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_get_current_user '{}' --json

mattermost.mattermost_list_users

List Mattermost users.

Read read
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_list_users '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_list_users '{}' --json

mattermost.mattermost_search_users

Search Mattermost users.

Read read
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_search_users '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_search_users '{}' --json

mattermost.mattermost_get_user

Get a Mattermost user by ID.

Read read
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_get_user '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_get_user '{}' --json

mattermost.mattermost_get_user_by_username

Get a Mattermost user by username.

Read read
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_get_user_by_username '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_get_user_by_username '{}' --json

mattermost.mattermost_create_user

Create a Mattermost user.

Write write
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_create_user '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_create_user '{}' --json

mattermost.mattermost_patch_user

Patch a Mattermost user.

Write write
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_patch_user '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_patch_user '{}' --json

mattermost.mattermost_deactivate_user

Deactivate or activate a Mattermost user.

Write write
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_deactivate_user '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_deactivate_user '{}' --json

mattermost.mattermost_list_teams

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.

Read read
Parameters
page, per_page
Generic call
kosmo integrations:call mattermost.mattermost_list_teams '{"page":1,"per_page":1}' --json
Shortcut
kosmo integrations:mattermost mattermost_list_teams '{"page":1,"per_page":1}' --json

mattermost.mattermost_get_team

Get a Mattermost team.

Read read
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_get_team '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_get_team '{}' --json

mattermost.mattermost_create_team

Create a Mattermost team.

Write write
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_create_team '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_create_team '{}' --json

mattermost.mattermost_patch_team

Patch a Mattermost team.

Write write
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_patch_team '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_patch_team '{}' --json

mattermost.mattermost_list_team_members

List Mattermost team members.

Read read
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_list_team_members '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_list_team_members '{}' --json

mattermost.mattermost_add_team_member

Add a user to a Mattermost team.

Write write
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_add_team_member '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_add_team_member '{}' --json

mattermost.mattermost_remove_team_member

Remove a user from a Mattermost team.

Write write
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_remove_team_member '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_remove_team_member '{}' --json

mattermost.mattermost_list_channels

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.

Read read
Parameters
page, per_page
Generic call
kosmo integrations:call mattermost.mattermost_list_channels '{"page":1,"per_page":1}' --json
Shortcut
kosmo integrations:mattermost mattermost_list_channels '{"page":1,"per_page":1}' --json

mattermost.mattermost_list_team_channels

List channels in a Mattermost team.

Read read
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_list_team_channels '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_list_team_channels '{}' --json

mattermost.mattermost_search_channels

Search channels in a Mattermost team.

Read read
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_search_channels '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_search_channels '{}' --json

mattermost.mattermost_create_channel

Create a Mattermost channel.

Write write
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_create_channel '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_create_channel '{}' --json

mattermost.mattermost_get_channel

Get details of a specific Mattermost channel by ID. Returns channel name, display name, type, header, purpose, and member counts.

Read read
Parameters
channel_id
Generic call
kosmo integrations:call mattermost.mattermost_get_channel '{"channel_id":"example_channel_id"}' --json
Shortcut
kosmo integrations:mattermost mattermost_get_channel '{"channel_id":"example_channel_id"}' --json

mattermost.mattermost_patch_channel

Patch a Mattermost channel.

Write write
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_patch_channel '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_patch_channel '{}' --json

mattermost.mattermost_delete_channel

Delete a Mattermost channel.

Write write
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_delete_channel '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_delete_channel '{}' --json

mattermost.mattermost_list_channel_members

List Mattermost channel members.

Read read
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_list_channel_members '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_list_channel_members '{}' --json

mattermost.mattermost_add_channel_member

Add a user to a Mattermost channel.

Write write
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_add_channel_member '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_add_channel_member '{}' --json

mattermost.mattermost_remove_channel_member

Remove a user from a Mattermost channel.

Write write
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_remove_channel_member '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_remove_channel_member '{}' --json

mattermost.mattermost_create_post

Post a message to a Mattermost channel. Provide the channel_id and the message text. Returns the created post with its ID and timestamp.

Write write
Parameters
channel_id, message
Generic call
kosmo integrations:call mattermost.mattermost_create_post '{"channel_id":"example_channel_id","message":"example_message"}' --json
Shortcut
kosmo integrations:mattermost mattermost_create_post '{"channel_id":"example_channel_id","message":"example_message"}' --json

mattermost.mattermost_list_posts

List posts in a Mattermost channel. Returns post IDs, messages, author info, and timestamps. Use page and per_page for pagination.

Read read
Parameters
channel_id, page, per_page
Generic call
kosmo integrations:call mattermost.mattermost_list_posts '{"channel_id":"example_channel_id","page":1,"per_page":1}' --json
Shortcut
kosmo integrations:mattermost mattermost_list_posts '{"channel_id":"example_channel_id","page":1,"per_page":1}' --json

mattermost.mattermost_get_post

Get a specific Mattermost post by ID. Returns the full post including message content, author, channel, and timestamps.

Read read
Parameters
post_id
Generic call
kosmo integrations:call mattermost.mattermost_get_post '{"post_id":"example_post_id"}' --json
Shortcut
kosmo integrations:mattermost mattermost_get_post '{"post_id":"example_post_id"}' --json

mattermost.mattermost_patch_post

Patch a Mattermost post.

Write write
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_patch_post '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_patch_post '{}' --json

mattermost.mattermost_delete_post

Delete a Mattermost post.

Write write
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_delete_post '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_delete_post '{}' --json

mattermost.mattermost_search_posts

Search posts in a Mattermost team.

Read read
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_search_posts '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_search_posts '{}' --json

mattermost.mattermost_get_post_thread

Get a Mattermost post thread.

Read read
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_get_post_thread '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_get_post_thread '{}' --json

mattermost.mattermost_list_post_reactions

List reactions for a Mattermost post.

Read read
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_list_post_reactions '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_list_post_reactions '{}' --json

mattermost.mattermost_create_reaction

Add a reaction to a Mattermost post.

Write write
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_create_reaction '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_create_reaction '{}' --json

mattermost.mattermost_delete_reaction

Delete a Mattermost reaction.

Write write
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_delete_reaction '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_delete_reaction '{}' --json

mattermost.mattermost_get_file_info

Get Mattermost file metadata.

Read read
Parameters
none
Generic call
kosmo integrations:call mattermost.mattermost_get_file_info '{}' --json
Shortcut
kosmo integrations:mattermost mattermost_get_file_info '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

mattermost.mattermost_api_get 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_api_get --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_api_post 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_api_post --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_api_put 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_api_put --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_api_patch 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_api_patch --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_api_delete 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_api_delete --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_get_current_user 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_get_current_user --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_list_users 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_list_users --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_search_users 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_search_users --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_get_user 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_get_user --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_get_user_by_username 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_get_user_by_username --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_create_user 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_create_user --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_patch_user 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_patch_user --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_deactivate_user 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_deactivate_user --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_list_teams 2 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_list_teams --json
ParameterTypeRequiredDescription
page integer no Page number (0-indexed). Default: 0.
per_page integer no Number of teams per page. Default: 60.
mattermost.mattermost_get_team 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_get_team --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_create_team 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_create_team --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_patch_team 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_patch_team --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_list_team_members 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_list_team_members --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_add_team_member 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_add_team_member --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_remove_team_member 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_remove_team_member --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_list_channels 2 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_list_channels --json
ParameterTypeRequiredDescription
page integer no Page number (0-indexed). Default: 0.
per_page integer no Number of channels per page. Default: 60.
mattermost.mattermost_list_team_channels 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_list_team_channels --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_search_channels 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_search_channels --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_create_channel 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_create_channel --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_get_channel 1 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_get_channel --json
ParameterTypeRequiredDescription
channel_id string yes The channel ID.
mattermost.mattermost_patch_channel 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_patch_channel --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_delete_channel 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_delete_channel --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_list_channel_members 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_list_channel_members --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_add_channel_member 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_add_channel_member --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_remove_channel_member 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_remove_channel_member --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_create_post 2 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_create_post --json
ParameterTypeRequiredDescription
channel_id string yes The channel ID to post the message in.
message string yes The message text to post. Supports Markdown formatting.
mattermost.mattermost_list_posts 3 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_list_posts --json
ParameterTypeRequiredDescription
channel_id string yes The channel ID to list posts from.
page integer no Page number (0-indexed). Default: 0.
per_page integer no Number of posts per page. Default: 60.
mattermost.mattermost_get_post 1 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_get_post --json
ParameterTypeRequiredDescription
post_id string yes The post ID.
mattermost.mattermost_patch_post 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_patch_post --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_delete_post 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_delete_post --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_search_posts 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_search_posts --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_get_post_thread 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_get_post_thread --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_list_post_reactions 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_list_post_reactions --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_create_reaction 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_create_reaction --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_delete_reaction 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_delete_reaction --json
ParameterTypeRequiredDescription
No parameters.
mattermost.mattermost_get_file_info 0 parameters
Schema command
kosmo integrations:schema mattermost.mattermost_get_file_info --json
ParameterTypeRequiredDescription
No parameters.

Permissions

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.