Skip to main content
Glama

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

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

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

A Model Context Protocol server that connects to Mattermost, allowing AI models to monitor and process messages from specific teams and channels in real-time via SSE or Standard I/O transport modes.

  1. Features
    1. Requirements
      1. Setup
        1. Usage
          1. SSE Transport Mode
          2. Standard I/O Transport Mode
        2. Development
          1. References
            1. License

              Related MCP Servers

              • A
                security
                F
                license
                A
                quality
                A Model Context Protocol server that enables AI models to interact with SourceSync.ai's knowledge management platform for managing documents, ingesting content from various sources, and performing semantic searches.
                Last updated -
                25
                605
                • Apple
                • Linux
              • -
                security
                A
                license
                -
                quality
                A server that implements the Model Context Protocol, providing a standardized way to connect AI models to different data sources and tools.
                Last updated -
                2
                8
                TypeScript
                MIT License
              • -
                security
                F
                license
                -
                quality
                A basic Model Context Protocol server implementation that demonstrates core functionality including tools and resources for AI chat applications.
                Last updated -
                Python
              • -
                security
                F
                license
                -
                quality
                A Model Context Protocol server that provides AI models with structured access to external data and services, acting as a bridge between AI assistants and applications, databases, and APIs in a standardized, secure way.
                Last updated -
                2
                Python

              View all related MCP servers

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

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