# Add Mattermost

Add a self-hosted or cloud Mattermost bot channel through the Chat SDK bridge, reusing...

- Repository: https://github.com/nanocoai/nanoclaw (31069 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add nanocoai/nanoclaw --skill add-mattermost -g -a claude-code -y`
Codex: `npx skills add nanocoai/nanoclaw --skill add-mattermost -g -a codex -y`
Cursor: `npx skills add nanocoai/nanoclaw --skill add-mattermost -g -a cursor -y`
Gemini CLI: `npx skills add nanocoai/nanoclaw --skill add-mattermost -g -a gemini-cli -y`

## Description

Add a self-hosted or cloud Mattermost bot channel through the Chat SDK bridge, reusing a healthy server when available and linking to official server setup guidance when needed.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Add Mattermost Channel

Adds Mattermost DMs, channels, threads, files, reactions, and interactive
approval cards. Messages arrive over Mattermost's WebSocket; card clicks return
to NanoClaw over an authenticated HTTP callback. Every step is safe to re-run.

## Discover the server first

Do this before installing the adapter or asking for a URL. The goal is to
reuse a healthy Mattermost the user already has and establish one canonical
base URL.

1. Check an existing `MATTERMOST_BASE_URL` in the current environment and
   NanoClaw env/config files. Do not print tokens or dump whole env files.
2. Probe likely local URLs, at least `http://localhost:8065` and
   `http://127.0.0.1:8065`, using `GET /api/v4/system/ping`. A listening port
   alone is not evidence that the service is Mattermost.
3. Inspect Docker/Compose for Mattermost containers. If a matching container
   exists but is stopped, offer to start it with its original mechanism; do not
   start or recreate it without the user's approval.
4. If you find a healthy server, show its URL and ask the user to use it or
   enter a different URL. Do not select a server automatically. Treat the
   localhost and 127.0.0.1 endpoints for the same container as one server.
5. If nothing healthy is found, offer Mattermost's maintained evaluation and
   deployment guidance from [SERVER_SETUP.md](SERVER_SETUP.md), then ask for
   the server URL after the operator has one running.

Set `MATTERMOST_BASE_URL` to the chosen canonical URL (scheme included, no
trailing slash), then use that exact hostname in browser/Desktop setup.
NanoClaw connects to Mattermost; it does not install or manage the server.

## Apply

### 1. Detect or select the server

Test the configured URL and the standard local URLs. A detected server is only
a suggestion. The user must select it.

The rest: https://github.com/nanocoai/nanoclaw/blob/HEAD/.claude/skills/add-mattermost/SKILL.md
