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
- Connects to Mattermost API endpoints
- Supports multiple transport modes:
- SSE (Server-Sent Events)
- Standard I/O
- Real-time message processing
- Team and channel-specific monitoring
- Secure token-based authentication
Requirements
- Node.js >= 22
- npm >= 10
- dotenvx
- dotenvx
Setup
- Clone this repository:
git clone https://github.com/kakehashi-inc/mattermost-mcp-server.git
cd mattermost-mcp-server
- Install dependencies:
npm install
- Set up your environment variables:
# Create .env file
cp .env.example .env
# Encrypt your .env file (optional but recommended for production)
dotenvx encrypt
Required environment variables:
npm run build
Usage
The server can be run in two transport modes:
SSE Transport Mode
npm start
Standard I/O Transport Mode
npm start -- --stdio
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