MCPSERV.CLUB
jagan-shanmugam

Mattermost MCP Host

MCP Server

AI‑powered tool integration for Mattermost via MCP servers

Stale(50)
27stars
0views
Updated 27 days ago

About

A Mattermost bot that connects to multiple Model Context Protocol (MCP) servers, dynamically loads their tools, and uses a LangGraph AI agent to understand user requests, orchestrate tool calls, and maintain thread‑aware conversations within channels.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

Mattermost MCP Host Demo

The Mattermost MCP Host is a bridge that brings Model Context Protocol (MCP) servers into the collaborative environment of Mattermost. By embedding a LangGraph-based AI agent directly inside a Mattermost channel, it allows teams to query, manipulate, and extend external tools—whether they are code execution engines, data‑retrieval APIs, or custom business logic—without leaving the chat interface. The solution solves a common pain point for developers: integrating powerful, context‑aware AI assistants into existing workflow tools while preserving the conversational history and thread structure that teams rely on for clarity.

At its core, the host establishes two parallel connections. First, it hooks into Mattermost’s WebSocket and REST APIs to listen for messages in a designated channel or thread. Second, it connects to one or more MCP servers (configured via ) over a simple I/O channel, automatically discovering the tools each server exposes. These tools are then wrapped as LangChain structured tools and injected into a LangGraph agent that understands natural language intent, orchestrates tool calls, and stitches together responses. This dual‑connection architecture ensures that user messages are either routed to the intelligent agent or treated as direct MCP commands (prefixed with ), giving developers fine‑grained control over tool usage.

Key capabilities include:

  • Dynamic Tool Loading – as MCP servers are added or updated, the host refreshes its tool list without redeploying.
  • Thread‑Aware Context – the agent consumes full message history from the current Mattermost thread, enabling coherent multi‑turn interactions.
  • Intelligent Tool Chaining – the LangGraph workflow can invoke multiple tools in sequence, allowing complex tasks such as searching GitHub issues and creating new ones to be handled automatically.
  • Command‑Line Interface – users can list available servers, tools, or prompt templates directly from chat using a simple prefix.

Real‑world scenarios abound: a support team can ask the bot to search existing tickets and auto‑create new ones; a development squad can trigger CI pipelines or fetch code snippets on demand; and data scientists can pull insights from proprietary APIs while keeping the conversation within a single channel. By unifying AI assistance with Mattermost’s collaboration features, the MCP Host turns every chat thread into an intelligent workspace where code, data, and context coexist seamlessly.