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 "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., "@Mattermost MCP Servershow 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
| Name | Required | Description | Default |
|---|---|---|---|
| channels | No | List of channel IDs to fetch messages from. If not provided, uses the default channels. | |
| limit | No | Maximum number of messages to fetch per channel. If not provided, uses the default limit. | |
| query | No | Search query to filter messages. If provided, performs a search instead of fetching recent messages. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden but only states the basic operation. It doesn't disclose behavioral traits like authentication needs, rate limits, error handling, or what 'default channels/limit' entail, which are critical for a fetch/search tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core purpose ('fetch messages') and adds key detail ('optional search functionality'). It's appropriately sized with zero wasted words, earning its place clearly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 3 parameters, no annotations, and no output schema, the description is incomplete. It lacks details on behavior, output format, error cases, or how parameters interact (e.g., search overriding fetch), leaving significant gaps for agent understanding.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so parameters are well-documented in the schema. The description adds minimal value by implying the tool can fetch recent messages or search, but doesn't elaborate on parameter interactions or semantics beyond what the schema provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('fetch messages') and resource ('from Mattermost channels'), with the added detail of 'optional search functionality'. It's specific about what the tool does, though without sibling tools to differentiate from, it can't achieve a perfect 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions 'optional search functionality' but provides no explicit guidance on when to use search vs. fetching recent messages, nor any prerequisites or alternatives. Without siblings, it lacks comparative context, leaving usage unclear beyond the basic function.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
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
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
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.1511MIT
- -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.101
- 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.281MIT
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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