# Mattermost MCP

> Mattermost connects your internal team chat into your AI client. You manage everything—from sending a quick message in a DM to tracking complex deployment threads and listing all users on the server—all via natural conversation. It gives your agent full control over reading, writing, and managing your workspace history.

## Overview
- **Category:** talk-to-me
- **Price:** Free
- **Tags:** team-messaging, open-source, channel-management, secure-collaboration, thread-tracking, devops-communication

## Description

**You've got full control over your team chat, period.** This server lets your agent talk directly to Mattermost—you manage everything from sending quick messages in DMs to tracking deep deployment threads and listing out every user on the whole platform. It gives your agent read access, write access, and management tools for your entire workspace history.

### Messaging and Channels
When you need to communicate, your agent sends a new chat message using `post_message` to any channel or direct message recipient. You can pull up the full conversation record from an entire channel at any time by calling `list_channel_posts`, which retrieves the complete chronological list of posts and messages. If the team needs more space, your agent establishes a dedicated discussion area using `create_new_channel`. For keeping tabs on existing groups, you can get a definitive rundown of every single channel belonging to a specific group via `list_team_channels`.

### User and Team Management
Need to know who’s on the roster? You'll get a complete list of every user account registered on the server using `list_server_users`, which includes details about their roles and current status. Want to check your own credentials? Your agent pulls your personal profile info with `get_my_profile`. For structuring teams, you can retrieve a comprehensive list of all major teams defined in the workspace hierarchy via `list_teams`. Once you pick a specific team, you get granular details about it using `get_team_details`. The system also lets you see every possible access role and permission set up within Mattermost by listing out available roles with `list_system_roles`.

### System Status and Configuration
Before trusting your agent with anything important, you'll want to check the connection. Running `test_server_ping` gives a quick health check confirming the API link is live. If you need to know how things are configured, `get_server_config` retrieves all the current system settings and operational parameters for the entire Mattermost instance. For visibility into automated actions, your agent can display every incoming webhook setup by listing them with `list_incoming_webhooks`. These tools ensure you see exactly what's running behind the scenes.

## Tools

### create_new_channel
Creates a new dedicated discussion channel in the Mattermost workspace.

### post_message
Sends a new chat message to any specified channel or direct message recipient.

### get_server_config
Retrieves the current system settings and configuration parameters for the entire Mattermost instance.

### get_my_profile
Fetches and displays your personal user profile details on the server.

### test_server_ping
Runs a quick health check to confirm the Mattermost API connection is live and responding.

### get_team_details
Gets specific information about a designated team within your organization's structure.

### list_team_channels
Lists every channel that belongs to a specific, designated team.

### list_channel_posts
Retrieves the complete message history for any specified channel or thread.

### list_system_roles
Displays all possible access roles and permissions defined within the Mattermost system.

### list_teams
Retrieves a list of all major teams defined in the Mattermost workspace hierarchy.

### list_server_users
Provides a complete list of every user account currently registered on the Mattermost server.

### list_incoming_webhooks
Lists and displays the configuration settings for all incoming webhooks connected to the server.

## Prompt Examples

**Prompt:** 
```
Show unread messages in the #deployments channel.
```

**Response:** 
```
#deployments: 3 new messages. 1) @bot: 'Deploying v2.4.1 to Production 🚀' (10 min ago). 2) @mike: 'Monitoring CPU usage...' (8 min). 3) @bot: 'Deploy successful ✅ All checks passed' (2 min ago).
```

**Prompt:** 
```
Send a message to the #engineering channel announcing the meeting.
```

**Response:** 
```
Message posted! ✅ Channel: #engineering. Content: 'Hey team! Just a reminder that our all-hands meeting starts in 15 minutes. See you there! @channel'. Message ID: msg_8901.
```

**Prompt:** 
```
Search for 'API rate limit' and show thread replies.
```

**Response:** 
```
Found 1 matching thread in #backend. Original (Apr 12): 'We are hitting the API rate limit on the third-party integration.' Replies: 4. @sarah: 'I will increase the backoff time.' @mike: 'Done, PR #45 merged.' @sarah: 'Metrics look stable now ✅'.
```

## Capabilities

### Manage User Profiles
Retrieves detailed information about specific user accounts on the Mattermost server.

### Post Messages to Channels
Sends a chat message into a specified channel or direct message thread using `post_message`.

### View Channel History
Retrieves the chronological list of posts and messages from an entire channel over time.

### Create New Channels
Programmatically establishes a new communication channel within your Mattermost workspace.

### List System Users
Retrieves a list of every user account registered on the server, along with their roles and status.

### Check Server Status
Verifies the current operational configuration and health status of the entire Mattermost instance.

## Use Cases

### The Incident Response Summary
A major service fails at 3 AM. Instead of jumping into Mattermost, copying messages, and summarizing them in a ticket, you ask your agent: 'Summarize the last hour in #devops-alerts.' The agent runs `list_channel_posts` to gather all posts, identifies key people, and gives you a bulleted summary immediately.

### Onboarding New Engineers
A new hire needs access details for three different teams. Instead of sending a dozen links, you prompt your agent: 'List the channels for the Engineering team.' The agent runs `list_team_channels` and hands you the entire list so you can share it in one email.

### Finding Old Decisions
The PM needs to know who approved the Q3 budget change. They ask their agent: 'Search for 'Q3 Budget' in #management.' The agent runs `list_channel_posts` and surfaces the exact thread, showing user names and timestamps of approval.

### System Audit Check
The security team suspects a webhook was compromised. They ask: 'Show all incoming webhooks.' The agent runs `list_incoming_webhooks` and provides a clear, actionable list of every external service connected to the server.

## Benefits

- Stop manually checking logs. Use `list_channel_posts` to instantly pull the full thread history for a specific incident, saving you minutes of scrolling through old messages.
- Never lose track of who's on the team again. Run `list_server_users` to get an immediate roster of everyone and their current roles without leaving your chat window.
- Automate alerts directly. Use `post_message` to trigger a status update—like 'Deployment v3.1 passed all checks'—to a dedicated #alerts channel immediately after a job finishes.
- Organize your workspace on demand. If the team needs a new project space, use `create_new_channel` and get instant chat access without needing admin permission elsewhere.
- Get an overview of system health. Run `get_server_config` to quickly verify that critical settings—like webhook endpoints—haven't been accidentally changed.

## How It Works

The bottom line is, your agent talks to Mattermost using a direct API connection, letting you manage chats and data without ever logging into the platform itself.

1. First, subscribe to this server on Vinkius. You'll need your Mattermost Base URL and an Access Token.
2. Next, connect that token into your preferred AI client (Claude, Cursor, etc.).
3. Finally, you tell your agent what you want—like 'Show unread messages in #deployments.' The agent runs the necessary tools against your live workspace data.

## Frequently Asked Questions

**How do I use list_channel_posts with Mattermost?**
You prompt your agent to run `list_channel_posts` and specify the channel ID or name. The tool returns a chronological list of messages, allowing you to read through history without manually scrolling.

**Can I use post_message to automate alerts?**
Yes, absolutely. You can instruct your agent to run `post_message` immediately after a script finishes. This is perfect for notifying the #alerts channel that a deployment succeeded or failed.

**What if I need to know who has access to certain features? Do I use list_server_users?**
While `list_server_users` gives you names, run `list_system_roles` first. This shows all available permissions, and then you can ask your agent about specific user roles.

**Does Mattermost MCP Server support reading DMs?**
Yes. You can use the message tools to read and reply in private channels (DMs). Just specify the recipient's ID or name when you talk to your agent.

**How do I check if my Mattermost connection is active before running any commands? Do I use test_server_ping?**
Yes, run `test_server_ping` to verify the API health. This immediately confirms your agent can talk to the server without needing complex setup or triggering rate limits.

**If I need to audit which services are sending data into Mattermost, what tool should I use? Is it list_incoming_webhooks?**
You use `list_incoming_webhooks` to view event configurations. This lets your agent check exactly which external services are feeding data and what triggers are active in the workspace.

**How can my AI client understand the different levels of access or permissions on the server? Should I use list_system_roles?**
Run `list_system_roles` to see every available access role. This gives your agent a clear view of the permission hierarchy—like Admin vs. Member—so it doesn't attempt actions users can't perform.

**Before creating new groups, how do I get an overview of all organizational units? Do I use list_teams?**
Use `list_teams` to retrieve a list of every defined team in your workspace. This is crucial for structuring automation; your agent knows which group containers exist before managing channels inside them.

**Can I read messages and reply to threads?**
Yes. Browse channel history, read specific threads, and post replies or new messages with markdown formatting.

**How does Mattermost authentication work?**
Mattermost requires your instance's **Base URL** and a Personal **Access Token** for Bearer authentication.

**Can I manage channels and users?**
Yes. Create new public/private channels, invite users, and check their online status.