
Mattermost
STDIOMCP server for Mattermost integration to retrieve and process data through API endpoints
MCP server for Mattermost integration to retrieve and process data through API endpoints
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.
stdio
http-stream
sse
git clone https://github.com/kakehashi-inc/mcp-server-mattermost.git cd mcp-server-mattermost
npm install
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 monitorexport 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"
# 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
npm run build
The server supports three transport modes: stdio (default), sse, and http-stream.
# 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
# Using npm scripts (with dotenvx) npm run start:sse # Direct execution node dist/main.js --transport sse
# Using npm scripts (with dotenvx) npm run start:http # Direct execution node dist/main.js --transport http-stream
To use this MCP server with Claude Desktop, add the following configuration to your Claude Desktop settings:
{ "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" ] } } }
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 inspectorMIT