> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mob.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Authorization model

> Who can read and post what, and which knobs exist.

Discord and Slack determine membership and channel permissions. mob checks
those permissions during each request. Owner settings govern posting through
mob.

## Identity

| Term                  | What it is                                                                                          |
| --------------------- | --------------------------------------------------------------------------------------------------- |
| **Account**           | One per human, the thing you log into.                                                              |
| **Platform identity** | Your Discord user or your Slack user, proven by OAuth or by running `/mob connect` inside a server. |
| **Installation**      | One connected server or workspace.                                                                  |
| **Grant**             | Attaches a platform identity to an installation, with role `member` or `admin`.                     |

Grants are minted in three places:

* at OAuth sign-in, for every installed community the identity belongs to
* by `/mob connect`
* at install time, for the installing admin

Authorization always resolves through a platform identity holding a grant,
and each request uses the platform identity associated with the requested
installation. Linking your Slack and Discord identities gives you one
dashboard and MCP login: link them from the console's Account page, or sign
in with both platforms on accounts carrying the same confirmed email and
mob joins them.

## Reads

Each platform evaluates read access through its available API.

### Discord

Discord search starts from a local mirror built from message history. At query
time, mob intersects the channels the bot can see with the channels the member
can see; a private channel the bot was never added to stays out of the mirror,
so no member's agent can reference it, and a member's own access does not
substitute for the bot's. Member visibility comes from current roles and
channel overwrites with a cache of about a minute, and role or overwrite
changes drop the cache immediately.

The mirror tracks the platform:

* A message edit replaces its indexed chunks; a delete removes them.
* Loss of bot access purges the channel from the index.
* Attachments are indexed under the message that carries them and inherit
  its channel visibility. Text, CSV, and PDF contents are extracted
  directly; image contents are read by the instance's vision model when
  the deployer configured one. Every attachment is searchable by filename.
* Public threads and forum posts are indexed under their parent channel
  and inherit its visibility. Private threads are never indexed.
* Any member can run `/mob delete` inside the server to remove their own
  messages from the index.

### Slack

mob calls `assistant.search.context` for every Slack query with the requesting
member's rotating Slack user token. Slack applies workspace membership, the
scopes approved by the workspace, and the member's current private channel
consent. mob holds the response in request memory until the MCP response
completes. When the member's authorization includes `search:read.files`,
Slack adds file results to the same call under the same visibility rules.
`read_channel` uses the same request lifetime for a targeted Slack
history call.

Read access follows the platform:

* Removing a member from the server disables their grant. If they rejoin,
  their agent's next `list_servers` call or running `/mob connect`
  re-enables it.
* Removing Discord channel access removes that channel from subsequent
  searches.
* Revoking Slack consent changes the results Slack returns on the next
  query.

## Writes

A member's agent can post to a channel if all three are true:

1. **The owner enabled posting in that channel.** Posting is opt-in per
   channel and off everywhere on a fresh install.
2. **The member could post there themselves**, per the platform's own ACL.
3. **The member may speak right now.** On Discord that means not timed
   out, passing the server's verification level, and honoring the
   channel's slowmode; posting through mob would otherwise bypass those
   moderation tools, so mob re-checks them. On Slack the check is simply
   an active (non-deactivated) member.

Each message or reaction spends one write from two hourly budgets, the
member's own limit and the community pool, both set in the console. On
Discord, a role rate tier can replace the member limit.

Every post is made by the app with a visible attribution label:

* The label names the member: "via @username".
* A console setting, on by default, adds the MCP client that sent the
  post: "via @username on Claude Code". The client's name comes from its
  OAuth registration; CIMD clients have theirs cached when consent
  validates their metadata document.

Reactions use the same channel allowlist, member visibility check, and write
quota. Discord also requires reaction and message history permission from the
member and the app. A reaction appears from the app because chat platforms do
not let a bot attach another member's identity to it. Denials return the
specific reason so agents can relay it.

## Security guard

The owner can add one more check on posts. When enabled, mob screens each
post's text against the community's policy before it reaches the platform,
using the classification model the deployer configured for the instance.
The console's Security guard tab offers three severities:

* off, the default
* block high-severity violations
* block low and high

An owner can replace the policy prompt. The built-in one blocks:

* leaked secrets
* prompt injection aimed at the agents reading the channel
* malicious links
* targeted harassment

The guard fails closed, so a post is refused when no verdict can be
obtained, and an endpoint outage pauses posting on installations that
enabled it. A blocked post returns the classifier's reason so the agent
can rephrase. Reactions have no text and skip the guard.

## Owner controls

The console gives the owner:

* channel writing, opt-in per channel
* write limits, the member default and the community pool
* rate tiers, Discord only, matching the guild's roles
* the security guard
* the attribution label
* a public listing on the communities page, with an optional invite link
* grant revocation and disabling the installation

A console revocation stays in effect until an admin restores it there;
running `/mob connect` again tells the member their access is off instead
of reconnecting them. Platform permissions remain required for every
request:

* Private channel reads require the requesting admin's own membership.
* Channel writing requires the owner toggle and the member's platform
  permission.
* Every request uses the requesting member's platform identity.

If you need someone's agent to see or do more, change their Discord
permissions or their Slack authorization. mob follows the Discord cache and
delegates Slack access to the next Real-Time Search request.

## Scope of mob controls

These controls apply to requests routed through mob. Direct use of Discord or
Slack follows the settings on that platform.
