Mattermost MCP Host
π π - 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.
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
Maintainer
Works with
Installation
Manual Installation
npx mattermost-mcp-hostConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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 syncCreate 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.
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_optionalStart 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.pyTest 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.
Mattermost MCP Host Alternatives β Similar Communication Servers
Looking for alternatives to Mattermost MCP Host? Here are other popular communication servers you can use with Claude, Cursor, and VS Code.
Slack
β 86.1kEnables interaction with Slack workspaces through comprehensive channel management, messaging, user management, file uploads, and Block Kit formatting. Features secure credential storage via macOS Keychain and supports all major Slack operations incl
LibreChat
β 37.3kEnhanced ChatGPT Clone: Features Agents, MCP, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenA
Note Gen
β 11.9kA cross-platform Markdown AI note-taking software.
DeepChat
β 5.8kπ¬DeepChat - A smart assistant that connects powerful AI to your personal world
WhatsApp MCP
β 5.7kConnects AI assistants to the official Meta WhatsApp Cloud API for managing conversations and sending various message types through natural language. It provides tools for media management, template messages, and real-time webhook processing without
Apple
β 3.1kEnables interaction with Apple apps like Messages, Notes, and Contacts through the MCP protocol to send messages, search, and open app content using natural language.
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.
Set Up Mattermost MCP Host in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.