# @mindstone/mcp-server-slack [![npm version](https://img.shields.io/npm/v/@mindstone/mcp-server-slack.svg)](https://www.npmjs.com/package/@mindstone/mcp-server-slack) [![License: FSL-1.1-MIT](https://img.shields.io/badge/License-FSL--1.1--MIT-blue.svg)](./LICENSE) Slack workspace MCP server — channels, messages, threads, reactions, users, files, bookmarks, and scheduled messages via the Slack Web API. *Multi-workspace Slack MCP. Host-driven OAuth, per-workspace credentials files on disk, and a security review on every release.* Permission errors include Slack's `needed` and `provided` scope names so the host can explain which permissions need a fresh sign-in. ## Status - **Version:** [0.3.11](./CHANGELOG.md) · [npm](https://www.npmjs.com/package/@mindstone/mcp-server-slack) - **Auth:** OAuth (host-orchestrated) ([`SLACK_CLIENT_SECRET`](./server.json)) - **Tools:** [39](./src/tools/) (messages, channels, threads, users, files, pins) - **Surface:** cloud-api - **Machine-readable:** [`STATUS.json`](./STATUS.json) ## Why this exists When we started building this connector, Slack had not yet released an official MCP server — that came later (announced February 2026, generally available April 2026). The community Slack MCPs available at the time each got parts of the job right, but none of them combined fast user-name lookups for small and medium workspaces, the correct mention format for modern Slack (most still used the deprecated `link_names=true`), support for more than one Slack workspace from the same user account, and tokens that stay on the user's own machine. Slack's [official server](https://docs.slack.dev/ai/slack-mcp-server/) now exists and is a fine choice for many use cases. We continue to maintain this one because the host application handles the login flow, each workspace has its own credentials file on disk under the user's control, and the connector goes through our own security review before each release. ## Example interaction > "Find the most recent message from Alice in #q3-planning and react with :eyes:." Tools the host calls: 1. `lookup_user_by_email` — resolves Alice's email to her Slack user ID. 2. `search_slack_messages` — searches `#q3-planning` for her most recent message, returning the channel + timestamp. 3. `add_slack_reaction` — adds the `eyes` reaction to that message. Response (trimmed): ```json { "match": { "channel": "C08X...", "ts": "1715953812.004200", "user": "U07Z...", "text": "Pushed the updated forecast to the doc, ready for review." }, "reaction": { "ok": true, "name": "eyes" } } ``` ## Requirements - Node.js 20+ - npm - A host application that performs the Slack OAuth flow and writes per-workspace token files to `${SLACK_CONFIG_PATH}/workspaces/{teamId}.json`. This server reads those files; it does not initiate OAuth itself. ## One-click install [![Add to Cursor](https://img.shields.io/badge/Add_to_Cursor-black?style=for-the-badge&logo=cursor&logoColor=white)](cursor://anysphere.cursor-deeplink/mcp/install?name=Slack&config=eyJ0eXBlIjoic3RkaW8iLCJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBtaW5kc3RvbmUvbWNwLXNlcnZlci1zbGFjayJdLCJlbnYiOnsiU0xBQ0tfQ09ORklHX1BBVEgiOiIiLCJTTEFDS19URUFNX0lEIjoiIiwiU0xBQ0tfQ0xJRU5UX1NFQ1JFVCI6IiIsIlNMQUNLX1JFUVVFU1RfVElNRU9VVF9NUyI6IjYwMDAwIiwiU0xBQ0tfTUFYX1JFVFJJRVMiOiIyIn19) [![Add to VS Code](https://img.shields.io/badge/Add_to_VS_Code-007ACC?style=for-the-badge&logo=visual-studio-code&logoColor=white)](vscode:mcp/install?%7B%22name%22%3A%22Slack%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40mindstone%2Fmcp-server-slack%22%5D%2C%22env%22%3A%7B%22SLACK_CONFIG_PATH%22%3A%22%22%2C%22SLACK_TEAM_ID%22%3A%22%22%2C%22SLACK_CLIENT_SECRET%22%3A%22%22%2C%22SLACK_REQUEST_TIMEOUT_MS%22%3A%2260000%22%2C%22SLACK_MAX_RETRIES%22%3A%222%22%7D%7D) [![Add to VS Code Insiders](https://img.shields.io/badge/Add_to_VS_Code_Insiders-24bfa5?style=for-the-badge&logo=visual-studio-code&logoColor=white)](vscode-insiders:mcp/install?%7B%22name%22%3A%22Slack%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40mindstone%2Fmcp-server-slack%22%5D%2C%22env%22%3A%7B%22SLACK_CONFIG_PATH%22%3A%22%22%2C%22SLACK_TEAM_ID%22%3A%22%22%2C%22SLACK_CLIENT_SECRET%22%3A%22%22%2C%22SLACK_REQUEST_TIMEOUT_MS%22%3A%2260000%22%2C%22SLACK_MAX_RETRIES%22%3A%222%22%7D%7D) After clicking the button, your host will prompt you to fill: `SLACK_CONFIG_PATH`, `SLACK_TEAM_ID`, `SLACK_CLIENT_SECRET`, `SLACK_REQUEST_TIMEOUT_MS`, `SLACK_MAX_RETRIES`.
Manual config for Claude Desktop / Claude Code / Goose / Continue.dev (Slack) ```json { "mcpServers": { "Slack": { "command": "npx", "args": [ "-y", "@mindstone/mcp-server-slack" ], "env": { "SLACK_CONFIG_PATH": "", "SLACK_TEAM_ID": "", "SLACK_CLIENT_SECRET": "", "SLACK_REQUEST_TIMEOUT_MS": "60000", "SLACK_MAX_RETRIES": "2" } } } } ```
## Quick Start ### Install & build ```bash cd /connectors/slack npm install npm run build ``` ### npx (once published) ```bash npx -y @mindstone/mcp-server-slack ``` ### Local ```bash node dist/index.js ``` ## Configuration This server is designed to run alongside a host application that performs the Slack OAuth flow on its own. The host writes credentials to disk; this server reads them. ### Required environment variables - `SLACK_CONFIG_PATH` — Path to the Slack config directory (host-managed). Contains `config.json` (workspace metadata) and `workspaces/{teamId}.json` (per-workspace tokens, mode 0600). - `SLACK_TEAM_ID` — Workspace team ID (per-workspace instance). ### Optional environment variables - `SLACK_CLIENT_ID` — OAuth Connected App client ID. Only needed to refresh a *rotating* token. Saved non-rotating tokens authorize the Slack API directly without it. When a refresh is required but this is absent, the server fails loud with `REFRESH_NO_CLIENT_CREDENTIALS` and directs the host to re-authenticate. - `SLACK_CLIENT_SECRET` — OAuth Connected App client secret. Same conditions as `SLACK_CLIENT_ID`. - `SLACK_DISABLE_REFRESH` — Set to `1` to disable token refresh on this surface. The server will fail-closed with a structured `auth_required` response on token expiry instead of attempting an `oauth.v2.access` refresh. Use this on the cloud surface so desktop remains the sole refresh authority and avoids racing for single-use refresh tokens. - `SLACK_REQUEST_TIMEOUT_MS` — Override the default 60s upstream timeout. Must be a positive integer ≤ 300000 (5 minutes). - `SLACK_MAX_RETRIES` — How many times a Slack call is retried after a network error or server error (default 2, range 0-20). Waits between attempts start at 1 second and double, capped at 5 seconds. A rate limit (HTTP 429) is never retried silently: the tool answers at once with `code: 'rate_limited'`, `next_step: 'retry_after_delay'` and `retry_after_seconds` from Slack's Retry-After header. - `SLACK_RENEWAL_COORDINATOR_STATE` — Optional host feature: path to a regular JSON file containing `{ "port": 12345, "token": "host-issued-secret" }`. Enables the renewal protocol below. Leave unset for independent refresh, as usual. - `MCP_WORKSPACE_PATH` — Directory that `upload_slack_file` reads are constrained to for standalone clients, including clients that do not negotiate `files/readModes` version 1. For these clients, paths outside it (including symlinks pointing outside) are refused. Defaults to the system temp dir when unset. With negotiated version 1, the host selects a mode for each call: in central mode, input reads use only the host-authorized canonical path described under [Host-authorized local inputs](#host-authorized-local-inputs); in standalone mode, the standalone restrictions apply. ### Optional host renewal coordinator Hosts that share rotating tokens between computers can coordinate renewal through an authenticated local service. Set `SLACK_RENEWAL_COORDINATOR_STATE` before starting the connector; protect the state file as a credential. The connector reads it on each request, POSTs JSON to `http://127.0.0.1:/credentials/renewal` with `Authorization: Bearer `, refuses redirects, and waits up to 35 seconds for each reply. A missing, unsafe or unreadable state file, invalid response or unreachable service means **wait**, never an independent refresh. Existing access tokens remain usable until expiry; subsequent tool calls retry automatically. `SLACK_DISABLE_REFRESH` still takes precedence. Each grant has identity `{ "provider": "slack", "relativePath": "workspaces/.json#bot" }` or the same path ending in `#user`. These suffixes select fields within one credentials file; they are not filesystem paths. Token sets use `{ accessToken, refreshToken, expiresAt }`, with expiry in Unix milliseconds (or `null` for no known expiry). A rotation checks its own slot and the shared app credentials for replacement. Changes to the other slot are preserved when saving the rotation. A `wait` uses a still-valid access token without rewriting the credentials file. If `current` omits a refresh token, the slot keeps its existing one. - Admission: `{ op: "beforeRefresh", grant: { identity, tokens, opId } }`. The UUID `opId` is retained across lost replies until admission is resolved. Replies wrap the result as `{ success: true, result: ... }`. Results are `{ kind: "current", tokens }`, `{ kind: "permit", permit, tokens }`, `{ kind: "wait" }`, `{ kind: "needs_re_sign_in" }` or `{ kind: "legacy" }`. A permit is `{ grantId, epoch, revision, opId }`; the connector uses its supplied refresh token. `current` installs the coordinator's tokens without contacting Slack. `legacy` explicitly selects independent refresh; with a coordinator configured, that refresh still checks only its own slot and the shared app credentials, like a coordinated rotation. - Completion: `{ op: "publishRefresh", identity, publication: { ...permit, outcome } }`. Outcomes are `{ kind: "success", tokens }` (saved to the credentials file first), `{ kind: "rejected" }` (Slack rejected authentication), `{ kind: "uncertain" }` (dispatch may have rotated tokens but no usable answer arrived) or `{ kind: "not_dispatched" }` (no dispatch, or a definite HTTP 4xx refusal such as rate limiting). Results are `"published"`, `"wait"`, `"needs_re_sign_in"`, `"conflict"` or `"invalid"`. A `wait` admission may include `publication: { ...permit, outcome }` to settle an admission whose reply was lost. Pending outcomes are retried before another refresh; `conflict` and `invalid` stop retrying that publication and return a transient error. When a publication is owed, requests with a still-valid access token return it immediately and retry publication in the background, with at most one publication in flight per slot. Requests that need a refresh wait for that publication before seeking another permit. A failed background retry is logged; it does not delay a request that can use its current token. Hosts must coordinate all renewers of these grants and fence permissions by epoch, revision and operation ID. The connector retains retry state in memory for its lifetime; the host owns durable renewal recovery across process restarts. A success publication is acknowledged only after the host has recorded the outcome. No tokens are logged by this protocol. ### Authentication flow The host calls the `authenticate_slack_workspace` tool. The OSS server returns a structured `auth_required` response of the form: ```json { "status": "auth_required", "user_action": { "id": "slack.connect_workspace", "label": "Connect Slack", "instruction": "Click \"Connect Slack\" in the side panel to authorise the workspace." }, "agent_action": { "instruction": "Tell the user to click the Connect Slack button in the connector settings to authorise. Then call list_slack_workspaces to verify." }, "setupToolName": "authenticate_slack_workspace" } ``` The host's MCP service recognises this shape and dispatches to its registered Slack OAuth orchestrator (the desktop browser flow). Once the user signs in, the host writes tokens to `${SLACK_CONFIG_PATH}/workspaces/{teamId}.json` and the server picks them up on the next call. The OSS server **never** initiates OAuth itself. ## Host configuration examples This server is designed for host-orchestrated OAuth: the host writes per-workspace token files to disk and the server reads them. The examples below show the env shape — your host application is responsible for populating `${SLACK_CONFIG_PATH}/workspaces/{teamId}.json` before tool calls succeed. ### Claude Desktop / Cursor ```json { "mcpServers": { "Slack": { "command": "npx", "args": ["-y", "@mindstone/mcp-server-slack"], "env": { "SLACK_CONFIG_PATH": "/absolute/path/to/slack-config", "SLACK_TEAM_ID": "T0123ABCD", "SLACK_CLIENT_ID": "your-slack-app-client-id", "SLACK_CLIENT_SECRET": "your-slack-app-client-secret" } } } } ``` Until the host has written `${SLACK_CONFIG_PATH}/workspaces/T0123ABCD.json` for that team, every tool call returns a structured `auth_required` response (see the Authentication flow above). ### Local development (no npm publish needed) ```json { "mcpServers": { "Slack": { "command": "node", "args": ["/connectors/slack/dist/index.js"], "env": { "SLACK_CONFIG_PATH": "/absolute/path/to/slack-config", "SLACK_TEAM_ID": "T0123ABCD", "SLACK_CLIENT_ID": "your-slack-app-client-id", "SLACK_CLIENT_SECRET": "your-slack-app-client-secret" } } } } ``` ## People reads and authorization `list_slack_users`, `get_slack_user_profile`, `lookup_user_by_email`, message name enrichment and the profile shown by `open_slack_dm` use user authorization first. If it is absent or refused for authorization, scope or token-type reasons, the read may try bot authorization once. A retry starts the read again, including pagination and username resolution. Neither authorization can supply permissions it was not granted; email lookup still needs `users:read.email`. If obtaining user credentials reports `TOKEN_PERSIST_FAILED`, these reads try once more to obtain credentials for user authorization before starting the Slack API read. If the retry fails or finds no user credentials, the read ends without trying bot authorization. Other operational errors do not trigger authorization fallback. If refreshing the user token fails for a temporary reason (`REFRESH_TRANSIENT`, `REFRESH_RATE_LIMITED`, `REFRESH_MALFORMED_RESPONSE`) or because client credentials are absent (`REFRESH_NO_CLIENT_CREDENTIALS`), reads use bot authorization. A tool that needs user authorization returns that code instead of treating the person as never connected: after `REFRESH_TRANSIENT` or `REFRESH_RATE_LIMITED` it says to retry after a delay (`next_step: 'retry_after_delay'`); the other two keep their existing reconnect guidance. Writes keep their identity: opening a DM uses user authorization once, and `send_myself_a_note` uses only bot authorization. If Slack refuses the app's authorization, the app cannot send you a notification even while other Slack actions still work. Reconnecting may restore it. `list_slack_workspaces` tests bot and user authorization independently with `auth.test`. `connected` means at least one passed; `tokenHealth.botToken` and `tokenHealth.userToken` report each result separately (`valid`, `refused`, `unavailable`, or `missing` / `not_configured`). Having a saved token does not establish that Slack accepts it. When no probe passes and at least one is unavailable, follow the retry/status guidance rather than reconnecting immediately. Confirmed expiry with refresh disabled still requires authentication. The Slack API error classifier preserves the four canonical refusal strings `invalid_auth`, `token_expired`, `token_revoked` and `account_inactive` byte-for-byte as `code`, alongside recovery guidance and `next_step`. Existing API error normalizations include `ratelimited` → `rate_limited`, `not_allowed_token_type` → `missing_scope`, and `users_not_found` → `user_not_found`. Other Slack API error strings pass through unchanged as `code`. Refresh refusals use the provider's `REFRESH_AUTH_REJECTED` code with the upstream string in extra data (`slack_error_code`). The final tool response shape depends on the tool, including existing `auth_required` responses. For the people tools and enrichment helpers named above, DM opening and `send_myself_a_note`, errors include `token_role` (`user` or `bot`) when the attempted role is known, including operational credential-acquisition errors. Structured acquisition failures keep their existing recovery shape. Each token request reads the token file. If a permission or disk error prevents that read, bot and user token requests can use the requested role's cached credentials already held in memory, including unsaved refresh results, only when that token exists and does not need refreshing. Such a request neither saves nor refreshes credentials. Metadata access still reports file-read errors. A confirmed missing file clears the cached connection, and invalid JSON is reported as corrupt. A token file that is a symbolic link or not a regular file is refused rather than followed: loading that workspace's tokens reports `TOKEN_FILE_UNREADABLE` (with `next_step: 'authenticate_slack_workspace'`), while listing workspaces skips the refused file and reports `WORKSPACE_DIR_ALL_CORRUPT` only if no workspace's token file is readable. Remove the link or special file itself, not what it points to, and reconnect Slack. New credentials returned by a refresh remain cached if saving fails. The first failed save reports `TOKEN_PERSIST_FAILED`; each subsequent token request that can read the file retries the atomic save. Repeated failures are logged while healthy cached credentials remain usable. Unchanged credentials on disk do not overwrite newer tokens held in memory. Changes to formatting, timestamps and noncredential host fields preserve the fresh credentials and use the latest host metadata. Different readable credentials replace the cached connection, and confirmed deletion clears it, including after an in-flight refresh. Each role's refresh completion merges its fields into the current cache. After a successful refresh, the provider re-reads the token file to check that the connection has not changed before saving. If this read fails, the fresh credentials stay in memory, the file error propagates, and no save is attempted until a later request can check the connection. Another process may still change the file between this check and the write. Restarting before a successful save can still lose unsaved credentials. File downloads preserve credential-acquisition errors and keep the metadata request's credential role without replaying under another role. ## Tools (39) ### Authentication - `authenticate_slack_workspace` — Returns structured auth_required response; the host drives OAuth. - `list_slack_workspaces` — Check Slack connection status (connected, token health, near-expiry). ### Messages - `search_slack_messages` — Search across all channels (Slack search modifiers supported). `query` may be left out when `to_me`, `after` or `before` is given; a call with none of them is refused. Uses Slack's Real-Time Search API (`assistant.search.context`) when the connected app holds the granular `search:read.*` scopes; otherwise falls back to legacy `search.messages`, whose results are equally complete. The response records which backend ran in `search_backend`; that field is diagnostic only and the fallback is not narrated to the user, because enabling the Real-Time Search path is an app-configuration change rather than anything the person asking can do. The fallback is cached per workspace only for installation-scoped refusals (`missing_scope`, `not_allowed_token_type`, `feature_not_enabled`, endpoint-deprecation codes) — a resource-specific `access_denied` surfaces as an ordinary error and RTS is retried on the next call. - `get_slack_saved_messages` — Get messages saved for later (uses `is:saved`). Same search-backend reporting as `search_slack_messages`. - `get_slack_message_by_link` — Retrieve a message from its permalink URL. - `compose_slack_message` — Open an inline editable compose form before sending; the form posts via `post_slack_message` when the user clicks Send. - `post_slack_message` — Post a message. Self-DMs are blocked and redirected to `send_myself_a_note` (a user-token self-DM never notifies). - `reply_to_slack_thread` — Reply to an existing thread. - `schedule_slack_message` — Schedule a message for the future. Self-DMs are blocked (scheduled self-notes are not supported yet). - `list_scheduled_slack_messages` — List pending scheduled messages (optionally per channel), with the IDs needed to cancel them. - `delete_scheduled_slack_message` — Cancel a scheduled message before it posts. - `update_slack_message` — Edit a message you posted. - `delete_slack_message` — Permanently delete a message you posted. - `send_myself_a_note` — Send yourself a note that actually notifies you (posts a DM from the bot to the authenticated user). Use this for "jot something down" / reminders instead of a user-token self-DM. Direct messages name the person, not the DM: `post_slack_message`, `schedule_slack_message`, `upload_slack_file` (`channel`) and `compose_slack_message` (`target`) take the recipient's user ID or email and open their DM with the account that sends. A DM channel ID (`D…`) on its own is refused (compose always refuses one); the send tools accept it with `intended_recipient` only if it is that person's DM, and a mismatch names nobody. Several people, comma-separated (`U111,U222,carol@example.com`), go to one group DM with all of them, opened by the account that sends. Every person must be found or nothing is sent; you and repeats are left out, and one person left is an ordinary DM. Slack allows up to 8 people besides you; more are refused with a pointer to a channel. With `intended_recipient`, it must name the same people. Text sent as you (`post_slack_message`, `reply_to_slack_thread`, `schedule_slack_message`, `update_slack_message`, and the `upload_slack_file` comment) writes a mention of the connector's own bot user as plain `@name` text when the workspace record has a bot user ID, so a host that listens for your mentions of its bot is not retriggered by its own replies. Other users' mentions are sent unchanged. A workspace record can describe a personal app: `appKind: "own"` with its own `appId`, `clientId`, `clientSecret` and `appName`. Then thread replies post as that app's bot, and token refresh uses the record's `clientId`/`clientSecret` pair instead of `SLACK_CLIENT_ID`/`SLACK_CLIENT_SECRET`. If the bot is not in the channel, the reply is posted as you and the tool result says so, with a hint to invite the app. Records without `appKind` behave as before: replies are sent as you. ### Compose send status Compose results declare the exact Send action in `_meta.ui.send`. When the host attributes a sent draft, an unchanged card shows "Sent by your assistant". If you edited it, the card says "Your assistant sent the original version" and keeps your edits and Send available. In hosts that remember send status, sending a message closes its other compose copies. Reloaded cards show "Message sent" with the send time and hide Reopen because they do not have the sent contents. The copy used to send keeps its posted contents in a read-only sent view, including when confirmation follows a lost reply. After an error or block reply, a later sent status from another copy shows only the sent bar, without this copy's contents. While a send is in progress, other copies show “Sending…” with Send, Retry, Cancel and Save draft (where available) disabled. Replies to this copy’s own requests keep those controls locked until the other send ends. If the send ends without a confirmed outcome, those copies return to editing and keep any earlier uncertainty. A copy waiting for its own Send reply keeps its sending view. Sent views stay read-only, and uncertainty remains until a send is confirmed. After an error or missing confirmation, check whether the message was sent before using Retry; the notice stays visible while editing and returns on Reopen. Collapsing the card does not resolve that uncertainty. Policy-block explanations stay visible while editing with Send disabled. Cancel says "Nothing sent" only when no send may have gone through, including a `not-dispatched` failure before the request left the device. When sending is blocked by your settings, your organization or security policy, the card hides Retry and keeps Cancel. If the server is stopped, Retry remains available. Send requests declare `_meta: { 'mcp-app/cardOutcome': 'sent' }` to supporting hosts. ### Channels - `list_slack_channels` — List channels (filterable, paginated). - `get_slack_channel_history` — Get recent messages from a channel. - `create_slack_channel` — Create a new channel (public or private). - `mark_slack_channel_as_read` — Mark messages read up to a timestamp. - `get_slack_unread_messages` — Get unread messages based on your read position. - `invite_user_to_channel` — Add users to a channel (bulk). ### Threads - `get_slack_thread_replies` — Get all replies in a thread. ### Reactions - `add_slack_reaction` — Add an emoji reaction to a message. - `remove_slack_reaction` — Remove your own reaction from a message. - `list_slack_emoji` — List the workspace's custom emoji (name → URL/alias, both wrapped in `` envelopes). Entries that violate Slack's emoji name/value constraints are dropped and reported (`omitted_invalid_entries`), never forwarded. ### Pins - `list_slack_pins` — List messages pinned in a channel. - `pin_slack_message` — Pin a message to a channel. - `unpin_slack_message` — Remove a message from a channel's pinned items (the message itself is not deleted). ### Users - `list_slack_users` — List active users (auto-paginates name filter). - `get_slack_user_profile` — Get detailed profile for a user. - `lookup_user_by_email` — Find a user by exact email (preferred resolution method). - `open_slack_dm` — Open a DM with a user (returns DM channel + verified recipient identity). ### Files - `download_slack_file` — Download a file attachment by ID or URL. - `upload_slack_file` — Upload a local file (race-free reads, workspace-constrained for standalone clients; max 50MB) and optionally share it to a channel or thread. Uses the 3-step external upload flow. ### Workspace - `add_slack_bookmark` — Add a bookmark to a channel. - `list_slack_bookmarks` — List a channel's bookmarks. - `add_slack_reminder` — \[EXPERIMENTAL\] Create a reminder (Slack API partially deprecated; prefer `schedule_slack_message`). - `list_slack_reminders` — \[EXPERIMENTAL\] List your reminders. - `complete_slack_reminder` — \[EXPERIMENTAL\] Mark a reminder complete. - `delete_slack_reminder` — \[EXPERIMENTAL\] Permanently delete a reminder. ## Security notes - **Slack-owned download URL guard** — `download_slack_file` validates that the Slack-supplied `url_private_download` is HTTPS and on `slack.com` / `*.slack.com` before attaching the workspace bearer token. The download helper also sets `redirect: 'manual'` and re-validates every redirect hop, so a 302 from a compromised Slack edge to an attacker-controlled host can never replay the bearer token (added in 0.1.3 to close finding `slack-010`). - **Untrusted-content envelopes** — every tool that returns external text wraps it in `…` envelopes per AGENTS.md invariant #6, with close-tag breakout escaping. This applies to message text, channel topics/purposes, search results, thread replies, unread messages, and downloaded file content/names. Hosts must keep the envelopes intact when surfacing tool output to the model (added in 0.1.3 to close findings `slack-001..007`). - **Atomic, durable token persistence** — token files are written via temp-file + `fsync` + `rename`, then `chmod 0600`, so a crash mid-write cannot lose Slack's single-use refresh token. - **Refresh-failure differentiation** — transient network errors, HTTP 429 rate-limits, Slack auth rejections (`invalid_grant`), and malformed responses produce distinct error codes so hosts can react correctly without retrying unrecoverable failures. - **No host-internal vocabulary** — host-side bridge identifiers and bundled HTTP paths are explicitly absent from the published artefact (enforced by `scripts/check-no-bridge-strings.sh` during `prepublishOnly`, and by `scripts/check-internal-refs.mjs` — also run as `npm run security:internal-refs` — which additionally rejects internal issue-tracker references in `src/` and `dist/`). - **Race-free upload source reads** — In standalone mode, `upload_slack_file` validates the source path inside the workspace; when a host that negotiates `files/readModes` version 1 selects central mode for the call, it uses only the host-authorized canonical path described under [Host-authorized local inputs](#host-authorized-local-inputs). In every mode, it opens the approved path once (no-follow, non-blocking), enforces regular-file-only and the 50MB cap via `fstat` on the opened descriptor, re-verifies the descriptor's dev+inode against a fresh resolution of the approved path (defeats post-validation replacement, including swapped ancestor directories), and reads the bytes through the descriptor with the cap enforced on what is actually read. - **Envelope parity on add-paths** — `add_slack_bookmark` and `add_slack_reminder` envelope the Slack-returned title/text exactly like the list paths, with close-tag breakout escaping. Full implementation-level notes (request-timeout composition, MSW request manifest, token-file error states, server-version drift checks, etc.) live in [`docs/connectors/slack-cohort-hygiene.md`](../../docs/connectors/slack-cohort-hygiene.md). ## Live probe A live probe gate is committed at `test/live-probe.ts`. It is **not** auto-run; trigger it manually: ```bash LIVE_PROBE_BOT_TOKEN=xoxb-... \ LIVE_PROBE_USER_TOKEN=xoxp-... \ LIVE_PROBE_TEAM_ID=T... \ npm run probe:live ``` The probe runs against the packed tarball (not the workspace source), exercising `initialize` + `tools/list` + 5 read-only + 2 write tool calls, and logs `search.messages` P95 latency to validate the 60s timeout default. By default the probe is **read-only**: write probes (`post_slack_message`, `add_slack_reaction`) only run when `LIVE_PROBE_TEST_CHANNEL_ID` is set, otherwise they are skipped and the probe still exits OK. ### Publish-gate mode For pre-publish certification, run: ```bash LIVE_PROBE_BOT_TOKEN=xoxb-... \ LIVE_PROBE_USER_TOKEN=xoxp-... \ LIVE_PROBE_TEAM_ID=T... \ LIVE_PROBE_TEST_CHANNEL_ID=C... \ npm run probe:live:gate ``` `probe:live:gate` sets `LIVE_PROBE_REQUIRE_WRITES=1`, which causes the probe to **fail** rather than skip if `LIVE_PROBE_TEST_CHANNEL_ID` is missing or any write probe doesn't complete cleanly. Use this before cutting a release. ## Licence [FSL-1.1-MIT](./LICENSE) — Functional Source License, Version 1.1, with MIT future licence. The software converts to MIT licence on 2030-04-08. ### Host-authorized local inputs `files/readModes` version 1 is an experimental extension used by these connectors, not part of the MCP standard. A compatible host (the app running the connector) decides which input files a tool call may read. The connector opens only the host-approved physical path, after resolving symlinks. The host supplies this permission information with each call; it is not a tool argument you need to set. Missing or invalid permission information, or a file absent from the approved list, stops the read. Clients that do not negotiate this extension keep the connector's existing standalone file restrictions. This extension changes input-read permissions; existing output destinations, upload formats, size limits and file checks apply.