Mattermost Agent Bridge banner
tijszwinkels tijszwinkels

Mattermost Agent Bridge

Development community

Description

Run Claude Code, Codex, or pi from your own Mattermost — one channel per agent session.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Mattermost agent bridge

Use your Claude Code, Codex, and pi coding agents from Mattermost! Each channel is a session. Interact with the same session with multiple people. Attach files and images to give them to the coding agent, and the coding agent can send files back as well. Create new sessions by opening a new channel, or open previous coding agent sessions as a Mattermost channel.

The coding agent knows it lives in a Mattermost channel. It can create new channels, and send and receive messages to and from other channels. This way, a mattermost channel can be used as an orchestrator for other agents living in other channels, creating an agent-swarm.

![One brief fans out into three agent sessions, each posting its own result back into the channel](docs/swarm-demo.gif)

*Real run, unedited: one brief in **Swarm demo** → three sessions spawned in their own channels (52s) → each posts its own result back here (73s). Every channel is a live agent session; `.running` lists the fleet.*

Install

Clone this repo, open it in Claude Code, Codex, or pi on the machine that should run your agents, and say:

**Install this.** I don't have a Mattermost server yet — set one up on this machine too.

…or point it at a Mattermost you already run. The agent interviews you first, then follows [`INSTALL.md`](INSTALL.md) — a plain numbered runbook you can also drive yourself. Just the Python package: `uv sync && uv run mm-bridge serve` (Python 3.11+). The package, the command, and the daemon are all called `mm-bridge`.

**Be aware:** the agent runs as you, on your machine, with your credentials. Anyone who can post in a bridged channel can drive it. Treat channel membership like shell access.

Talking to the bot

  • Mention it (@b3mo …) — the default. Or .autorespond on and every message in the channel reaches the agent.
  • .stop interrupts the running turn.
  • @b3mo catch up 50 feeds the last 50 channel messages into the session. (Happens automatical