loading…
Search for a command to run...
loading…
Enables interaction with Mattermost workspaces to manage channels, messages, threads, reactions, and user profiles via the REST API. This server allows AI model
Enables interaction with Mattermost workspaces to manage channels, messages, threads, reactions, and user profiles via the REST API. This server allows AI models to perform both read and write operations, such as posting messages and retrieving channel history, within a trusted environment.
A Model Context Protocol (MCP) server for interacting with Mattermost workspaces. This server provides tools for managing channels, messages, threads, reactions, and user profiles through Mattermost's REST API.
Built on Cloudflare Workers using the Agents SDK.
Important: This is an MCP server without OAuth authentication, designed for trusted environments where the server runs with pre-configured API credentials.
Read Operations (6 tools):
list_mattermost_channels - List all channels in the teamget_mattermost_channel_history - Get message history from a channelget_mattermost_thread_replies - Get all replies in a threadget_mattermost_users - List users in the workspaceget_mattermost_user_profile - Get detailed profile for a specific userWrite Operations (3 tools):
post_mattermost_message - Post a new message to a channelreply_to_mattermost_thread - Reply to an existing threadadd_mattermost_reaction - Add emoji reactions to postscreate_mattermost_direct_channel - Create a direct message channel with a usermattermost_guide - Comprehensive guide for using Mattermost effectivelymessage_template - Helpful templates for crafting effective Mattermost messagesmattermost://channels - List of all channels in the teammattermost://users - List of all users in the workspaceThis MCP server is built using:
git clone https://github.com/vnikhilbuddhavarapu/mattermost-mcp.git
cd mattermost-mcp
npm install
cp .dev.vars.example .dev.vars
Edit .dev.vars with your Mattermost credentials:
MATTERMOST_URL=https://mattermost.your-domain.com
MATTERMOST_TOKEN=your-personal-access-token
MATTERMOST_TEAM_ID=your-team-id
Finding your Team ID:
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://mattermost.your-domain.com/api/v4/teams | jq '.[].id'
npm run dev
npm run deploy
npx wrangler secret put MATTERMOST_URL
npx wrangler secret put MATTERMOST_TOKEN
npx wrangler secret put MATTERMOST_TEAM_ID
| Variable | Required | Description |
|---|---|---|
MATTERMOST_URL |
Yes | Your Mattermost instance URL (e.g., https://mattermost.example.com) |
MATTERMOST_TOKEN |
Yes | Personal Access Token from Mattermost |
MATTERMOST_TEAM_ID |
Yes | Team ID (get via API, not team name) |
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"mattermost": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mattermost-mcp.your-account.workers.dev/mcp"],
"env": {
"MATTERMOST_URL": "https://mattermost.your-domain.com",
"MATTERMOST_TOKEN": "your-token-here",
"MATTERMOST_TEAM_ID": "your-team-id"
}
}
}
}
Connect to the MCP endpoint:
https://mattermost-mcp.your-account.workers.dev/mcp
src/
├── index.ts # Main MCP server setup and Durable Object
├── mattermost-client.ts # REST API client for Mattermost
├── shared/
│ └── utils.ts # Logging utilities and request ID generation
├── tools/ # MCP tool implementations
│ ├── list-channels.ts
│ ├── get-channel-history.ts
│ ├── post-message.ts
│ ├── reply-to-thread.ts
│ ├── get-thread-replies.ts
│ ├── add-reaction.ts
│ ├── get-users.ts
│ ├── get-user-profile.ts
│ ├── create-direct-channel.ts
│ └── index.ts # Tool exports
├── prompts/ # MCP prompt templates
│ ├── mattermost-guide.ts
│ ├── message-template.ts
│ └── index.ts # Prompt exports
└── resources/ # MCP resources
├── channels-list.ts
├── users-list.ts
└── index.ts # Resource exports
wrangler.jsonc # Cloudflare Workers configuration
worker-configuration.d.ts # TypeScript types for bindings
This server uses the Mattermost REST API v4. Key endpoints used:
Get Channels:
GET /api/v4/teams/{team_id}/channels
Get Posts:
GET /api/v4/channels/{channel_id}/posts
Create Post:
POST /api/v4/posts
{
"channel_id": "...",
"message": "...",
"root_id": "..." // optional, for threads
}
Add Reaction:
POST /api/v4/reactions
{
"post_id": "...",
"emoji_name": "..."
}
MIT
You can connect to your MCP server from the Cloudflare AI Playground, which is a remote MCP client:
mattermost-mcp.<your-account>.workers.dev/mcp)You can also connect to your remote MCP server from local MCP clients, by using the mcp-remote proxy.
To connect to your MCP server from Claude Desktop, follow Anthropic's Quickstart and within Claude Desktop go to Settings > Developer > Edit Config.
Update with this configuration:
{
"mcpServers": {
"mattermost": {
"command": "npx",
"args": [
"mcp-remote",
"https://mattermost-mcp.your-account.workers.dev/mcp"
]
}
}
}
Restart Claude and you should see the tools become available.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"mattermost-mcp-server": {
"command": "npx",
"args": []
}
}
}