Examples
Practical examples of using MCP Server Mattermost with AI assistants.
Sending Alerts
Build Status Alert
"Send a build failed alert to #engineering with red color"
The AI will use post_message with attachments:
{
"channel_id": "engineering-channel-id",
"message": "",
"attachments": [{
"color": "danger",
"title": "Build Failed",
"text": "Pipeline failed on main branch",
"fields": [
{"title": "Branch", "value": "main", "short": true},
{"title": "Commit", "value": "abc1234", "short": true}
]
}]
}
Deployment Notification
"Notify #releases that v2.1.0 is deployed to production"
{
"channel_id": "releases-channel-id",
"message": "",
"attachments": [{
"color": "good",
"title": "Deployment Complete",
"text": "Version 2.1.0 deployed to production",
"footer": "Deployed via CI/CD"
}]
}
Monitoring Channels
Daily Summary
"Summarize what happened in #general today"
The AI will:
- Use
get_channel_by_nameto find the channel - Use
get_channel_messagesto fetch recent messages - Analyze and summarize the conversation
Find Discussions
"Search for messages about the database migration"
The AI will use search_messages:
{
"team_id": "your-team-id",
"terms": "database migration"
}
Team Management
Check Who's Online
"Who's online in my team right now?"
The AI will:
- Use
get_team_membersto list team members - Use
get_user_statusfor each member - Report online/offline status
Find a Person
"Find John's Mattermost account"
The AI will use search_users:
{
"term": "john"
}
Thread Conversations
Reply in Thread
"Reply to that message saying the fix is deployed"
The AI will use post_message with root_id:
{
"channel_id": "channel-id",
"message": "The fix has been deployed to production.",
"root_id": "original-post-id"
}
Get Thread History
"Show me the full thread"
The AI will use get_thread with the root post ID.
File Sharing
Upload and Share
"Upload report.pdf to #general"
The AI will:
- Use
upload_fileto upload the file - Use
post_messagewithfile_idsto share it
Get Download Link
"Get the download link for that file"
The AI will use get_file_link with the file ID.
Channel Management
Create Project Channel
"Create a private channel called project-phoenix for the new project"
The AI will use create_channel:
{
"team_id": "team-id",
"name": "project-phoenix",
"display_name": "Project Phoenix",
"channel_type": "P",
"purpose": "Discussion channel for Project Phoenix"
}
Direct Message
"Send a DM to @alice asking about the meeting"
The AI will:
- Use
get_user_by_usernameto find Alice's user ID - Use
get_meto get the bot's user ID - Use
create_direct_channelto create/get the DM channel - Use
post_messageto send the message
Reactions
React to Message
"Add a thumbs up to that message"
The AI will use add_reaction:
{
"post_id": "message-id",
"emoji_name": "+1"
}
Pin Important Message
"Pin that announcement"
The AI will use pin_message with the post ID.