Mmcp.market

add-mattermost skill

by nanocoai·nanocoai/nanoclaw·31k stars·MIT

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.

A100/100content scan

Is the add-mattermost skill safe?

Clean: nothing in its files matched our rules. We read 11 files in the folder on 2026-09-28.

No findings.

Install the add-mattermost skill

A skill is a folder. Copy it into your agent's skills folder and the agent loads it when the task matches its description.

git clone --depth 1 https://github.com/nanocoai/nanoclaw.git /tmp/nanoclaw
mkdir -p ~/.claude/skills
cp -r /tmp/nanoclaw/.claude/skills/add-mattermost ~/.claude/skills/add-mattermost
available in every project

In the Claude apps, zip the folder and upload it from the Skills settings. The folder on GitHub

The instructions your agent would load

SKILL.md as published, without the frontmatter. Read it on GitHub

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.

NanoClaw env/config files. Do not print tokens or dump whole env files.

  1. Check an existing MATTERMOSTBASEURL in the current environment 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.

  1. Probe likely local URLs, at least http://localhost:8065 and

exists but is stopped, offer to start it with its original mechanism; do not start or recreate it without the user's approval.

  1. Inspect Docker/Compose for Mattermost containers. If a matching container

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.

  1. If you find a healthy server, show its URL and ask the user to use it or

deployment guidance from SERVER_SETUP.md, then ask for the server URL after the operator has one running.

  1. If nothing healthy is found, offer Mattermost's maintained evaluation and

Set MATTERMOSTBASEURL 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.

node .claude/skills/add-mattermost/scripts/discover-server.mjs
NanoClaw found a healthy Mattermost server at {{detected_url}}. You can use this server or enter a different Mattermost URL.
Enter `use` to use {{detected_url}}. Enter `enter` to specify a different Mattermost URL.
node .claude/skills/add-mattermost/scripts/select-server.mjs use "{{detected_url}}" "{{detected_config_access}}" "{{detected_container}}"
Enter the Mattermost base URL. Include the scheme, for example `https://mattermost.example.com`.
node .claude/skills/add-mattermost/scripts/select-server.mjs enter "{{entered_url}}"
NanoClaw did not find a healthy Mattermost server. NanoClaw connects to a server but does not install or operate one. For a temporary local trial, follow Mattermost's official Quick Start Evaluation: https://docs.mattermost.com/deployment-guide/quick-start-evaluation. For a persistent or production installation, choose a supported path in Mattermost's deployment guide: https://docs.mattermost.com/deployment-guide/server/deploy-server. Return here when the server is running.
Mattermost base URL. Include the scheme, for example `https://mattermost.example.com`.
node .claude/skills/add-mattermost/scripts/select-server.mjs enter "{{entered_url_new}}"

2. Set the server SiteURL

Mattermost Desktop sends its configured server URL as the WebSocket Origin. Before you install the adapter, set ServiceSettings.SiteURL to the same URL: {{base_url}}. Keep ServiceSettings.WebsocketURL blank. Do not change ServiceSettings.AllowCorsFrom to correct an Origin error.

When discovery found host-local mmctl, ask before changing the server:

Enter `set` to set SiteURL to {{base_url}} and clear WebsocketURL. Enter `already` if these values are already correct.
mmctl config set ServiceSettings.SiteURL "{{base_url}}" --local
mmctl config set ServiceSettings.WebsocketURL "" --local

When discovery found mmctl inside a local Mattermost container, ask before changing it there:

Enter `set` to set SiteURL to {{base_url}} in {{mattermost_container}} and clear WebsocketURL. Enter `already` if these values are already correct.
docker exec "{{mattermost_container}}" mmctl config set ServiceSettings.SiteURL "{{base_url}}" --local
docker exec "{{mattermost_container}}" mmctl config set ServiceSettings.WebsocketURL "" --local

If local configuration access is unavailable, tell the operator:

Set Mattermost ServiceSettings.SiteURL to {{base_url}}. Leave ServiceSettings.WebsocketURL blank. As a System Admin, run `mmctl config set ServiceSettings.SiteURL "{{base_url}}"`. Run `mmctl config set ServiceSettings.WebsocketURL ""`. You can also use System Console → Environment → Web Server. Do not change ServiceSettings.AllowCorsFrom to correct an Origin error.
Enter `ready` after you save these Mattermost settings.

Use the public client configuration endpoint to verify the settings. The command must print {{base_url}} and then a blank line.

curl -fsS "{{base_url}}/api/v4/config/client?format=old" | node .claude/skills/add-mattermost/scripts/read-response.mjs config "{{base_url}}"

3. Copy and register the channel

Copy the canonical adapter and registration test from the channels branch. The payload must include authenticated transport liveness and setup callback probes. Existing files are preserved by installation; on an older installation, run /update-skills to refresh Mattermost before rerunning this skill.

src/channels/mattermost.ts
src/channels/mattermost-registration.test.ts
src/channels/mattermost-adapter/adapter.ts
src/channels/mattermost-adapter/adapter.test.ts
src/channels/mattermost-adapter/format.ts
src/channels/mattermost-adapter/index.ts
src/channels/mattermost-adapter/rest.ts
src/channels/mattermost-adapter/thread-id.ts
src/channels/mattermost-adapter/types.ts
src/channels/mattermost-adapter/websocket.ts
src/channels/mattermost-adapter/websocket.test.ts

Append the channel's single reach-in to the barrel, skipping it if present.

import './mattermost.js';

Remove the unscoped chat-adapter-mattermost package when it is installed. Nothing in this repository imports it: it is typosquat-shaped against the scoped @chat-adapter family, so any copy in package.json is stale or mistaken and would sit beside the audited implementation copied from the channels branch.

if node -e "const p=require('./package.json'); process.exit(p.dependencies?.['chat-adapter-mattermost'] ? 0 : 1)"; then pnpm remove chat-adapter-mattermost; fi

Install the vendored adapter's direct WebSocket dependencies at the exact supported versions.

ws@8.21.3
@types/ws@8.18.1

4. Create and authenticate the bot

Tell the operator:

Now create a Mattermost bot for NanoClaw:
1. As a System Admin, open System Console → Integrations → Bot Accounts. Turn on Enable Bot Account Creation. This setting permits bot creation. You do not create the bot on this page.
2. Return to the Mattermost workspace. Open Product menu → Integrations → Bot Accounts. Select Add Bot Account. Create a bot, for example `nanoclaw`.
3. Copy the access token.
4. Add the bot to each required team and channel. Mattermost does not add bots to teams or channels automatically.
5. Keep the token secret. If you lose the token, create a replacement. Deactivate the old token after the replacement works.
Mattermost bot access token (20 or more letters, digits, underscores, or hyphens).

The configuration helper below authenticates this token and captures the bot identity before it saves any settings.

5. Configure authenticated card callbacks

Approvals require Mattermost itself—not the browser—to reach NanoClaw. Ask for a URL routable from the Mattermost server. It may be NanoClaw's base URL or the full /webhook/mattermost route; the adapter normalizes either form.

Callback URL reachable from Mattermost, such as `https://nanoclaw.example.com` or `http://host.docker.internal:3000/webhook/mattermost`.

Save the selected server, authenticated bot token, and callback URL. On a rerun, offer to reuse each existing setting; save replacements when the operator chooses them. Mattermost does not sign action callbacks, so the helper creates a random shared secret locally on first setup. It preserves that secret on reruns so existing approval cards keep working. Never print the secret.

pnpm exec tsx .claude/skills/add-mattermost/scripts/configure.ts "{{base_url}}" "{{bot_token}}" "{{callback_url}}"

Tell the operator:

More skills from nanocoai/nanoclaw

  • Aadd-anydocAdd local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when agents need to read attached Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, or text-based PDF files without uploading them to a hosted parser.
  • Aadd-atomic-chat-toolAdd Atomic Chat MCP server so the container agent can call local models served by the Atomic Chat desktop app via its OpenAI-compatible API.
  • Fadd-clidashAdd clidash — a zero-dependency, read-only web dashboard that derives its tabs and tables at runtime from any CLI that lists resources as JSON. Ships pre-wired for NanoClaw's ncl CLI (agent groups, sessions, channels, users, roles), plus message-activity charts, a log tail, and a read-only file viewer for group skills/CLAUDE.md/profiles.
  • Aadd-codexUse Codex (OpenAI's codex app-server) as a full agent provider — planning, tool orchestration, MCP tools, server-side history, session resume — alongside or instead of Claude. ChatGPT subscription or OpenAI API key, vault-only via the selected gateway. Per-group via `ncl groups config update --provider codex`. Distinct from using OpenAI as an MCP tool (where Claude remains the planner).
  • Aadd-dashboardAdd a monitoring dashboard to NanoClaw. Installs @nanoco/nanoclaw-dashboard and a pusher that sends periodic JSON snapshots.
  • Aadd-deltachatAdd DeltaChat channel integration via @deltachat/stdio-rpc-server. Native adapter — no Chat SDK bridge. Email-based messaging with end-to-end encryption.
  • Cadd-dialAdd Dial channel integration — a real phone number for SMS and AI voice calls via the Dial platform (getdial.ai). Native adapter — no Chat SDK bridge.
  • Aadd-dial-numberAdd another phone number to an existing Dial channel — a second (or third) public line for the agent, so one NanoClaw install answers SMS and AI voice calls on multiple numbers. Use when Dial is already installed and the operator wants an additional number (e.g. a personal line plus a support line). Requires the Dial channel to already be installed (see /add-dial).
  • Aadd-dial-toolGive chosen NanoClaw agents a real phone number as a container tool — the `dial` CLI baked into the agent image plus OneCLI credential injection for api.getdial.ai, scoped per agent, so the agents you pick can send SMS, place AI voice calls, and receive verification codes from inside the sandbox. Independent of the Dial channel; idempotent; re-run to change which agents may use it. Use when the user wants agents to text, call, or run `dial …` from a chat, without wiring Dial as a messaging channel.
  • Aadd-discordAdd Discord bot channel integration via Chat SDK.
  • Aadd-emacsAdd Emacs as a channel. Opens an interactive chat buffer and org-mode integration so you can talk to NanoClaw from within Emacs (Doom, Spacemacs, or vanilla). Local HTTP bridge — no bot token or external service needed.
  • Aadd-gchatAdd Google Chat channel integration via Chat SDK.

All agent skills → · MCP servers