Logo von Mattermost MCP

Mattermost MCP

Community
pvev

Mattermost MCP server to enable Claude to interact with Mattermost Workspaces

Herausgeberpvev
Repositorymattermost-mcp
SpracheTypeScript
Forks
31
Sterne
44
Verfügbare Tools
0
Transporttypstdio
Links
  • Tools mit KI-Workflows verbinden

    Mattermost MCP stellt MCP-Funktionen bereit, die kompatible KI-Clients und Agenten nutzen können.

  • 0 verfügbare Tools

    Sehen Sie sich unten die aufrufbaren Aktionen an, einschließlich Namen und Beschreibungen, sofern der Server diese bereitstellt.

  • Konfiguration zum Kopieren

    Nutzen Sie die Installationsbeispiele, um diesen Server in Ihrem bevorzugten MCP-Client zu konfigurieren.

  • Open-Source-Kennzahlen

    44 Sterne und 31 Forks im verlinkten Repository.

Title changed by Matty

MCP Server for the Mattermost API, enabling Claude and other MCP clients to interact with Mattermost workspaces.

Features

This MCP server provides tools for interacting with Mattermost, including:

Topic Monitoring

The server includes a topic monitoring system that can:

  • Monitor specified channels for messages containing topics of interest
  • Run on a configurable schedule (using cron syntax)
  • Send notifications when relevant topics are discussed
  • Mention you in a specified channel when topics are found

Channel Tools

  • mattermost_list_channels: List public channels in the workspace
  • mattermost_get_channel_history: Get recent messages from a channel

Message Tools

  • mattermost_post_message: Post a new message to a channel
  • mattermost_reply_to_thread: Reply to a specific message thread
  • mattermost_add_reaction: Add an emoji reaction to a message
  • mattermost_get_thread_replies: Get all replies in a thread

Monitoring Tools

  • mattermost_run_monitoring: Trigger the topic monitoring process immediately

User Tools

  • mattermost_get_users: Get a list of users in the workspace
  • mattermost_get_user_profile: Get detailed profile information for a user

Setup

  1. Clone this repository:
git clone https://github.com/yourusername/mattermost-mcp.git
cd mattermost-mcp
  1. Install dependencies:
npm install
  1. Configure the server:

    The repository includes a config.json file with placeholder values. For your actual configuration, create a config.local.json file (which is gitignored) with your real credentials:

{
  "mattermostUrl": "https://your-mattermost-instance.com/api/v4",
  "token": "your-personal-access-token",
  "teamId": "your-team-id",
  "monitoring": {
    "enabled": false,
    "schedule": "*/15 * * * *",
    "channels": ["town-square", "off-topic"],
    "topics": ["tv series", "champions league"],
    "messageLimit": 50
  }
}
This approach keeps your real credentials out of the repository while maintaining the template for others.

4. Build the server:

npm run build
  1. Run the server:
npm start

Topic Monitoring Configuration

The monitoring system can be configured with the following options:

  • enabled (boolean): Whether monitoring is enabled
  • schedule (string): Cron expression for when to check for new messages (e.g., "*/15 * * * *" for every 15 minutes)
  • channels (string[]): Array of channel names to monitor
  • topics (string[]): Array of topics to look for in messages
  • messageLimit (number): Number of recent messages to analyze per check
  • notificationChannelId (string, optional): Channel ID where notifications will be sent. If not provided, the system will automatically use a direct message channel.
  • userId (string, optional): Your user ID for mentions in notifications. If not provided, the system will automatically detect the current user.

To enable monitoring, set enabled to true in your config.local.json file.

Running Monitoring Manually

You can trigger the monitoring process manually in several ways:

  1. Using the provided scripts:
  • ./run-monitoring-http.sh - Triggers monitoring via HTTP without restarting the server (recommended)
  • ./run-monitoring.sh - Starts a new server instance with monitoring enabled
  • ./trigger-monitoring.sh - Runs the monitoring process and exits (useful for cron jobs)
  • ./view-channel-messages.js <channel-name> [count] - View the last messages in a channel
  • ./analyze-channel.js <channel-name> [count] - Analyze message statistics in a channel
  • ./get-last-message.js <channel-name> - Get the last message from a channel
  1. Using the command-line interface (CLI):
  • While the server is running, simply type one of these commands in the terminal:
    • run - Run the monitoring process
    • monitor - Same as run
    • check - Same as run
  • Other available commands:
    • help - Show available commands
    • exit - Shutdown the server
  1. Using the MCP tool:
  • Use the mattermost_run_monitoring tool through the MCP interface
  • This will immediately check all configured channels for your topics of interest
  1. Using the command-line flags:
  • Start the server with the --run-monitoring flag:
npm start -- --run-monitoring
  • This will run the monitoring process immediately after the server starts
  • Add --exit-after-monitoring to exit after the monitoring process completes:
npm start -- --run-monitoring --exit-after-monitoring
  • This is useful for running the monitoring process from cron jobs

Tool Details

Channel Tools

mattermost_list_channels

  • List public channels in the workspace
  • Optional inputs:
    • limit (number, default: 100, max: 200): Maximum number of channels to return
    • page (number, default: 0): Page number for pagination
  • Returns: List of channels with their IDs and information

mattermost_get_channel_history

  • Get recent messages from a channel
  • Required inputs:
    • channel_id (string): The ID of the channel
  • Optional inputs:
    • limit (number, default: 30): Number of messages to retrieve
    • page (number, default: 0): Page number for pagination
  • Returns: List of messages with their content and metadata

Message Tools

mattermost_post_message

  • Post a new message to a Mattermost channel
  • Required inputs:
    • channel_id (string): The ID of the channel to post to
    • message (string): The message text to post
  • Returns: Message posting confirmation and ID

mattermost_reply_to_thread

  • Reply to a specific message thread
  • Required inputs:
    • channel_id (string): The channel containing the thread
    • post_id (string): ID of the parent message
    • message (string): The reply text
  • Returns: Reply confirmation and ID

mattermost_add_reaction

  • Add an emoji reaction to a message
  • Required inputs:
    • channel_id (string): The channel containing the message
    • post_id (string): Message ID to react to
    • emoji_name (string): Emoji name without colons
  • Returns: Reaction confirmation

mattermost_get_thread_replies

  • Get all replies in a message thread
  • Required inputs:
    • channel_id (string): The channel containing the thread
    • post_id (string): ID of the parent message
  • Returns: List of replies with their content and metadata

User Tools

mattermost_get_users

  • Get list of workspace users with basic profile information
  • Optional inputs:
    • limit (number, default: 100, max: 200): Maximum users to return
    • page (number, default: 0): Page number for pagination
  • Returns: List of users with their basic profiles

mattermost_get_user_profile

  • Get detailed profile information for a specific user
  • Required inputs:
    • user_id (string): The user's ID
  • Returns: Detailed user profile information

Usage with Claude Desktop

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "mattermost": {
      "command": "node",
      "args": [
        "/path/to/mattermost-mcp/build/index.js"
      ]
    }
  }
}

Troubleshooting

If you encounter permission errors, verify that:

  1. Your personal access token has the necessary permissions
  2. The token is correctly copied to your configuration
  3. The Mattermost URL and team ID are correct

HTTP Endpoints

The server exposes HTTP endpoints for remote control:

  • Run Monitoring: http://localhost:3456/run-monitoring

    • Triggers the monitoring process immediately
    • Returns JSON response with success/error information
  • Check Status: http://localhost:3456/status

    • Returns information about the server and monitoring status
    • Useful for health checks

You can use these endpoints with curl or any HTTP client:

# Trigger monitoring
curl http://localhost:3456/run-monitoring

# Check status
curl http://localhost:3456/status

Utility Scripts

run-monitoring-http.sh

This script triggers the monitoring process via the HTTP endpoint:

./run-monitoring-http.sh

This is the recommended way to trigger monitoring manually as it:

  • Doesn't restart the server
  • Doesn't interfere with the scheduled monitoring
  • Works reliably from any terminal

view-channel-messages.js

This script allows you to view the most recent messages in any channel:

# View messages in a channel (channel name is required)
node view-channel-messages.js <channel-name>

# View a specific number of messages
node view-channel-messages.js <channel-name> <message-count>

# Example: View the last 10 messages in a channel
node view-channel-messages.js general 10

The script will display:

  • Channel information (name, purpose, total message count)
  • The most recent messages with timestamps and usernames
  • If the channel doesn't exist, it will list all available channels

analyze-channel.js

This script provides detailed statistics about messages in a channel:

# Analyze messages in a channel (channel name is required)
node analyze-channel.js <channel-name>

# Analyze a specific number of messages
node analyze-channel.js <channel-name> <message-count>

# Example: Analyze the last 50 messages in a channel
node analyze-channel.js general 50

The script will display:

  • Channel information and metadata
  • Total message count (including system messages)
  • Breakdown of user messages vs. system messages
  • Message count by user
  • The most recent messages in the channel

get-last-message.js

This script retrieves only the most recent message from a channel:

# Get the last message from a channel (channel name is required)
node get-last-message.js <channel-name>

# Example: Get the last message from the general channel
node get-last-message.js general

The script will display:

  • The sender's user ID and username
  • The timestamp of the message

License

This MCP server is licensed under the MIT License.

Mattermost MCP MCP mit mehreren KI-Modellen nutzen

TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. Sobald Mattermost MCP verbunden ist, können Sie die Integration mit verschiedenen KI-Modellen in TypingMind verwenden, statt sie für jedes Modell separat einzurichten. Diese MCP-Integration läuft lokal über den TypingMind-MCP-Konnektor auf Ihrem Gerät.

Einrichtungsanleitung für den lokalen Konnektor

Nutzen Sie diese Option, wenn der MCP-Server Zugriff auf lokale Dateien, Apps oder private Ressourcen auf Ihrem Computer benötigt.

1

MCP-Einstellungen öffnen

Gehen Sie in TypingMind zu „Einstellungen“, „Erweiterte Einstellungen“ und dann „Model Context Protocol“ und wählen Sie „Konnektor-Setup“.

  1. Öffnen Sie TypingMind in Ihrem Browser.
  2. Klicken Sie auf das Symbol „Optionen“.
  3. Gehen Sie zu „Erweiterte Einstellungen“.
  4. Öffnen Sie den Abschnitt „Model Context Protocol“.
  5. Klicken Sie auf „Konnektor-Setup“ und wählen Sie „Dieses Gerät“.
Einrichtungsbildschirm des TypingMind-MCP-Konnektors mit ausgewählter Option „Dieses Gerät“
2

Konnektor-Befehl ausführen

Wählen Sie „Dieses Gerät“, kopieren Sie den Befehl aus TypingMind und führen Sie ihn im Terminal aus. Lassen Sie den Prozess laufen, solange Sie MCP verwenden.

  1. Kopieren Sie den in TypingMind angezeigten Einrichtungsbefehl.
  2. Öffnen Sie unter macOS Terminal bzw. unter Windows Windows Terminal.
  3. Fügen Sie den Befehl ein und führen Sie ihn aus.
  4. Bestätigen Sie die Paketinstallation, wenn Sie im Terminal zum Fortfahren aufgefordert werden.
  5. Lassen Sie das Terminalfenster geöffnet und den Prozess darin laufen, solange Sie MCP-Tools verwenden.
3

Mattermost MCP als Server hinzufügen

Wenn der Konnektorstatus „Bereit“ anzeigt, klicken Sie auf „Server ändern“ und fügen Sie die MCP-Server-Konfiguration ein.

  1. Warten Sie, bis der Konnektorstatus „Bereit“ anzeigt.
  2. Klicken Sie auf „Server ändern“.
  3. Fügen Sie die MCP-Server-Konfiguration für Mattermost MCP ein.
  4. Speichern Sie die Serverliste.
  5. Aktualisieren Sie die Ansicht, um bei Bedarf zu prüfen, ob der Konnektor weiterhin bereit ist.
MCP-Einstellungen in TypingMind mit aktivem Server und der Schaltfläche „Server ändern“
{
  "mcpServers": {
    "mattermost-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Verbindung modellübergreifend nutzen

Speichern Sie die Serverliste, öffnen Sie „Plugins“ und aktivieren Sie die MCP-Tools von Mattermost MCP. Wählen Sie dann ein beliebiges unterstütztes KI-Modell in TypingMind und verwenden Sie die Tools im Chat oder weisen Sie sie einem KI-Agenten zu.

  1. Öffnen Sie die Seite „Plugins“ in TypingMind.
  2. Aktivieren Sie die MCP-Tools von Mattermost MCP.
  3. Starten Sie einen Chat und wählen Sie das KI-Modell, das Sie verwenden möchten.
  4. Nutzen Sie die MCP-Tools im Chat oder weisen Sie sie einem KI-Agenten zu.
  5. Wechseln Sie bei Bedarf zu einem anderen KI-Modell, ohne die MCP-Verbindung erneut herzustellen.
TypingMind-Chat mit aktivierten MCP-Tools und einem ausgewählten KI-Modell
Können Sie mir mit Mattermost MCP bei dieser Aufgabe helfen?
Mattermost MCP
Gerne. Ich habe es gelesen.
Das habe ich mit Mattermost MCP gefunden.

Häufig gestellte Fragen

Wofür wird der MCP-Server Mattermost MCP verwendet?

Mattermost MCP ist ein MCP-Server, über den kompatible KI-Clients auf externe Tools und Kontext zugreifen können. In TypingMind können Sie diesen MCP-Server einmal hinzufügen und seine Tools in Ihrem KI-Arbeitsbereich verfügbar machen.

Kann ich Mattermost MCP MCP mit mehreren KI-Modellen in TypingMind verwenden?

Ja. TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. So können Sie Mattermost MCP mit verschiedenen KI-Modellen wie Claude, ChatGPT, Gemini oder anderen in TypingMind konfigurierten Modellen verwenden, ohne den MCP-Server für jedes Modell separat einzurichten.

Warum Mattermost MCP MCP mit TypingMind nutzen?

TypingMind ist eine der besten Oberflächen für LLM-Chats, da es mehrere KI-Modelle, Prompts, Plugins, KI-Agenten, API-Schlüssel und MCP-Tools in einem Arbeitsbereich vereint. Sobald Mattermost MCP verbunden ist, können Sie die zugehörigen MCP-Tools mit Ihren bevorzugten Modellen nutzen und Ihre Chat-Abläufe in TypingMind übersichtlich organisieren.

Wie verbinde ich Mattermost MCP MCP mit TypingMind?

Mattermost MCP wird über den lokalen MCP-Konnektor von TypingMind angebunden. Das ist die beste Wahl, wenn der MCP-Server auf lokale Dateien, Desktop-Apps, Befehlszeilentools oder private Ressourcen auf Ihrem Computer zugreifen muss.

Welche Tools stellt Mattermost MCP MCP in TypingMind bereit?

Mattermost MCP stellt MCP-Funktionen bereit, die Sie auf der Plugins-Seite in TypingMind aktivieren und im Chat verwenden oder KI-Agenten zuweisen können.

Muss ich meine API-Schlüssel mit TypingMind teilen, um Mattermost MCP MCP zu verwenden?

Nein. TypingMind arbeitet vorrangig lokal, sodass Sie die Kontrolle über Ihre Modellanbieter, API-Schlüssel, Prompts und MCP-Konfiguration behalten. Falls Mattermost MCP eine Authentifizierung erfordert, fügen Sie beim Erstellen der Verbindung die erforderlichen Header, OAuth-Einstellungen oder die lokale Konfiguration für diesen MCP-Server hinzu.

Ähnliche MCP-Server

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇