Mattermost MCP Host

v1.0.0β€’Communicationβ€’stable

🐍 🏠 - A MCP server along with MCP host that provides access to Mattermost teams, channels and messages. MCP host is integrated as a bot in Mattermost with access to MCP servers that can be configured.

langgraphllmmattermostmcpmcp-clients
Share:
34
Stars
0
Downloads
0
Weekly
0/5

What is Mattermost MCP Host?

Mattermost MCP Host is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 🐍 🏠 - a mcp server along with mcp host that provides access to mattermost teams, channels and messages. mcp host is integrated as a bot in mattermost with access to mcp servers that can be configure...

🐍 🏠 - A MCP server along with MCP host that provides access to Mattermost teams, channels and messages. MCP host is integrated as a bot in Mattermost with access to MCP servers that can be configured.

This server falls under the Communication category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • 🐍 🏠 - A MCP server along with MCP host that provides access

Use Cases

Access team channels and messages
Integrate MCP servers
Bot-based automation
jagan-shanmugam

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 8, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mattermost-mcp-host

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Mattermost MCP Host

Mattermost MCP Host is a Python-based system that serves dual roles: an MCP server exposing Mattermost workspace data (teams, channels, and messages) and an MCP host that embeds as an AI-powered bot in Mattermost itself. The bot uses LangGraph and a configurable LLM (Azure OpenAI by default, with OpenAI, Anthropic, and Gemini also supported) to respond intelligently in threads, and it can in turn call out to other MCP servers registered in its config. Teams use it to bring LLM reasoning directly into Mattermost without requiring users to leave their chat environment, and to automate channel workflows by connecting the bot to external MCP-enabled services.

Prerequisites

  • Python 3.13.1 or later and the uv package manager
  • A running Mattermost instance (self-hosted or cloud) with admin access to create a bot account
  • A Mattermost bot access token with permissions: post_all, create_post, read_channel, create_direct_channel, read_user
  • An LLM provider API key (Azure OpenAI by default; AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_API_KEY, AZURE_OPENAI_DEPLOYMENT)
  • Optional: TAVILY_API_KEY for web search capability
1

Clone the repository and install dependencies

Clone the project and use uv to install all Python dependencies including LangGraph, the Mattermost client library, and MCP SDK.

git clone https://github.com/jagan-shanmugam/mattermost-mcp-host.git
cd mattermost-mcp-host
uv sync
2

Create a Mattermost bot account

In Mattermost System Console, create a bot account with the required permissions (post_all, create_post, read_channel, create_direct_channel, read_user). Add the bot to your team and all channels it should monitor. Save the bot's access token.

3

Configure environment variables

Create a .env file in the project root with your Mattermost connection details, bot token, LLM provider credentials, and optional settings. The COMMAND_PREFIX (default: #) defines how users invoke bot commands.

MATTERMOST_URL=https://your-mattermost-instance.com
MATTERMOST_TOKEN=your_bot_access_token
MATTERMOST_TEAM_NAME=your-team-name
MATTERMOST_CHANNEL_NAME=general

AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com
AZURE_OPENAI_API_KEY=your_azure_openai_key
AZURE_OPENAI_DEPLOYMENT=gpt-4o

COMMAND_PREFIX=#
TAVILY_API_KEY=your_tavily_key_optional
4

Start the bot

Activate the virtual environment and run the main bot script. The bot will connect to Mattermost and begin listening for messages in the configured channel.

source .venv/bin/activate
uv run python main.py
5

Test bot commands in Mattermost

In the Mattermost channel where the bot is present, use the command prefix to interact. Use '#servers' to list connected MCP servers, or just type a natural language message in a thread to get an AI response.

# In Mattermost channel:
#servers
#<server_name> tools
#<server_name> call <tool_name> '{"arg": "value"}'

Mattermost MCP Host Examples

Client configuration

MCP server configuration block if you want to expose Mattermost data to an external MCP client like Claude Desktop.

{
  "mcpServers": {
    "mattermost": {
      "command": "python",
      "args": ["/absolute/path/to/mattermost-mcp-host/main.py"],
      "env": {
        "MATTERMOST_URL": "https://your-mattermost-instance.com",
        "MATTERMOST_TOKEN": "your_bot_access_token",
        "MATTERMOST_TEAM_NAME": "your-team-name",
        "MATTERMOST_CHANNEL_NAME": "general",
        "AZURE_OPENAI_ENDPOINT": "https://your-resource.openai.azure.com",
        "AZURE_OPENAI_API_KEY": "your_azure_openai_key",
        "AZURE_OPENAI_DEPLOYMENT": "gpt-4o"
      }
    }
  }
}

Prompts to try

Sample Mattermost bot commands and natural language prompts that exercise the bot's capabilities.

- "#servers" (list all registered MCP servers)
- "#filesearch tools" (list tools on the filesearch MCP server)
- "Summarize the last 20 messages in this channel."
- "@bot What were the key decisions made in the #engineering channel this week?"
- "#filesearch call search_files '{\"query\": \"Q4 roadmap\"}'"
- "Draft a response to the last message in this thread and post it."

Troubleshooting Mattermost MCP Host

Bot connects but does not respond to messages

Verify the bot account has been added to the specific Mattermost channel and has the post_all and read_channel permissions. Check that MATTERMOST_CHANNEL_NAME in .env matches the exact channel name (not the display name). Review bot logs for WebSocket connection errors.

Azure OpenAI authentication fails

Confirm AZURE_OPENAI_ENDPOINT is the full endpoint URL (e.g., https://your-resource.openai.azure.com), AZURE_OPENAI_DEPLOYMENT is your deployment name (not the model name), and AZURE_OPENAI_API_KEY is valid. Test with the Azure OpenAI Playground first.

uv sync fails or Python version not found

This project requires Python 3.13.1 or later. Run 'python --version' to check. Install a compatible Python version via pyenv or the official Python installer, then re-run 'uv sync' which will use uv's built-in Python management if needed.

Frequently Asked Questions about Mattermost MCP Host

What is Mattermost MCP Host?

Mattermost MCP Host is a Model Context Protocol (MCP) server that 🐍 🏠 - a mcp server along with mcp host that provides access to mattermost teams, channels and messages. mcp host is integrated as a bot in mattermost with access to mcp servers that can be configured. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Mattermost MCP Host?

Follow the installation instructions on the Mattermost MCP Host GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Mattermost MCP Host?

Mattermost MCP Host works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Mattermost MCP Host free to use?

Yes, Mattermost MCP Host is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Communication MCP Servers

Explore all communication servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "mattermost-mcp-host": { "command": "npx", "args": ["-y", "mattermost-mcp-host"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide β†’

Ready to use Mattermost MCP Host?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides