Mattermost Test Data & MCP Usage
Populate a Mattermost server with realistic test data and interact with it using the connected Mattermost MCP tools.
Available MCP Tools
Write Operations
| Tool |
Purpose |
create_user |
Create user accounts (username, email, password, names, nickname, optional profile_image) |
create_team |
Create teams (name, display_name, type O=open/I=invite, description, optional team_icon) |
create_channel |
Create channels (name, display_name, type O=public/P=private, team_id, purpose, header) |
create_post |
Post as the authenticated bot/admin user (channel_id, message, optional root_id for replies, optional attachments) |
create_post_as_user |
Post as a specific user via username/password login - critical for realistic multi-user conversations |
add_user_to_team |
Add a user to a team by user_id and team_id |
add_user_to_channel |
Add a user to a channel by user_id and channel_id |
dm_self |
Send a DM to yourself (the authenticated user) |
Read Operations
| Tool |
Purpose |
get_channel_info |
Look up channel by ID, display_name, or name. Optional team_id scope |
get_channel_members |
List members of a channel with pagination |
get_team_info |
Look up team by ID, display_name, or name |
get_team_members |
List members of a team with pagination |
read_channel |
Read recent posts from a channel (limit, since timestamp) |
read_post |
Read a specific post and its thread |
search_posts |
Search posts by query, optional team_id/channel_id scope |
search_users |
Search users by username, email, or name |
Test Data Creation Workflow
Follow this order to avoid missing dependencies:
Step 1: Gather Requirements from User
Ask the user what kind of environment they want. If they don't specify, offer a default scenario. Key questions:
- Theme: What kind of team? (engineering, sales, support, devops, etc.)
- Scale: How many users, channels, and messages?
- Conversation topics: Any specific scenarios to demonstrate?
- Realism level: Casual startup vs formal enterprise tone?
Merge user instructions with the defaults below. User instructions always take priority.
Step 2: Create the Team
create_team:
name: url-friendly-name (lowercase, hyphens)
display_name: Human Readable Name
type: O (open) or I (invite-only)
description: Brief team description
Save the returned team_id for subsequent calls.
Step 3: Create Users
Create users with realistic, diverse profiles. For each user, define a persona that guides their communication style throughout all conversations.
Guidelines:
- Use
first.last format for usernames
- Use realistic email addresses (e.g.,
first.last@example.com)
- Use password
Testpassword1! for all test users (simple, meets complexity requirements)
- Give each user a distinct role and communication style
- Vary seniority levels (lead, senior, mid, junior, etc.)
Save each returned user_id.
Persona template (track internally, do not post):
Name: [Full Name]
Username: [first.last]
Role: [Job title]
Style: [Communication traits - e.g., concise and technical, friendly and verbose, asks lots of questions]
Expertise: [Domain strengths]
Step 4: Add Users to Team
Call add_user_to_team for each user with the team_id from Step 2.
Step 5: Create Channels
Create channels appropriate for the team theme. Always include:
- A general channel for announcements and broad discussion
- A random channel for casual/off-topic conversation
- 2-4 topic-specific channels matching the team's domain
For each channel, provide a meaningful purpose and header.
Save each returned channel_id.
Step 6: Add Users to Channels
Call add_user_to_channel for each user+channel combination. Not every user needs to be in every channel - match membership to roles.
Step 7: Create Conversations
This is the most important step. Use create_post_as_user to post as each user with their username and password.
Conversation Quality Guidelines
Message variety:
- Mix short responses ("Sounds good!", "On it.") with detailed technical messages
- Include markdown formatting where natural (code blocks, bullet lists, bold)
- Some messages should reference external links or tools
- Vary message length by persona (seniors write concisely, juniors explain more)
Thread usage:
- Use
root_id to create threaded replies for detailed discussions
- Not every message needs a thread - quick acknowledgments stay in main channel
- Threads should have 2-5 replies typically, occasionally more for complex topics
Persona consistency:
- The team lead coordinates, makes decisions, celebrates wins
- Senior engineers give concise technical guidance
- Junior engineers ask questions, share what they learned
- Each person has a distinct voice
Natural flow:
- Conversations should reference each other implicitly ("as we discussed in #incidents")
- Include realistic work artifacts (deployment commands, config snippets, monitoring queries)
- Show collaboration: someone asks a question, others help, problem gets resolved
Conversation Templates
For each channel, create 2-4 distinct conversation threads. Example patterns:
Problem-solving thread:
- Someone reports an issue
- Others investigate and discuss
- Solution is found and confirmed
- Brief wrap-up or action items
Coordination thread:
- Someone proposes a plan or schedule
- Others confirm availability or raise concerns
- Plan is finalized
Knowledge-sharing thread:
- Someone shares an article, tool, or technique
- Brief discussion about applicability
- Maybe a follow-up action
Casual thread (for #random):
- Light topic (weekend, conference, food)
- A few friendly replies
- Naturally fizzles out
Tips for Realistic Data
- Don't over-emoji. Real engineers use them sparingly. One or two per conversation, not every message.
- Include imperfections. Occasional typos, self-corrections ("wait, I meant..."), or "nvm, found it" messages.
- Reference real tools. Mention Grafana, Terraform, Kubernetes, Jenkins, GitHub, etc. by name.
- Show team dynamics. The lead praises good work. The junior asks for help. The senior mentors casually.
- Keep it proportional. 3-5 messages per simple thread, 6-10 for complex discussions. Don't create 50-message threads.
Reading and Searching Data
Find existing data
search_users: term="john" # Find users by name/email
get_team_info: team_display_name="Engineering" # Find team by name
get_channel_info: channel_display_name="General" # Find channel by name
Read conversations
read_channel: channel_id="...", limit=50 # Recent messages
read_channel: channel_id="...", since="2024-01-01T00:00:00Z" # Since timestamp
read_post: post_id="...", include_thread=true # Full thread
search_posts: query="deployment", team_id="..." # Search by keyword
Inspect membership
get_team_members: team_id="...", limit=50, page=0
get_channel_members: channel_id="...", limit=50, page=0
Common Pitfalls
- Channel name vs display_name:
name must be URL-friendly (lowercase, hyphens, no spaces). display_name is what users see.
- Team type: Use
O for open, I for invite-only. Most test scenarios want O.
- Channel type: Use
O for public, P for private.
- Post ordering: Posts appear in creation order. Create them in the order you want them to appear.
- Thread replies: Set
root_id to the parent post's ID. The channel_id must match the parent post's channel.
- User passwords: When using
create_post_as_user, you need the password you set during user creation. Keep it consistent.
- IDs are 26 characters: All Mattermost IDs (team, channel, user, post) are exactly 26 alphanumeric characters.
Example: Minimal Quick Setup
For a fast demo with minimal data:
- Create team "demo-team"
- Create 3 users (lead, senior, junior)
- Add users to team
- Create 2 channels (general, project)
- Add users to channels
- Create 5-8 messages per channel with 1-2 threaded discussions
This produces a believable workspace in ~30 tool calls.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: mattermost-test-data3description: Backfill realistic test data into a Mattermost server using the Mattermost MCP tools. Creates users, teams, channels, and natural conversations. Use when the user asks to populate a Mattermost instance, create test data, set up a demo environment, seed conversations, or backfill a Mattermost server. Also provides guidance on reading, searching, and interacting with Mattermost via MCP tools. Use when this capability is needed.4---56# Mattermost Test Data & MCP Usage78Populate a Mattermost server with realistic test data and interact with it using the connected Mattermost MCP tools.910## Available MCP Tools1112### Write Operations13| Tool | Purpose |14|------|---------|15| `create_user` | Create user accounts (username, email, password, names, nickname, optional profile_image) |16| `create_team` | Create teams (name, display_name, type O=open/I=invite, description, optional team_icon) |17| `create_channel` | Create channels (name, display_name, type O=public/P=private, team_id, purpose, header) |18| `create_post` | Post as the authenticated bot/admin user (channel_id, message, optional root_id for replies, optional attachments) |19| `create_post_as_user` | Post as a specific user via username/password login - critical for realistic multi-user conversations |20| `add_user_to_team` | Add a user to a team by user_id and team_id |21| `add_user_to_channel` | Add a user to a channel by user_id and channel_id |22| `dm_self` | Send a DM to yourself (the authenticated user) |2324### Read Operations25| Tool | Purpose |26|------|---------|27| `get_channel_info` | Look up channel by ID, display_name, or name. Optional team_id scope |28| `get_channel_members` | List members of a channel with pagination |29| `get_team_info` | Look up team by ID, display_name, or name |30| `get_team_members` | List members of a team with pagination |31| `read_channel` | Read recent posts from a channel (limit, since timestamp) |32| `read_post` | Read a specific post and its thread |33| `search_posts` | Search posts by query, optional team_id/channel_id scope |34| `search_users` | Search users by username, email, or name |3536## Test Data Creation Workflow3738Follow this order to avoid missing dependencies:3940### Step 1: Gather Requirements from User4142Ask the user what kind of environment they want. If they don't specify, offer a default scenario. Key questions:43- **Theme**: What kind of team? (engineering, sales, support, devops, etc.)44- **Scale**: How many users, channels, and messages?45- **Conversation topics**: Any specific scenarios to demonstrate?46- **Realism level**: Casual startup vs formal enterprise tone?4748Merge user instructions with the defaults below. User instructions always take priority.4950### Step 2: Create the Team5152```53create_team:54 name: url-friendly-name (lowercase, hyphens)55 display_name: Human Readable Name56 type: O (open) or I (invite-only)57 description: Brief team description58```5960Save the returned `team_id` for subsequent calls.6162### Step 3: Create Users6364Create users with realistic, diverse profiles. For each user, define a **persona** that guides their communication style throughout all conversations.6566Guidelines:67- Use `first.last` format for usernames68- Use realistic email addresses (e.g., `first.last@example.com`)69- Use password `Testpassword1!` for all test users (simple, meets complexity requirements)70- Give each user a distinct role and communication style71- Vary seniority levels (lead, senior, mid, junior, etc.)7273Save each returned `user_id`.7475**Persona template** (track internally, do not post):76```77Name: [Full Name]78Username: [first.last]79Role: [Job title]80Style: [Communication traits - e.g., concise and technical, friendly and verbose, asks lots of questions]81Expertise: [Domain strengths]82```8384### Step 4: Add Users to Team8586Call `add_user_to_team` for each user with the team_id from Step 2.8788### Step 5: Create Channels8990Create channels appropriate for the team theme. Always include:91- A **general** channel for announcements and broad discussion92- A **random** channel for casual/off-topic conversation93- 2-4 **topic-specific** channels matching the team's domain9495For each channel, provide a meaningful `purpose` and `header`.9697Save each returned `channel_id`.9899### Step 6: Add Users to Channels100101Call `add_user_to_channel` for each user+channel combination. Not every user needs to be in every channel - match membership to roles.102103### Step 7: Create Conversations104105This is the most important step. Use `create_post_as_user` to post as each user with their username and password.106107#### Conversation Quality Guidelines108109**Message variety:**110- Mix short responses ("Sounds good!", "On it.") with detailed technical messages111- Include markdown formatting where natural (code blocks, bullet lists, bold)112- Some messages should reference external links or tools113- Vary message length by persona (seniors write concisely, juniors explain more)114115**Thread usage:**116- Use `root_id` to create threaded replies for detailed discussions117- Not every message needs a thread - quick acknowledgments stay in main channel118- Threads should have 2-5 replies typically, occasionally more for complex topics119120**Persona consistency:**121- The team lead coordinates, makes decisions, celebrates wins122- Senior engineers give concise technical guidance123- Junior engineers ask questions, share what they learned124- Each person has a distinct voice125126**Natural flow:**127- Conversations should reference each other implicitly ("as we discussed in #incidents")128- Include realistic work artifacts (deployment commands, config snippets, monitoring queries)129- Show collaboration: someone asks a question, others help, problem gets resolved130131#### Conversation Templates132133For each channel, create 2-4 distinct conversation threads. Example patterns:134135**Problem-solving thread:**1361. Someone reports an issue1372. Others investigate and discuss1383. Solution is found and confirmed1394. Brief wrap-up or action items140141**Coordination thread:**1421. Someone proposes a plan or schedule1432. Others confirm availability or raise concerns1443. Plan is finalized145146**Knowledge-sharing thread:**1471. Someone shares an article, tool, or technique1482. Brief discussion about applicability1493. Maybe a follow-up action150151**Casual thread (for #random):**1521. Light topic (weekend, conference, food)1532. A few friendly replies1543. Naturally fizzles out155156## Tips for Realistic Data157158- **Don't over-emoji.** Real engineers use them sparingly. One or two per conversation, not every message.159- **Include imperfections.** Occasional typos, self-corrections ("wait, I meant..."), or "nvm, found it" messages.160- **Reference real tools.** Mention Grafana, Terraform, Kubernetes, Jenkins, GitHub, etc. by name.161- **Show team dynamics.** The lead praises good work. The junior asks for help. The senior mentors casually.162- **Keep it proportional.** 3-5 messages per simple thread, 6-10 for complex discussions. Don't create 50-message threads.163164## Reading and Searching Data165166### Find existing data167```168search_users: term="john" # Find users by name/email169get_team_info: team_display_name="Engineering" # Find team by name170get_channel_info: channel_display_name="General" # Find channel by name171```172173### Read conversations174```175read_channel: channel_id="...", limit=50 # Recent messages176read_channel: channel_id="...", since="2024-01-01T00:00:00Z" # Since timestamp177read_post: post_id="...", include_thread=true # Full thread178search_posts: query="deployment", team_id="..." # Search by keyword179```180181### Inspect membership182```183get_team_members: team_id="...", limit=50, page=0184get_channel_members: channel_id="...", limit=50, page=0185```186187## Common Pitfalls188189- **Channel name vs display_name**: `name` must be URL-friendly (lowercase, hyphens, no spaces). `display_name` is what users see.190- **Team type**: Use `O` for open, `I` for invite-only. Most test scenarios want `O`.191- **Channel type**: Use `O` for public, `P` for private.192- **Post ordering**: Posts appear in creation order. Create them in the order you want them to appear.193- **Thread replies**: Set `root_id` to the parent post's ID. The `channel_id` must match the parent post's channel.194- **User passwords**: When using `create_post_as_user`, you need the password you set during user creation. Keep it consistent.195- **IDs are 26 characters**: All Mattermost IDs (team, channel, user, post) are exactly 26 alphanumeric characters.196197## Example: Minimal Quick Setup198199For a fast demo with minimal data:2002011. Create team "demo-team"2022. Create 3 users (lead, senior, junior)2033. Add users to team2044. Create 2 channels (general, project)2055. Add users to channels2066. Create 5-8 messages per channel with 1-2 threaded discussions207208This produces a believable workspace in ~30 tool calls.209210---211> Converted and distributed by [TomeVault](https://tomevault.io/claim/mattermost) — claim your Tome and manage your conversions.212<!-- tomevault:4.0:skill_md:2026-04-13 -->