التثبيت
أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: .cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).
https://github.com/vriesdemichael/mm-mcp/releases/download/v0.4.0/mm-mcp_0.4.0_darwin_amd64.mcpbمتغيرات البيئة
MM_MCP_ALLOW_WRITESOffer the tools that post and change things. Your client's own approval of each call decides, and mm-mcp checks what each change others see states before it acts.MM_MCP_CA_FILEA PEM file of certificate authorities to trust beside your system's, for a Mattermost whose certificate your organisation signed itself. Leave it empty otherwise.MM_MCP_DOWNLOAD_DIRWhere save_file writes attachments. Leave it empty for your Downloads directory.MM_MCP_ELICITATION_OPT_INYour client's own approval of each call decides whether a post or another change others see goes ahead, and mm-mcp checks what each states. Turn this on to have mm-mcp ask you too, through a question your client shows: a convenience where it shows it, not a safeguard, since some clients answer it themselves.MM_MCP_FORCE_HUMAN_IN_THE_LOOP_IN_CLAUDE_CODENot with mm-mcp asks as well: marks each tool that changes what others see so that Claude Code asks a person on every call, whatever its permission mode or rules allow. An agent cannot post on its own while it is on.MM_MCP_MARK_AI_GENERATEDMark every post and edit the model writes with Mattermost's own marker for text written with AI.MM_MCP_POST_FROM_VIEWSWhere your app shows mm-mcp's views, a post the model proposes as your draft can be posted from the view with Post. Off, the draft waits in Mattermost for you to send.MM_MCP_RESOURCE_MAX_MBThe most one message carrying an attached file as an MCP resource holds, a binary file counted as its base64. MCP sends a resource whole, and a client drops a message past its own limit, 10 MB for clients built on the TypeScript SDK. A larger one is refused, and read_file or save_file reads it instead. 0 is no limit.MM_TOKENسري A personal access token or a bot token. Where those are switched off, leave it empty after logging in once with mm-mcp login --url <address> in a terminal, which keeps your session in the system's credential store.MM_URLإلزامي The address you open Mattermost at, such as https://chat.example.com.
https://github.com/vriesdemichael/mm-mcp/releases/download/v0.4.0/mm-mcp_0.4.0_darwin_arm64.mcpbمتغيرات البيئة
MM_MCP_ALLOW_WRITESOffer the tools that post and change things. Your client's own approval of each call decides, and mm-mcp checks what each change others see states before it acts.MM_MCP_CA_FILEA PEM file of certificate authorities to trust beside your system's, for a Mattermost whose certificate your organisation signed itself. Leave it empty otherwise.MM_MCP_DOWNLOAD_DIRWhere save_file writes attachments. Leave it empty for your Downloads directory.MM_MCP_ELICITATION_OPT_INYour client's own approval of each call decides whether a post or another change others see goes ahead, and mm-mcp checks what each states. Turn this on to have mm-mcp ask you too, through a question your client shows: a convenience where it shows it, not a safeguard, since some clients answer it themselves.MM_MCP_FORCE_HUMAN_IN_THE_LOOP_IN_CLAUDE_CODENot with mm-mcp asks as well: marks each tool that changes what others see so that Claude Code asks a person on every call, whatever its permission mode or rules allow. An agent cannot post on its own while it is on.MM_MCP_MARK_AI_GENERATEDMark every post and edit the model writes with Mattermost's own marker for text written with AI.MM_MCP_POST_FROM_VIEWSWhere your app shows mm-mcp's views, a post the model proposes as your draft can be posted from the view with Post. Off, the draft waits in Mattermost for you to send.MM_MCP_RESOURCE_MAX_MBThe most one message carrying an attached file as an MCP resource holds, a binary file counted as its base64. MCP sends a resource whole, and a client drops a message past its own limit, 10 MB for clients built on the TypeScript SDK. A larger one is refused, and read_file or save_file reads it instead. 0 is no limit.MM_TOKENسري A personal access token or a bot token. Where those are switched off, leave it empty after logging in once with mm-mcp login --url <address> in a terminal, which keeps your session in the system's credential store.MM_URLإلزامي The address you open Mattermost at, such as https://chat.example.com.
https://github.com/vriesdemichael/mm-mcp/releases/download/v0.4.0/mm-mcp_0.4.0_linux_amd64.mcpbمتغيرات البيئة
MM_MCP_ALLOW_WRITESOffer the tools that post and change things. Your client's own approval of each call decides, and mm-mcp checks what each change others see states before it acts.MM_MCP_CA_FILEA PEM file of certificate authorities to trust beside your system's, for a Mattermost whose certificate your organisation signed itself. Leave it empty otherwise.MM_MCP_DOWNLOAD_DIRWhere save_file writes attachments. Leave it empty for your Downloads directory.MM_MCP_ELICITATION_OPT_INYour client's own approval of each call decides whether a post or another change others see goes ahead, and mm-mcp checks what each states. Turn this on to have mm-mcp ask you too, through a question your client shows: a convenience where it shows it, not a safeguard, since some clients answer it themselves.MM_MCP_FORCE_HUMAN_IN_THE_LOOP_IN_CLAUDE_CODENot with mm-mcp asks as well: marks each tool that changes what others see so that Claude Code asks a person on every call, whatever its permission mode or rules allow. An agent cannot post on its own while it is on.MM_MCP_MARK_AI_GENERATEDMark every post and edit the model writes with Mattermost's own marker for text written with AI.MM_MCP_POST_FROM_VIEWSWhere your app shows mm-mcp's views, a post the model proposes as your draft can be posted from the view with Post. Off, the draft waits in Mattermost for you to send.MM_MCP_RESOURCE_MAX_MBThe most one message carrying an attached file as an MCP resource holds, a binary file counted as its base64. MCP sends a resource whole, and a client drops a message past its own limit, 10 MB for clients built on the TypeScript SDK. A larger one is refused, and read_file or save_file reads it instead. 0 is no limit.MM_TOKENسري A personal access token or a bot token. Where those are switched off, leave it empty after logging in once with mm-mcp login --url <address> in a terminal, which keeps your session in the system's credential store.MM_URLإلزامي The address you open Mattermost at, such as https://chat.example.com.
https://github.com/vriesdemichael/mm-mcp/releases/download/v0.4.0/mm-mcp_0.4.0_linux_arm64.mcpbمتغيرات البيئة
MM_MCP_ALLOW_WRITESOffer the tools that post and change things. Your client's own approval of each call decides, and mm-mcp checks what each change others see states before it acts.MM_MCP_CA_FILEA PEM file of certificate authorities to trust beside your system's, for a Mattermost whose certificate your organisation signed itself. Leave it empty otherwise.MM_MCP_DOWNLOAD_DIRWhere save_file writes attachments. Leave it empty for your Downloads directory.MM_MCP_ELICITATION_OPT_INYour client's own approval of each call decides whether a post or another change others see goes ahead, and mm-mcp checks what each states. Turn this on to have mm-mcp ask you too, through a question your client shows: a convenience where it shows it, not a safeguard, since some clients answer it themselves.MM_MCP_FORCE_HUMAN_IN_THE_LOOP_IN_CLAUDE_CODENot with mm-mcp asks as well: marks each tool that changes what others see so that Claude Code asks a person on every call, whatever its permission mode or rules allow. An agent cannot post on its own while it is on.MM_MCP_MARK_AI_GENERATEDMark every post and edit the model writes with Mattermost's own marker for text written with AI.MM_MCP_POST_FROM_VIEWSWhere your app shows mm-mcp's views, a post the model proposes as your draft can be posted from the view with Post. Off, the draft waits in Mattermost for you to send.MM_MCP_RESOURCE_MAX_MBThe most one message carrying an attached file as an MCP resource holds, a binary file counted as its base64. MCP sends a resource whole, and a client drops a message past its own limit, 10 MB for clients built on the TypeScript SDK. A larger one is refused, and read_file or save_file reads it instead. 0 is no limit.MM_TOKENسري A personal access token or a bot token. Where those are switched off, leave it empty after logging in once with mm-mcp login --url <address> in a terminal, which keeps your session in the system's credential store.MM_URLإلزامي The address you open Mattermost at, such as https://chat.example.com.
https://github.com/vriesdemichael/mm-mcp/releases/download/v0.4.0/mm-mcp_0.4.0_windows_amd64.mcpbمتغيرات البيئة
MM_MCP_ALLOW_WRITESOffer the tools that post and change things. Your client's own approval of each call decides, and mm-mcp checks what each change others see states before it acts.MM_MCP_CA_FILEA PEM file of certificate authorities to trust beside your system's, for a Mattermost whose certificate your organisation signed itself. Leave it empty otherwise.MM_MCP_DOWNLOAD_DIRWhere save_file writes attachments. Leave it empty for your Downloads directory.MM_MCP_ELICITATION_OPT_INYour client's own approval of each call decides whether a post or another change others see goes ahead, and mm-mcp checks what each states. Turn this on to have mm-mcp ask you too, through a question your client shows: a convenience where it shows it, not a safeguard, since some clients answer it themselves.MM_MCP_FORCE_HUMAN_IN_THE_LOOP_IN_CLAUDE_CODENot with mm-mcp asks as well: marks each tool that changes what others see so that Claude Code asks a person on every call, whatever its permission mode or rules allow. An agent cannot post on its own while it is on.MM_MCP_MARK_AI_GENERATEDMark every post and edit the model writes with Mattermost's own marker for text written with AI.MM_MCP_POST_FROM_VIEWSWhere your app shows mm-mcp's views, a post the model proposes as your draft can be posted from the view with Post. Off, the draft waits in Mattermost for you to send.MM_MCP_RESOURCE_MAX_MBThe most one message carrying an attached file as an MCP resource holds, a binary file counted as its base64. MCP sends a resource whole, and a client drops a message past its own limit, 10 MB for clients built on the TypeScript SDK. A larger one is refused, and read_file or save_file reads it instead. 0 is no limit.MM_TOKENسري A personal access token or a bot token. Where those are switched off, leave it empty after logging in once with mm-mcp login --url <address> in a terminal, which keeps your session in the system's credential store.MM_URLإلزامي The address you open Mattermost at, such as https://chat.example.com.
https://github.com/vriesdemichael/mm-mcp/releases/download/v0.4.0/mm-mcp_0.4.0_windows_arm64.mcpbمتغيرات البيئة
MM_MCP_ALLOW_WRITESOffer the tools that post and change things. Your client's own approval of each call decides, and mm-mcp checks what each change others see states before it acts.MM_MCP_CA_FILEA PEM file of certificate authorities to trust beside your system's, for a Mattermost whose certificate your organisation signed itself. Leave it empty otherwise.MM_MCP_DOWNLOAD_DIRWhere save_file writes attachments. Leave it empty for your Downloads directory.MM_MCP_ELICITATION_OPT_INYour client's own approval of each call decides whether a post or another change others see goes ahead, and mm-mcp checks what each states. Turn this on to have mm-mcp ask you too, through a question your client shows: a convenience where it shows it, not a safeguard, since some clients answer it themselves.MM_MCP_FORCE_HUMAN_IN_THE_LOOP_IN_CLAUDE_CODENot with mm-mcp asks as well: marks each tool that changes what others see so that Claude Code asks a person on every call, whatever its permission mode or rules allow. An agent cannot post on its own while it is on.MM_MCP_MARK_AI_GENERATEDMark every post and edit the model writes with Mattermost's own marker for text written with AI.MM_MCP_POST_FROM_VIEWSWhere your app shows mm-mcp's views, a post the model proposes as your draft can be posted from the view with Post. Off, the draft waits in Mattermost for you to send.MM_MCP_RESOURCE_MAX_MBThe most one message carrying an attached file as an MCP resource holds, a binary file counted as its base64. MCP sends a resource whole, and a client drops a message past its own limit, 10 MB for clients built on the TypeScript SDK. A larger one is refused, and read_file or save_file reads it instead. 0 is no limit.MM_TOKENسري A personal access token or a bot token. Where those are switched off, leave it empty after logging in once with mm-mcp login --url <address> in a terminal, which keeps your session in the system's credential store.MM_URLإلزامي The address you open Mattermost at, such as https://chat.example.com.
التوثيق
مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.
mm-mcp
An MCP server for Mattermost. It lets an AI agent read and search your Mattermost and, when you allow it, post and reply, as you or as a bot.
mm-mcp is an independent project. It is not affiliated with, endorsed by or supported by Mattermost, Inc.; Mattermost is a trademark of Mattermost, Inc.
The tools read channels, threads, unread posts, mentions and files, search posts, files, people and channels, and, once you allow writes, post, reply, edit, react, pin, propose posts, join, leave and create channels, and set your status. A link pasted from Mattermost works wherever a tool that reads wants an id, every answer links each post, channel and team it names and gives the address a write others see takes, and attached files, their previews, profile pictures and custom emoji are MCP resources your client can read too. The tools page lists every tool. In a client that renders MCP Apps views, a thread, what is unread for you, or a post your agent made or proposes can be shown in the chat as Mattermost lays it out; more views are planned, and the issues are the plan.
A reply your agent drafted, waiting for you to post, change or discard, and a thread you asked to see, as an AI app that shows views shows them (try them live):
Why it works the way it does
- Read-only unless you say otherwise. The tools that post or change anything
are not offered until
MM_MCP_ALLOW_WRITESis true. Then your MCP client's own approval of each call decides, and mm-mcp checks what each change others see states before it acts: how many people a post or an edit reaches and a post notifies, the text an edit replaces, what a deletion takes away, and where it goes, by address. By default, every post and edit is marked as written with AI.MM_MCP_ELICITATION_OPT_IN=truehas mm-mcp ask you as well, in a client that shows its question. - Your token, a bot's, or your own login. A personal access token, a bot
token, or your own login through
mm-mcp login, single sign-on included, kept in your system's credential store, for servers where personal access tokens are switched off. - Mattermost's own client. Requests and answers use the server's own Go client and types, not a hand-written description of the API.
- Every supported release, tested. Every tool runs against a real Mattermost Team Edition, on the Extended Support Release and the newest release on every change, and on every release between them each week.
- stdio and Streamable HTTP. A client starts it as a local process, or it serves Streamable HTTP on a loopback address.
Quick start
Install mm-mcp with brew install vriesdemichael/tap/mm-mcp,
winget install vriesdemichael.mm-mcp or
scoop install vriesdemichael/mm-mcp (after
scoop bucket add vriesdemichael https://github.com/vriesdemichael/scoop), or
download the binary for your machine from the
latest release.
Then get a personal access token in Mattermost under Profile → Security →
Personal Access Tokens, and keep it in your system's credential store, out of
your client's configuration, with
mm-mcp login --with paste --url https://chat.example.com. Where those tokens
are switched off, log in once with mm-mcp login --url https://chat.example.com
instead.
{
"mcpServers": {
"mattermost": {
"command": "mm-mcp",
"args": ["serve"],
"env": {
"MM_URL": "https://chat.example.com"
}
}
}
}
Or, for Claude Code, the plugin, which asks for the address and a token you can
leave empty after mm-mcp login:
/plugin marketplace add vriesdemichael/mm-mcp
/plugin install mm-mcp@mm-mcp
or the server alone:
claude mcp add mattermost --scope user --env MM_URL=https://chat.example.com -- mm-mcp serve
Claude Desktop users can open the .mcpb bundle for their machine from the
latest release instead.
When it does not work, mm-mcp doctor --url https://chat.example.com checks
the configuration, the stored login, the way to the server and the credential,
and says what to fix; from inside your MCP client, the diagnose tool does the
same with the client's own configuration.
The documentation has every setting, the tools, and the supported Mattermost releases.
Contributing
See CONTRIBUTING.md. The decisions behind how this project is built are in docs/site/adr.
License
الأسئلة الشائعة
ما هو Mattermost؟
Read, search and post in Mattermost as yourself or a bot.
كيف أثبّت Mattermost؟
اتبع خطوات التثبيت في توثيقه المعروض في هذه الصفحة وفي مستودعه.
هل يحتاج Mattermost إلى مفتاح API؟
نعم. يتطلب MM_TOKEN, MM_URL، وتضبطها في إعداداته.
هل Mattermost مفتوح المصدر؟
نعم. شيفرته متاحة على GitHub بترخيص Apache-2.0.
من يصون Mattermost؟
ينشره vriesdemichael. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.
من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.