Connect OpenCode to Mattermost
Set up in minutes
Choose where it runs
On your computer through your own OpenCode, or hosted in the cloud. The rest of setup adapts to your choice:
Pick what it can do in Mattermost
A preset of real Mattermost operations. Each one becomes a tool the agent can call, and it can't touch anything outside the list.
Connect Mattermost
One sign-in. The agent acts through your account, scoped to the operations you picked.
Add your personal MCP link
The last step mints a private MCP URL for this agent and walks you through exactly this, with your real link filled in. The page flips to Connected the moment your OpenCode first calls in. opencode mcp add only saves the config. OpenCode connects when it starts — run opencode, or restart a running one.
1. Run this in your terminal
2. Choose Remote and paste your server URL
3. Choose No when asked about OAuth authentication — the link itself is the key
<your-link> is your personal server URL — setup mints it for you.
Tools OpenCode gets
Mattermost
25 toolsRead the authenticated account to verify the connection.
Read a user profile.
Find a user by their exact username.
List teams the authenticated user belongs to.
Read one page of public channels in a team.
List the authenticated user’s channels in a team.
Read a channel.
Create a public or private channel.
Update only the supplied channel fields.
Create or retrieve the direct channel between two users.
Read one page of channel memberships.
Add one user to a channel.
Remove a user from a channel.
Read one page of messages in a channel, newest first.
Send a Markdown message or reply in a channel.
Read one message.
Patch the message text while preserving other fields.
Delete a message (the server may retain it for compliance).
Read a thread in one API response, with an optional continuation post.
Search team messages; page controls require Elasticsearch on the server.
React to a post as the supplied authenticated user ID.
Remove the supplied user’s reaction (permissions apply).
List reactions on a post.
Pin a message to its channel.
Unpin a message from its channel.
About OpenCode
Frequently asked questions
More ways to connect
More tools for OpenCode
Use Mattermost with other agents
Open your OpenCode agent in one click.
NoClick runs OpenCode for you with Mattermost wired in as tools. Connect your account and run.