MCP Server Mattermost logo

MCP Server Mattermost

Organization
cloud-ru-tech

MCP server for Mattermost — let Claude, Cursor, and other AI assistants work with channels, messages, and files

Publishercloud-ru-tech
Repositorymcp-server-mattermost
LanguagePython
Forks
11
Stars
48
Available tools
0
Transport typestdio, streamable-http
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    MCP Server Mattermost exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    48 stars and 11 forks from the linked repository.

mcp-server-mattermost

Let AI assistants read, search, and post in your Mattermost workspace

39 tools · Channels · Messages · Reactions · Threads · Files · Users

MCP Server PyPI version Docker Pulls Tests Python 3.10+ License: MIT Docs

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

ToolDescriptionKey Parameters
list_public_channelsList public channels in a teamteam_id ✓
list_my_channelsList your channels with unread countsteam_id ✓, only_unread
get_channelGet channel details by IDchannel_id ✓
get_channel_by_nameGet channel by nameteam_id, channel_name ✓
create_channelCreate a new channelteam_id, name, display_name ✓
join_channelJoin a public channelchannel_id ✓
leave_channelLeave a channelchannel_id ✓
mark_channel_viewedMark a channel as viewed (reset unread counters)channel_id ✓
get_channel_membersList channel memberschannel_id ✓
add_user_to_channelAdd user to channelchannel_id, user_id ✓
create_direct_channelCreate DM channeluser_id_1, user_id_2 ✓
ToolDescriptionKey Parameters
post_messageSend a message to a channelchannel_id, message ✓, attachments
get_channel_messagesGet messages: recent, unread window, or since timestampchannel_id ✓, unread_only, since
search_messagesSearch messages by termteam_id, terms ✓
update_messageEdit a messagepost_id, message ✓, attachments
delete_messageDelete a messagepost_id ✓
ToolDescriptionKey Parameters
add_reactionAdd emoji reactionpost_id, emoji_name ✓
remove_reactionRemove emoji reactionpost_id, emoji_name ✓
get_reactionsGet all reactions on a postpost_id ✓
pin_messagePin a messagepost_id ✓
unpin_messageUnpin a messagepost_id ✓
get_threadGet thread messagespost_id ✓
ToolDescriptionKey Parameters
get_meGet current user info—
get_userGet user by IDuser_id ✓
get_user_by_usernameGet user by usernameusername ✓
search_usersSearch usersterm ✓
get_user_statusGet online statususer_id ✓
ToolDescriptionKey Parameters
list_teamsList your teams—
get_teamGet team detailsteam_id ✓
get_team_membersList team membersteam_id ✓
ToolDescriptionKey Parameters
upload_fileUpload a filechannel_id, file_path ✓
get_file_infoGet file metadatafile_id ✓
get_file_linkGet download linkfile_id ✓
download_fileSave a file attachment locallyfile_id, destination_dir ✓

Note: Requires Entry, Professional, Enterprise, or Enterprise Advanced edition (not available in Team Edition). Minimum version: v10.1.

ToolDescriptionKey Parameters
list_bookmarksList channel bookmarkschannel_id ✓
create_bookmarkCreate link or file bookmarkchannel_id, display_name, bookmark_type ✓
update_bookmarkUpdate bookmark propertieschannel_id, bookmark_id ✓
delete_bookmarkDelete a bookmarkchannel_id, bookmark_id ✓
update_bookmark_sort_orderReorder bookmarkchannel_id, bookmark_id, new_sort_order ✓

Quick Start

  1. Get a Mattermost bot token
  2. Add to your MCP client config:
json
{
  "mcpServers": {
    "mattermost": {
      "command": "uvx",
      "args": ["mcp-server-mattermost"],
      "env": {
        "MATTERMOST_URL": "https://your-server.com",
        "MATTERMOST_TOKEN": "your-token"
      }
    }
  }
}
  1. Restart your client

Full setup guide — Claude Desktop, Cursor, Claude Code, Opencode, Docker, pip

Configuration

VariableRequiredDefaultDescription
MATTERMOST_URLYes—Mattermost server URL
MATTERMOST_AUTH_MODENostatic_tokenAuth mode: static_token, client_token, or oauth_proxy
MATTERMOST_TOKENConditional—Bot or personal token. Required for static_token.
MATTERMOST_TIMEOUTNo30Request timeout in seconds
MATTERMOST_MAX_RETRIESNo3Max retry attempts
MATTERMOST_VERIFY_SSLNotrueVerify SSL certificates
MATTERMOST_MAX_CONNECTIONSNo100Max HTTP connections in the shared pool
MATTERMOST_MAX_KEEPALIVE_CONNECTIONSNo20Max idle keepalive connections, clamped to max connections
MATTERMOST_KEEPALIVE_EXPIRYNo30.0Idle keepalive connection lifetime in seconds
MATTERMOST_EXTRA_CA_CERTSNo—Path to extra PEM CAs appended to the default trust store
MATTERMOST_LOG_LEVELNoINFOLogging level
MATTERMOST_LOG_FORMATNojsonLog output format: json or text
MATTERMOST_API_VERSIONNov4Mattermost 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)

bash
docker run -i --rm \
  -e MATTERMOST_URL=https://your-mattermost.com \
  -e MATTERMOST_TOKEN=your-token \
  legard/mcp-server-mattermost
json
{
  "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)

For networked HTTP use per-client auth. static_token over HTTP serves an unauthenticated endpoint acting with the shared token (the server starts but logs a loud warning) — see Authentication → HTTP transport.

bash
docker run -d -p 8000:8000 \
  -e MCP_TRANSPORT=http \
  -e MCP_HOST=0.0.0.0 \
  -e MATTERMOST_AUTH_MODE=client_token \
  -e MATTERMOST_URL=https://your-mattermost.com \
  -e MATTERMOST_HTTP_HOST_ORIGIN_PROTECTION=auto \
  -e MATTERMOST_HTTP_ALLOWED_HOSTS=mcp.example.com \
  legard/mcp-server-mattermost

client_token means each MCP client authenticates with its own Mattermost token, sent as Authorization: Bearer <token> — a client configured without one gets 401. The two MATTERMOST_HTTP_* variables turn on Host/Origin (DNS-rebinding) protection, which is off by default; see HTTP transport security.

Health check: curl http://localhost:8000/health

HTTP mode with Mattermost OAuth proxy

Register a Mattermost OAuth 2.0 Application first:

Mattermost fieldProduction value
Is TrustedYes
Is Public ClientNo
Callback URLshttps://mcp.example.com/oauth/callback/mm

Then run the MCP server:

bash
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-mattermost

If 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:

bash
claude mcp add --transport http mattermost https://mcp.example.com/mcp

Do 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)

VariableDefaultDescription
MCP_TRANSPORTstdioTransport: stdio or http
MCP_HOST127.0.0.1HTTP bind host (use 0.0.0.0 in Docker)
MCP_PORT8000HTTP port

Documentation

📖 mcp-server-mattermost.readthedocs.io

Development

bash
# 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-mattermost

Integration Tests

Integration tests run against a real Mattermost server via Docker (Testcontainers) or external server.

bash
# 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 -v

Integration tests are excluded from the default pytest run. Unit tests run with:

bash
uv run pytest  # Unit tests only

Debugging

Use the MCP Inspector to debug:

bash
npx @modelcontextprotocol/inspector uvx mcp-server-mattermost

Contributing

Contributions welcome! See CONTRIBUTING.md for guidelines.

License

MIT — see LICENSE for details.


Built with FastMCP · Mattermost API v4

Installation

TypingMind
{
  "mcpServers": {
    "mcp-server-mattermost": {
      "command": "uvx",
      "args": [
        "mcp-server-mattermost"
      ]
    }
  }
}

Use MCP Server Mattermost MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once MCP Server Mattermost is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add MCP Server Mattermost as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the MCP Server Mattermost MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "mcp-server-mattermost": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the MCP Server Mattermost MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the MCP Server Mattermost MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use MCP Server Mattermost to help me with this task?
MCP Server Mattermost
Sure. I read it.
Here is what I found using MCP Server Mattermost.

Option 2: Add an MCP server URL

Use this when MCP Server Mattermost is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter the MCP server URL from the provider in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste the MCP server URL from the provider into the Server URL field.
  2. Enter a connection name for MCP Server Mattermost.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the MCP Server Mattermost connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the MCP Server Mattermost tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the MCP Server Mattermost tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use MCP Server Mattermost to help me with this task?
MCP Server Mattermost
Sure. I read it.
Here is what I found using MCP Server Mattermost.

Frequently asked questions

What is the MCP Server Mattermost MCP server used for?

MCP Server Mattermost is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use MCP Server Mattermost MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use MCP Server Mattermost with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use MCP Server Mattermost MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With MCP Server Mattermost connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect MCP Server Mattermost MCP to TypingMind?

MCP Server Mattermost can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does MCP Server Mattermost MCP provide in TypingMind?

MCP Server Mattermost exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use MCP Server Mattermost MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If MCP Server Mattermost requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇