Slack MCP Server avatar

Slack MCP Server

Pricing

Pay per usage

Go to Apify Store
Slack MCP Server

Slack MCP Server

MCP server for Slack workspaces. Read channel history, search messages, fetch thread replies, list users and channels, and post messages. Supports OAuth, Bot, and browser token authentication. Based on korotovsky/slack-mcp-server with 600+ GitHub stars.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

CQ

CQ

Maintained by Community

Actor stats

0

Bookmarked

5

Total users

0

Monthly active users

20 days ago

Last modified

Share

A Slack integration Actor exposing Model Context Protocol (MCP) style tools for Slack workspaces. Read channel history, fetch threads, search messages, list channels and users, and (optionally) post messages — all via a single action input, with results written to the Actor dataset.

Apify Actor License: MIT


Overview

This Actor is a standalone TypeScript implementation that calls the Slack Web API directly. Each run executes one tool (selected by the action input) and pushes the results to the Actor's dataset, with a run summary stored in the key-value store under OUTPUT.

Tool names follow the community Slack MCP convention (conversations_history, conversations_replies, etc.) so the Actor is easy to slot into MCP-oriented automations, but it is not a wrapper around any third-party server.

At a glance

5 toolsconversations_history, conversations_replies, conversations_add_message, conversations_search_messages, channels_list
2 resource listingslist_users, list_channels
3 auth modesOAuth user token (xoxp), Bot token (xoxb), Browser tokens (xoxc + xoxd)
Flexible limitsTime-based (1d, 7d, 1m) or count-based, depending on the tool
Safe by defaultMessage posting is disabled unless explicitly enabled

If you run the Actor without a token, it does not fail — it returns a server_info capability record (list of tools and auth modes) to the dataset and OUTPUT so you can inspect what it does before authenticating.


Quick Start

1. Get a Slack token

Option A — OAuth user token (recommended, full access)

  1. Go to api.slack.com/apps and create/select an app.
  2. Open OAuth & Permissions and add the scopes you need, e.g. channels:history, channels:read, groups:read, users:read, search:read, and chat:write (only if posting).
  3. Install to the workspace and copy the User OAuth Token (starts with xoxp-).

Option B — Bot token

  • Use a Bot token (xoxb-) for automated integrations.
  • Note: bot tokens cannot search messages (Slack's search.messages requires a user token).

Option C — Browser tokens (stealth)

  1. Open Slack in a browser and press F12.
  2. Application → Cookies → copy the d cookie value → use as xoxdToken.
  3. In the Console run:
    JSON.parse(localStorage.localConfig_v2).teams[Object.keys(JSON.parse(localStorage.localConfig_v2).teams)[0]].token
  4. Copy the xoxc-* value → use as xoxcToken. Both xoxc and xoxd are required together.

2. Run the Actor

{
"authMode": "oauth",
"xoxpToken": "xoxp-your-token-here",
"action": "conversations_history",
"channelId": "#general",
"limit": "7d"
}

Tools

The action field selects which tool runs. channelId accepts a channel ID (C01234567), #channel-name, @username (opens a DM), or a bare channel name.

conversations_history

Retrieve messages from a channel or DM.

  • channelId (required) — channel ID or name
  • limit — time range (1d, 7d, 1m) or a message count. Default 1d
  • includeActivityMessages — include join/leave/topic messages (default false)

conversations_replies

Get the replies in a thread.

  • channelId (required) — channel containing the thread
  • threadTs (required) — parent message timestamp (e.g. 1234567890.123456)
  • limit — message count (numeric only for this tool)
  • includeActivityMessages — default false

conversations_search_messages

Search messages across the workspace. Requires an OAuth (xoxp) or browser token — not a bot token.

  • searchQuery — text to search for (defaults to * if omitted)
  • filterInChannel — restrict to a channel
  • filterFromUser — messages from a user
  • filterWithUser — conversations with a user
  • filterDateAfter / filterDateBeforeYYYY-MM-DD range
  • filterThreadsOnly — only threaded messages (default false)
  • limit — max results (default 20)

channels_list

List channels in the workspace.

  • channelTypes — comma-separated types (default public_channel,private_channel)
  • sortBydefault or popularity (by member count). Default default
  • limit — max results (default 100, capped at 999)

conversations_add_message

Post a message to a channel or thread. Disabled unless enableMessagePosting is true.

  • channelId (required) — target channel
  • messageText (required) — message content
  • threadTs — optional; reply in a thread
  • messageContentTypetext/markdown (default) or text/plain
  • allowedPostingChannels — optional comma-separated whitelist of channel IDs

Resource listings

ActionPurpose
list_usersList all (non-deleted) users in the workspace (id, name, real name, display name, email, bot/admin flags, timezone)
list_channelsList channels including public, private, IM and MPIM conversations

Input Reference

ParameterTypeDefaultNotes
actionstring (enum)channels_listRequired. Tool to run (see above)
authModestring (enum)oauthoauth, bot, or browser
xoxpTokenstring (secret)User OAuth token (OAuth mode)
xoxbTokenstring (secret)Bot token (Bot mode)
xoxcTokenstring (secret)Browser token (Browser mode)
xoxdTokenstring (secret)Browser d cookie; required with xoxc
channelIdstringChannel ID / #name / @user / bare name
threadTsstringThread timestamp for replies
limitstring1dTime range or count (tool-dependent)
channelTypesstringpublic_channel,private_channelFor channels_list
sortBystring (enum)defaultdefault or popularity
searchQuerystringSearch text
filterInChannelstringSearch: restrict to channel
filterFromUserstringSearch: from a user
filterWithUserstringSearch: with a user
filterDateAfterstringSearch: after YYYY-MM-DD
filterDateBeforestringSearch: before YYYY-MM-DD
filterThreadsOnlybooleanfalseSearch: only threads
messageTextstringMessage body (posting)
messageContentTypestring (enum)text/markdowntext/markdown or text/plain
enableMessagePostingbooleanfalseMust be true to post
allowedPostingChannelsstringWhitelist of channel IDs for posting
includeActivityMessagesbooleanfalseInclude join/leave/topic messages
proxyUrlstringProxy URL (accepted in input)
logLevelstring (enum)infodebug, info, warn, error

Output

Results are written to two storages:

  • Dataset — one item per result (message, channel, or user), each annotated with the action that produced it and a _timestamp. See the dataset schema for the full field list and the Messages / Channels / Users views.
  • Key-value store OUTPUT — a run summary: success, action, resultCount, hasMore, cursor, and a human-readable summary (or success: false with an error message on failure).

Example dataset items

Message:

{
"action": "conversations_history",
"channelId": "C01234567",
"user": "U01234567",
"text": "Message content here",
"timestamp": "1234567890.123456",
"thread_ts": "1234567890.123456"
}

Channel:

{
"action": "channels_list",
"id": "C01234567",
"name": "general",
"topic": "General discussion",
"memberCount": 150
}

Use Cases

Use CaseDescription
AI/agent Slack accessGive an AI agent read (and optional write) access to a workspace via MCP-style tools
Channel analyticsExport message history for analysis
Search automationFind messages matching specific criteria
ArchivalSave channel history and search results to Apify datasets
NotificationsPost automated updates to allow-listed channels

Safety Features

  • Message posting disabled by default — must set enableMessagePosting: true.
  • Channel whitelist — restrict posting to specific channel IDs with allowedPostingChannels.
  • Secret inputs — tokens are marked secret and are only used during the run.
  • Activity filtering — join/leave/topic messages are filtered out unless includeActivityMessages is set.

Limitations

  • A valid Slack token is required to perform any operation. Without a token the Actor returns only its capability info. Each tool needs the corresponding scopes (e.g. channels:history, channels:read, groups:read, users:read, search:read, chat:write).
  • Bot tokens cannot searchconversations_search_messages requires an OAuth (xoxp) or browser token; using a bot token returns a clear error.
  • Browser tokens expirexoxc/xoxd values are session-bound and must be re-extracted periodically; both are required together.
  • Posting is gatedconversations_add_message fails unless enableMessagePosting is true, and is further restricted by allowedPostingChannels when set.
  • Private channels and DMs require the token's identity to be a member.
  • Slack rate limits apply — Slack tiers its Web API methods; large workspaces may require paginating with the returned cursor.
  • Single tool per run — this Actor is request/response: one action executes per run and results go to the dataset. It is not a persistent/standby MCP transport and does not hold an open stdio/HTTP MCP session.

Pricing

This Actor runs on the Apify platform and consumes standard platform resources (compute units and, if configured, proxy). You are billed according to your Apify plan's usage-based pricing; there are no additional per-result fees from the Actor itself.


Resources


License

MIT License.