mcp-server-mattermost
Provides tools to read, search, and post messages in Mattermost, manage channels, reactions, threads, files, users, teams, and bookmarks.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-mattermostSearch for messages about the outage last week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-server-mattermost
Let AI assistants read, search, and post in your Mattermost workspace
38 tools · Channels · Messages · Reactions · Threads · Files · Users
Features
Channels — list, create, join, manage channels and DMs Messages — send, search, edit, delete with rich attachments Reactions & Threads — emoji reactions, pins, full thread history Users & Teams — lookup, search, status Files — upload, metadata, download links Bookmarks — save links and files in channels (Entry+ edition)
Example Queries
Once configured, you can ask your AI assistant:
"List all channels and find where the deployment discussion is happening"
"What did I miss in #engineering since yesterday morning?"
"Show me my unread channels and summarize the threads I was mentioned in"
"Send a build status alert to #engineering with a red attachment"
"Search for messages about the outage last week and summarize"
"Summarize this thread and post the key decisions"
"Find who worked on the authentication bug last week"
"Upload the report.pdf to #general and share the link"
Available Tools
Tool | Description | Key Parameters |
| List public channels in a team |
|
| List your channels with unread counts |
|
| Get channel details by ID |
|
| Get channel by name |
|
| Create a new channel |
|
| Join a public channel |
|
| Leave a channel |
|
| Mark a channel as viewed (reset unread counters) |
|
| List channel members |
|
| Add user to channel |
|
| Create DM channel |
|
Tool | Description | Key Parameters |
| Send a message to a channel |
|
| Get messages: recent, unread window, or |
|
| Search messages by term |
|
| Edit a message |
|
| Delete a message |
|
Tool | Description | Key Parameters |
| Add emoji reaction |
|
| Remove emoji reaction |
|
| Get all reactions on a post |
|
| Pin a message |
|
| Unpin a message |
|
| Get thread messages |
|
Tool | Description | Key Parameters |
| Get current user info | — |
| Get user by ID |
|
| Get user by username |
|
| Search users |
|
| Get online status |
|
Tool | Description | Key Parameters |
| List your teams | — |
| Get team details |
|
| List team members |
|
Tool | Description | Key Parameters |
| Upload a file |
|
| Get file metadata |
|
| Get download link |
|
Note: Requires Entry, Professional, Enterprise, or Enterprise Advanced edition (not available in Team Edition). Minimum version: v10.1.
Tool | Description | Key Parameters |
| List channel bookmarks |
|
| Create link or file bookmark |
|
| Update bookmark properties |
|
| Delete a bookmark |
|
| Reorder bookmark |
|
Quick Start
Get a Mattermost bot token
Add to your MCP client config:
{
"mcpServers": {
"mattermost": {
"command": "uvx",
"args": ["mcp-server-mattermost"],
"env": {
"MATTERMOST_URL": "https://your-server.com",
"MATTERMOST_TOKEN": "your-token"
}
}
}
}Restart your client
Full setup guide — Claude Desktop, Cursor, Claude Code, Opencode, Docker, pip
Configuration
Variable | Required | Default | Description |
| Yes | — | Mattermost server URL |
| No |
| Auth mode: |
| Conditional | — | Bot or personal token. Required for |
| No | 30 | Request timeout in seconds |
| No | 3 | Max retry attempts |
| No | true | Verify SSL certificates |
| No | INFO | Logging level |
| No | json | Log output format: |
| No | v4 | Mattermost API version |
For client_token and oauth_proxy modes — including Mattermost OAuth App
registration, all MATTERMOST_OAUTH_* settings, and MCP client connection — see
Authentication.
Docker
Stdio mode (default)
docker run -i --rm \
-e MATTERMOST_URL=https://your-mattermost.com \
-e MATTERMOST_TOKEN=your-token \
legard/mcp-server-mattermost{
"mcpServers": {
"mattermost": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MATTERMOST_URL=https://your-mattermost.com",
"-e", "MATTERMOST_TOKEN=your-token",
"legard/mcp-server-mattermost"
]
}
}
}HTTP mode (production)
docker run -d -p 8000:8000 \
-e MCP_TRANSPORT=http \
-e MCP_HOST=0.0.0.0 \
-e MATTERMOST_URL=https://your-mattermost.com \
-e MATTERMOST_TOKEN=your-token \
legard/mcp-server-mattermostHealth check: curl http://localhost:8000/health
HTTP mode with Mattermost OAuth proxy
Register a Mattermost OAuth 2.0 Application first:
Mattermost field | Production value |
Is Trusted | Yes |
Is Public Client | No |
Callback URLs |
|
Then run the MCP server:
docker run -d -p 8000:8000 \
-e MCP_TRANSPORT=http \
-e MCP_HOST=0.0.0.0 \
-e MATTERMOST_AUTH_MODE=oauth_proxy \
-e MATTERMOST_URL=https://mattermost.internal \
-e MATTERMOST_OAUTH_MATTERMOST_PUBLIC_URL=https://mattermost.example.com \
-e MATTERMOST_OAUTH_MCP_PUBLIC_URL=https://mcp.example.com \
-e MATTERMOST_OAUTH_CLIENT_ID=your-mattermost-oauth-app-id \
-e MATTERMOST_OAUTH_CLIENT_TYPE=confidential \
-e MATTERMOST_OAUTH_CLIENT_SECRET=your-mattermost-oauth-app-secret \
legard/mcp-server-mattermostIf your Mattermost login uses Keycloak SSO, users authenticate through Keycloak inside the Mattermost OAuth login flow. The MCP server does not need a Keycloak client.
Connect Claude Code with Dynamic Client Registration:
claude mcp add --transport http mattermost https://mcp.example.com/mcpDo not pass --client-id for this server; the MCP client registers with the MCP server,
and the MCP server uses the fixed Mattermost OAuth App upstream.
Environment Variables (Docker)
Variable | Default | Description |
|
| Transport: |
|
| HTTP bind host (use |
|
| HTTP port |
Documentation
📖 mcp-server-mattermost.readthedocs.io
Quick Start — Installation and setup
Configuration — Environment variables
Tools Reference — Detailed API documentation
llms.txt — AI-readable documentation index
Development
# Clone and install
git clone https://github.com/cloud-ru-tech/mcp-server-mattermost
cd mcp-server-mattermost
uv sync --dev
# Run unit tests
uv run pytest
# Run integration tests (requires Docker or external Mattermost)
uv run pytest tests/integration -v
# Type checking
uv run mypy src/
# Linting
uv run ruff check src/ tests/
# Run locally
MATTERMOST_URL=https://... MATTERMOST_TOKEN=... uv run mcp-server-mattermostIntegration Tests
Integration tests run against a real Mattermost server via Docker (Testcontainers) or external server.
# With Docker (Testcontainers) — automatic setup
uv run pytest tests/integration -v
# Against external Mattermost server
export MATTERMOST_URL=https://your-server.com
export MATTERMOST_TOKEN=your-bot-token
uv run pytest tests/integration -v
# Run specific test module
uv run pytest tests/integration/test_channels.py -vIntegration tests are excluded from the default pytest run. Unit tests run with:
uv run pytest # Unit tests onlyDebugging
Use the MCP Inspector to debug:
npx @modelcontextprotocol/inspector uvx mcp-server-mattermostContributing
Contributions welcome! See CONTRIBUTING.md for guidelines.
License
MIT — see LICENSE for details.
Built with FastMCP · Mattermost API v4
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cloud-ru-tech/mcp-server-mattermost'
If you have feedback or need assistance with the MCP directory API, please join our Discord server