Mattermost MCP Server
This Mattermost Model Context Protocol (MCP) server connects to Mattermost API endpoints to retrieve and process data, making it available via multiple transport modes. You can:
Fetch messages from specified or default Mattermost channels
Search messages within channels using customizable queries
Set maximum limits on the number of messages fetched per channel
Use multiple transport modes including stdio, SSE, and HTTP-stream
Establish secure connections via token-based authentication
Connects to Mattermost API endpoints to retrieve and process team and channel information, enabling real-time message monitoring and interaction with specific channels within Mattermost teams.
Click on "Deploy 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., "@Mattermost MCP Server show me the latest messages from the dev channel"
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
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:
stdiohttp-streamsse
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
Clone this repository:
git clone https://github.com/kakehashi-inc/mcp-server-mattermost.git
cd mcp-server-mattermostInstall dependencies:
npm installSet up your environment variables:
Required Environment Variables
MATTERMOST_ENDPOINT: Your Mattermost server URLMATTERMOST_TOKEN: Your Mattermost authentication tokenMATTERMOST_TEAM: The name of the team to monitorMATTERMOST_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 encryptBuild the server:
npm run buildUsage
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 stdioSSE Transport Mode
# Using npm scripts (with dotenvx)
npm run start:sse
# Direct execution
node dist/main.js --transport sseHTTP Transport Mode
# Using npm scripts (with dotenvx)
npm run start:http
# Direct execution
node dist/main.js --transport http-streamClaude 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 reloadnpm run lint: Run ESLintnpm run format: Format code using Prettiernpm test: Run testsnpm run inspect: Run MCP inspector
References
License
MIT
Available Tools
1 toolmattermost_searchC
Fetch messages from Mattermost channels with optional search functionality
Inputs: channels, limit, query.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
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.
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.
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.
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
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Enable secure connectivity between Sentry issues and debugging data, and LLM clients, using a Model Context Protocol (MCP) server.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA server that implements the Model Context Protocol, providing a standardized way to connect AI models to different data sources and tools.12MIT
- -licenseNot gradedqualityNot gradedmaintenanceA Model Context Protocol server that enables Claude to interact with Mattermost instances, supporting post management, channel operations, user management, and reaction management.10 npm1-
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables real-time communication using Server-Sent Events (SSE), providing standardized model management and resource templating capabilities.-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that supports STDIO, SSE and Streamable HTTP protocols for AI model interactions.1MIT