Mattermost MCP Host logo

Mattermost MCP Host

by jagan-shanmugam

A Mattermost integration that connects to Model Context Protocol (MCP) servers. It leverages a LangGraph-based AI agent to provide an intelligent interface for interacting with users and executing tools directly within Mattermost.

View on GitHub

Last updated: N/A

What is Mattermost MCP Host?

The Mattermost MCP Host is an integration that connects a Mattermost instance to one or more Model Context Protocol (MCP) servers. It uses a LangGraph-based AI agent to intelligently interact with users, execute tools, and provide information within Mattermost channels and threads.

How to use Mattermost MCP Host?

  1. Configure MCP servers in mcp-servers.json. 2. Set up environment variables in .env for Mattermost and LLM access. 3. Run the integration. 4. Interact with the bot in Mattermost via direct chat or commands (prefixed with #) to access MCP server tools and information.

Key features of Mattermost MCP Host

  • Langgraph Agent Integration

  • MCP Server Integration

  • Dynamic Tool Loading

  • Thread-Aware Conversations

  • Intelligent Tool Use

  • MCP Capability Discovery

  • Direct Command Interface

Use cases of Mattermost MCP Host

  • Automated issue creation in GitHub from Mattermost chat

  • Searching the internet and posting results to a Mattermost channel

  • Providing a natural language interface to MCP server tools

  • Orchestrating complex tasks across multiple MCP servers

FAQ from Mattermost MCP Host

What are the prerequisites for running this integration?

Python 3.13.1+, uv package manager, Mattermost server instance, Mattermost Bot Account with API token, Access to a LLM API (Azure OpenAI)

How do I configure the integration to connect to my MCP servers?

Edit the src/mattermost_mcp_host/mcp-servers.json file to define the MCP servers you want to connect to.

What LLM providers are supported?

Azure OpenAI (default), OpenAI, Anthropic Claude, Google Gemini are supported via environment variables.

What permissions does the Mattermost bot account need?

post_all, create_post, read_channel, create_direct_channel, read_user

How do I troubleshoot connection issues?

Verify Mattermost server is running, check bot token permissions, ensure correct team/channel names, validate API keys, check API quotas and limits, verify network access to API endpoints, check server logs, verify server configurations, ensure required dependencies are installed and env variables are defined