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 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.
kosmo integrations:call mattermost.mattermost_api_get '{}' --json 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.
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 - Parameters
- none
kosmo integrations:call mattermost.mattermost_api_get '{}' --json kosmo integrations:mattermost mattermost_api_get '{}' --json mattermost.mattermost_api_post
Execute a raw Mattermost API POST request.
write - Parameters
- none
kosmo integrations:call mattermost.mattermost_api_post '{}' --json kosmo integrations:mattermost mattermost_api_post '{}' --json mattermost.mattermost_api_put
Execute a raw Mattermost API PUT request.
write - Parameters
- none
kosmo integrations:call mattermost.mattermost_api_put '{}' --json kosmo integrations:mattermost mattermost_api_put '{}' --json mattermost.mattermost_api_patch
Execute a raw Mattermost API PATCH request.
write - Parameters
- none
kosmo integrations:call mattermost.mattermost_api_patch '{}' --json kosmo integrations:mattermost mattermost_api_patch '{}' --json mattermost.mattermost_api_delete
Execute a raw Mattermost API DELETE request.
write - Parameters
- none
kosmo integrations:call mattermost.mattermost_api_delete '{}' --json 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 - Parameters
- none
kosmo integrations:call mattermost.mattermost_get_current_user '{}' --json kosmo integrations:mattermost mattermost_get_current_user '{}' --json mattermost.mattermost_list_users
List Mattermost users.
read - Parameters
- none
kosmo integrations:call mattermost.mattermost_list_users '{}' --json kosmo integrations:mattermost mattermost_list_users '{}' --json mattermost.mattermost_search_users
Search Mattermost users.
read - Parameters
- none
kosmo integrations:call mattermost.mattermost_search_users '{}' --json kosmo integrations:mattermost mattermost_search_users '{}' --json mattermost.mattermost_get_user
Get a Mattermost user by ID.
read - Parameters
- none
kosmo integrations:call mattermost.mattermost_get_user '{}' --json kosmo integrations:mattermost mattermost_get_user '{}' --json mattermost.mattermost_get_user_by_username
Get a Mattermost user by username.
read - Parameters
- none
kosmo integrations:call mattermost.mattermost_get_user_by_username '{}' --json kosmo integrations:mattermost mattermost_get_user_by_username '{}' --json mattermost.mattermost_create_user
Create a Mattermost user.
write - Parameters
- none
kosmo integrations:call mattermost.mattermost_create_user '{}' --json kosmo integrations:mattermost mattermost_create_user '{}' --json mattermost.mattermost_patch_user
Patch a Mattermost user.
write - Parameters
- none
kosmo integrations:call mattermost.mattermost_patch_user '{}' --json kosmo integrations:mattermost mattermost_patch_user '{}' --json mattermost.mattermost_deactivate_user
Deactivate or activate a Mattermost user.
write - Parameters
- none
kosmo integrations:call mattermost.mattermost_deactivate_user '{}' --json 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 - Parameters
- page, per_page
kosmo integrations:call mattermost.mattermost_list_teams '{"page":1,"per_page":1}' --json kosmo integrations:mattermost mattermost_list_teams '{"page":1,"per_page":1}' --json mattermost.mattermost_get_team
Get a Mattermost team.
read - Parameters
- none
kosmo integrations:call mattermost.mattermost_get_team '{}' --json kosmo integrations:mattermost mattermost_get_team '{}' --json mattermost.mattermost_create_team
Create a Mattermost team.
write - Parameters
- none
kosmo integrations:call mattermost.mattermost_create_team '{}' --json kosmo integrations:mattermost mattermost_create_team '{}' --json mattermost.mattermost_patch_team
Patch a Mattermost team.
write - Parameters
- none
kosmo integrations:call mattermost.mattermost_patch_team '{}' --json kosmo integrations:mattermost mattermost_patch_team '{}' --json mattermost.mattermost_list_team_members
List Mattermost team members.
read - Parameters
- none
kosmo integrations:call mattermost.mattermost_list_team_members '{}' --json kosmo integrations:mattermost mattermost_list_team_members '{}' --json mattermost.mattermost_add_team_member
Add a user to a Mattermost team.
write - Parameters
- none
kosmo integrations:call mattermost.mattermost_add_team_member '{}' --json kosmo integrations:mattermost mattermost_add_team_member '{}' --json mattermost.mattermost_remove_team_member
Remove a user from a Mattermost team.
write - Parameters
- none
kosmo integrations:call mattermost.mattermost_remove_team_member '{}' --json 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 - Parameters
- page, per_page
kosmo integrations:call mattermost.mattermost_list_channels '{"page":1,"per_page":1}' --json kosmo integrations:mattermost mattermost_list_channels '{"page":1,"per_page":1}' --json mattermost.mattermost_list_team_channels
List channels in a Mattermost team.
read - Parameters
- none
kosmo integrations:call mattermost.mattermost_list_team_channels '{}' --json kosmo integrations:mattermost mattermost_list_team_channels '{}' --json mattermost.mattermost_search_channels
Search channels in a Mattermost team.
read - Parameters
- none
kosmo integrations:call mattermost.mattermost_search_channels '{}' --json kosmo integrations:mattermost mattermost_search_channels '{}' --json mattermost.mattermost_create_channel
Create a Mattermost channel.
write - Parameters
- none
kosmo integrations:call mattermost.mattermost_create_channel '{}' --json 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 - Parameters
- channel_id
kosmo integrations:call mattermost.mattermost_get_channel '{"channel_id":"example_channel_id"}' --json kosmo integrations:mattermost mattermost_get_channel '{"channel_id":"example_channel_id"}' --json mattermost.mattermost_patch_channel
Patch a Mattermost channel.
write - Parameters
- none
kosmo integrations:call mattermost.mattermost_patch_channel '{}' --json kosmo integrations:mattermost mattermost_patch_channel '{}' --json mattermost.mattermost_delete_channel
Delete a Mattermost channel.
write - Parameters
- none
kosmo integrations:call mattermost.mattermost_delete_channel '{}' --json kosmo integrations:mattermost mattermost_delete_channel '{}' --json mattermost.mattermost_list_channel_members
List Mattermost channel members.
read - Parameters
- none
kosmo integrations:call mattermost.mattermost_list_channel_members '{}' --json kosmo integrations:mattermost mattermost_list_channel_members '{}' --json mattermost.mattermost_add_channel_member
Add a user to a Mattermost channel.
write - Parameters
- none
kosmo integrations:call mattermost.mattermost_add_channel_member '{}' --json kosmo integrations:mattermost mattermost_add_channel_member '{}' --json mattermost.mattermost_remove_channel_member
Remove a user from a Mattermost channel.
write - Parameters
- none
kosmo integrations:call mattermost.mattermost_remove_channel_member '{}' --json 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 - Parameters
- channel_id, message
kosmo integrations:call mattermost.mattermost_create_post '{"channel_id":"example_channel_id","message":"example_message"}' --json 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 - Parameters
- channel_id, page, per_page
kosmo integrations:call mattermost.mattermost_list_posts '{"channel_id":"example_channel_id","page":1,"per_page":1}' --json 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 - Parameters
- post_id
kosmo integrations:call mattermost.mattermost_get_post '{"post_id":"example_post_id"}' --json kosmo integrations:mattermost mattermost_get_post '{"post_id":"example_post_id"}' --json mattermost.mattermost_patch_post
Patch a Mattermost post.
write - Parameters
- none
kosmo integrations:call mattermost.mattermost_patch_post '{}' --json kosmo integrations:mattermost mattermost_patch_post '{}' --json mattermost.mattermost_delete_post
Delete a Mattermost post.
write - Parameters
- none
kosmo integrations:call mattermost.mattermost_delete_post '{}' --json kosmo integrations:mattermost mattermost_delete_post '{}' --json mattermost.mattermost_search_posts
Search posts in a Mattermost team.
read - Parameters
- none
kosmo integrations:call mattermost.mattermost_search_posts '{}' --json kosmo integrations:mattermost mattermost_search_posts '{}' --json mattermost.mattermost_get_post_thread
Get a Mattermost post thread.
read - Parameters
- none
kosmo integrations:call mattermost.mattermost_get_post_thread '{}' --json kosmo integrations:mattermost mattermost_get_post_thread '{}' --json mattermost.mattermost_list_post_reactions
List reactions for a Mattermost post.
read - Parameters
- none
kosmo integrations:call mattermost.mattermost_list_post_reactions '{}' --json kosmo integrations:mattermost mattermost_list_post_reactions '{}' --json mattermost.mattermost_create_reaction
Add a reaction to a Mattermost post.
write - Parameters
- none
kosmo integrations:call mattermost.mattermost_create_reaction '{}' --json kosmo integrations:mattermost mattermost_create_reaction '{}' --json mattermost.mattermost_delete_reaction
Delete a Mattermost reaction.
write - Parameters
- none
kosmo integrations:call mattermost.mattermost_delete_reaction '{}' --json kosmo integrations:mattermost mattermost_delete_reaction '{}' --json mattermost.mattermost_get_file_info
Get Mattermost file metadata.
read - Parameters
- none
kosmo integrations:call mattermost.mattermost_get_file_info '{}' --json 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
kosmo integrations:schema mattermost.mattermost_api_get --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_api_post 0 parameters
kosmo integrations:schema mattermost.mattermost_api_post --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_api_put 0 parameters
kosmo integrations:schema mattermost.mattermost_api_put --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_api_patch 0 parameters
kosmo integrations:schema mattermost.mattermost_api_patch --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_api_delete 0 parameters
kosmo integrations:schema mattermost.mattermost_api_delete --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_get_current_user 0 parameters
kosmo integrations:schema mattermost.mattermost_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_list_users 0 parameters
kosmo integrations:schema mattermost.mattermost_list_users --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_search_users 0 parameters
kosmo integrations:schema mattermost.mattermost_search_users --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_get_user 0 parameters
kosmo integrations:schema mattermost.mattermost_get_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_get_user_by_username 0 parameters
kosmo integrations:schema mattermost.mattermost_get_user_by_username --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_create_user 0 parameters
kosmo integrations:schema mattermost.mattermost_create_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_patch_user 0 parameters
kosmo integrations:schema mattermost.mattermost_patch_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_deactivate_user 0 parameters
kosmo integrations:schema mattermost.mattermost_deactivate_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_list_teams 2 parameters
kosmo integrations:schema mattermost.mattermost_list_teams --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema mattermost.mattermost_get_team --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_create_team 0 parameters
kosmo integrations:schema mattermost.mattermost_create_team --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_patch_team 0 parameters
kosmo integrations:schema mattermost.mattermost_patch_team --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_list_team_members 0 parameters
kosmo integrations:schema mattermost.mattermost_list_team_members --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_add_team_member 0 parameters
kosmo integrations:schema mattermost.mattermost_add_team_member --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_remove_team_member 0 parameters
kosmo integrations:schema mattermost.mattermost_remove_team_member --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_list_channels 2 parameters
kosmo integrations:schema mattermost.mattermost_list_channels --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema mattermost.mattermost_list_team_channels --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_search_channels 0 parameters
kosmo integrations:schema mattermost.mattermost_search_channels --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_create_channel 0 parameters
kosmo integrations:schema mattermost.mattermost_create_channel --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_get_channel 1 parameters
kosmo integrations:schema mattermost.mattermost_get_channel --json | Parameter | Type | Required | Description |
|---|---|---|---|
channel_id | string | yes | The channel ID. |
mattermost.mattermost_patch_channel 0 parameters
kosmo integrations:schema mattermost.mattermost_patch_channel --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_delete_channel 0 parameters
kosmo integrations:schema mattermost.mattermost_delete_channel --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_list_channel_members 0 parameters
kosmo integrations:schema mattermost.mattermost_list_channel_members --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_add_channel_member 0 parameters
kosmo integrations:schema mattermost.mattermost_add_channel_member --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_remove_channel_member 0 parameters
kosmo integrations:schema mattermost.mattermost_remove_channel_member --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_create_post 2 parameters
kosmo integrations:schema mattermost.mattermost_create_post --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema mattermost.mattermost_list_posts --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema mattermost.mattermost_get_post --json | Parameter | Type | Required | Description |
|---|---|---|---|
post_id | string | yes | The post ID. |
mattermost.mattermost_patch_post 0 parameters
kosmo integrations:schema mattermost.mattermost_patch_post --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_delete_post 0 parameters
kosmo integrations:schema mattermost.mattermost_delete_post --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_search_posts 0 parameters
kosmo integrations:schema mattermost.mattermost_search_posts --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_get_post_thread 0 parameters
kosmo integrations:schema mattermost.mattermost_get_post_thread --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_list_post_reactions 0 parameters
kosmo integrations:schema mattermost.mattermost_list_post_reactions --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_create_reaction 0 parameters
kosmo integrations:schema mattermost.mattermost_create_reaction --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_delete_reaction 0 parameters
kosmo integrations:schema mattermost.mattermost_delete_reaction --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
mattermost.mattermost_get_file_info 0 parameters
kosmo integrations:schema mattermost.mattermost_get_file_info --json | Parameter | Type | Required | Description |
|---|---|---|---|
| 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.