---
name: mattermost
description: "Team messaging via Mattermost REST API v4"
version: "0.1.0"
entry: ./adapter.ts
npm_deps:
  required: []
  optional: []
fields:
  - key: url
    label: "Server URL"
    required: true
    sensitive: false
  - key: token
    label: "Bot Token"
    required: true
    sensitive: true
  - key: channels
    label: "Channel Filter"
    required: false
    sensitive: false
health_check: list_channels
keywords:
  - messaging
  - mattermost
  - chat
  - bot
---

Connect an agent to Mattermost for reading and writing messages. Uses native
`fetch` for REST calls — no npm packages required.

## Operations

### Read

| Operation | Description |
|-----------|-------------|
| `list_channels` | List channels the bot can access |
| `get_channel` | Get channel details by ID |
| `list_posts` | List recent posts in a channel |
| `get_thread` | Get all posts in a thread |
| `search_posts` | Full-text search across channels |
| `get_user` | Get user info by ID |

### Write

| Operation | Description |
|-----------|-------------|
| `create_post` | Post a message to a channel |
| `reply_to_thread` | Reply within an existing thread |
| `update_post` | Edit an existing post |

## Configuration

```yaml
connectors:
  - id: team-chat
    adapter: mattermost
    access: read-write
    auth: env:MM_BOT_TOKEN
    options:
      url: https://chat.example.com
      channels: "channel-id-1,channel-id-2"
```
