{
  "markdown": "# Mattermost Channel for Claude Code\n\nBridge Mattermost messages to your Claude Code session. Self-hosted, private, two-way chat.\n\nDM your Mattermost bot, and the message arrives in your Claude Code terminal. Claude reads it, does the work, and replies back in Mattermost.\n\n## Prerequisites\n\n- [Claude Code](https://code.claude.com) v2.1.80+ with channels support\n- [Bun](https://bun.sh) runtime\n- A Mattermost instance with a bot account and personal access token\n\n## Setup\n\n### 1. Create a Mattermost bot\n\n1. Go to **System Console > Integrations > Bot Accounts** and enable bot accounts\n2. Go to **Integrations > Bot Accounts > Add Bot Account**\n3. Give it a username (e.g., `claude-bot`) and role\n4. Copy the generated access token\n\nAlternatively, create a personal access token:\n1. Go to **Account Settings > Security > Personal Access Tokens**\n2. Create a token and copy it\n\n### 2. Install the plugin\n\n```\n/plugin install mattermost@claude-plugins-official\n```\n\nOr for local development:\n\n```bash\ncd ~/claude-channel-mattermost\nbun install\n```\n\n### 3. Configure credentials\n\n```\n/mattermost:configure https://mm.example.com xoxb-your-token-here\n```\n\nThis saves to `~/.claude/channels/mattermost/.env`.\n\n### 4. Start with channels enabled\n\n```bash\n# Published plugin\nclaude --channels plugin:mattermost@claude-plugins-official\n\n# Local development\nclaude --dangerously-load-development-channels server:mattermost\n```\n\n### 5. Pair your account\n\n1. DM the bot on Mattermost — it replies with a 6-char code\n2. In Claude Code: `/mattermost:access pair <code>`\n3. Lock down access: `/mattermost:access policy allowlist`\n\n## Tools\n\n| Tool | Description |\n|------|-------------|\n| `reply` | Post a message (with optional threading and file attachments) |\n| `react` | Add an emoji reaction (use names like `thumbsup`, no colons) |\n| `edit_message` | Edit a previously sent post |\n| `download_attachment` | Download a file attachment to local inbox |\n| `fetch_messages` | Retrieve recent channel history |\n\n## Access Control\n\nSee [ACCESS.md](ACCESS.md) for full documentation.\n\n- **DM policy**: `pairing` (default), `allowlist`, or `disabled`\n- **Group channels**: opt-in per channel with optional mention-gating\n- **Sender allowlist**: only approved user IDs can push messages\n\n## State Directory\n\n```\n~/.claude/channels/mattermost/\n  .env          — MATTERMOST_URL and MATTERMOST_TOKEN\n  access.json   — allowlist, groups, pending pairings\n  inbox/        — downloaded attachments\n  approved/     — pairing approval signal files\n```\n",
  "bytes": 2531,
  "sha": "ce253598883f628ce55ca45b452821dfe063749ad7dc4e466829655f2c4fb99f",
  "repo_slug": "todd-chamberlain/claude-channel-mattermost",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_todd_chamberlain_claude_channel_mattermo_ec4b9a9d/readme"
}