Skip to main content
Glama
kakehashi-inc

Mattermost MCP Server

mcp-server-mattermost

This project implements a Model Context Protocol (MCP) server for Mattermost integration. It connects to Mattermost API endpoints to retrieve and process various information, making it available through standard MCP transports.

Features

  • Secure, token-based connection to Mattermost API endpoints

  • Supports multiple transport modes:

    • stdio

    • http-stream

    • sse

  • Search for messages across multiple Mattermost channels

  • Customizable default channels and message fetch limits

Related MCP server: Mattermost MCP Server

Requirements

  • Node.js >= 22

  • npm >= 10

Setup

  1. Clone this repository:

git clone https://github.com/kakehashi-inc/mcp-server-mattermost.git
cd mcp-server-mattermost
  1. Install dependencies:

npm install
  1. Set up your environment variables:

Required Environment Variables

  • MATTERMOST_ENDPOINT: Your Mattermost server URL

  • MATTERMOST_TOKEN: Your Mattermost authentication token

  • MATTERMOST_TEAM: The name of the team to monitor

  • MATTERMOST_CHANNELS: Comma-separated list of channel names to monitor

Environment Variable Setup Options

Option 1: Direct Environment Variables

export MATTERMOST_ENDPOINT="https://your-mattermost-server.com"
export MATTERMOST_TOKEN="your-token-here"
export MATTERMOST_TEAM="your-team-name"
export MATTERMOST_CHANNELS="general,random,dev"

Option 2: Using .env file (with dotenvx)

# Install dotenvx (optional)
npm install -g @dotenvx/dotenvx

# Create .env file
cp .env.example .env
# Edit .env file with your values

# Encrypt your .env file (recommended for production)
dotenvx encrypt
  1. Build the server:

npm run build

Usage

The server supports three transport modes: stdio (default), sse, and http-stream.

Standard I/O Transport Mode

# Using npm scripts (with dotenvx)
npm run start:stdio

# Direct execution
node dist/main.js --transport stdio

# Using npx
npx mcp-server-mattermost --transport stdio

SSE Transport Mode

# Using npm scripts (with dotenvx)
npm run start:sse

# Direct execution
node dist/main.js --transport sse

HTTP Transport Mode

# Using npm scripts (with dotenvx)
npm run start:http

# Direct execution
node dist/main.js --transport http-stream

Claude Desktop Integration

To use this MCP server with Claude Desktop, add the following configuration to your Claude Desktop settings:

Sample Configuration

{
  "mcpServers": {
    "mattermost": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-mattermost@latest",
        "--transport", "stdio",
        "--endpoint", "https://your-mattermost-server/api/v4",
        "--token", "your_personal_access_token",
        "--team", "your_team_name",
        "--channels", "town-square,general,your_channel_name"
      ]
    }
  }
}

Development

  • npm run dev: Start the server in development mode with hot reload

  • npm run lint: Run ESLint

  • npm run format: Format code using Prettier

  • npm test: Run tests

  • npm run inspect: Run MCP inspector

References

License

MIT

Available Tools

1 tool

TDQS

B3.1/5.0
Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The tool's purpose is clearly defined as fetching messages with optional search, leaving no room for confusion or misselection.

Naming Consistency5/5

A single tool inherently has perfect naming consistency, as there are no other tools to compare against. The name 'mattermost_search' follows a clear and descriptive pattern, but consistency cannot be assessed across a set of one.

Tool Count2/5

A single tool is too few for a server named 'Mattermost MCP Server', which implies broader functionality for interacting with Mattermost (e.g., posting messages, managing channels, users). This minimal toolset feels thin and incomplete for the apparent scope.

Completeness2/5

The tool surface is severely incomplete for a Mattermost integration. While 'mattermost_search' covers fetching messages, there are obvious gaps such as creating messages, managing channels, handling users, or other core Mattermost operations, which will likely cause agent failures in typical workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

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/kakehashi-inc/mcp-server-mattermost'

If you have feedback or need assistance with the MCP directory API, please join our Discord server