Official Mattermost MCP server, built into the Mattermost Agents plugin. Read, search and post.
Self-hosted AI agents for Mattermost that act on your behalf through tools and MCP servers, plus a built-in Mattermost MCP server for external AI clients such as Claude Code, Claude Desktop, Cursor, and VS Code.

Mattermost Agents (plugin ID mattermost-ai) adds AI agents to a Mattermost server. You talk to an agent in a direct message, the Agents pane, or a channel. The agent can search and post in Mattermost, call tools on other systems through the Model Context Protocol (MCP), and work with files, all with the permissions of the person it is acting for. You choose the LLM, including models that run on your own infrastructure, so with a self-hosted model, conversations and data stay in your environment.
Does Mattermost have an official MCP server? Yes. It is built into this plugin and needs no separate installation. After an admin enables it, MCP clients connect to /plugins/mattermost-ai/mcp-server/mcp on your Mattermost server and sign in as a Mattermost user. See Mattermost MCP Server.
Some features depend on your Mattermost license level. See the license requirements.
Documentation is available in the docs directory:
After installation, complete these steps to get started:
For detailed configuration instructions, see the Admin Guide.
The plugin provides a Go client library for other Mattermost plugins and the Mattermost server to interact with the AI plugin's LLM Bridge API. This allows you to easily add AI capabilities to your own plugins or server-side features.
See the Bridge Client README for installation and usage instructions.
Setup your Mattermost development environment by following the Mattermost developer setup guide. If you have a remote mattermost server you want to develop to you can skip this step.
Setup your Mattermost plugin development environment by following the Plugin Developer setup guide.
Clone the repository:
git clone https://github.com/mattermost/mattermost-plugin-agents.git
cd mattermost-plugin-agents
MM_SERVICESETTINGS_SITEURL=http://localhost:8065
MM_ADMIN_USERNAME=<YOUR_USERNAME>
MM_ADMIN_PASSWORD=<YOUR_PASSWORD>
make deploy
make help for a list of all make commandsmake check-style to verify code stylemake test to run the test suitemake e2e to run the e2e testsmake evals to run prompt evaluations interactively (with TUI)make evals-ci to run prompt evaluations in CI mode (non-interactive)The streaming code has benchmark tests to measure performance and detect regressions:
# Run all streaming benchmarks
go test -bench=. -benchmem ./llm/... ./streaming/...
# Run specific benchmark
go test -bench=BenchmarkStreamToPost -benchmem ./streaming/...
# Run with CPU profiling
go test -bench=BenchmarkReadAll -cpuprofile=cpu.prof ./llm/...
Benchmarks cover:
ReadAll() stream consumption with varying response sizesTokenUsageLoggingWrapper interception overheadStreamToPost() full processing pipeline with WebSocket eventsThe evaluation system supports testing with multiple LLM providers: OpenAI, Anthropic, and Azure OpenAI. By default, evaluations run against all providers, but you can target specific ones:
# Run with all providers (default)
make evals
# Run with only Anthropic
LLM_PROVIDER=anthropic make evals
# Run with OpenAI and Azure
LLM_PROVIDER=openai,azure make evals
# Use a specific model
ANTHROPIC_MODEL=claude-opus-5-5 make evals
See cmd/evalviewer/README.md for complete documentation on environment variables and configuration options.
This repository is licensed under Apache-2, except for the enterprise directory which is licensed under the Mattermost Source Available License. See Mattermost Source Available License to learn more.
This listing does not have a supported local package template. Use the maintainer’s documentation for its hosted endpoint, authentication, and client-specific setup. No install command has been inferred.