Slack Messaging
Let an agent work in Slack through the Web API: find channels and people, read channel history and threads, open direct messages, post and edit messages, add reactions, and search messages. Curated from Slack's official OpenAPI specification.
Connect this API to an AI agent Browse all specs
What you can do with Slack Messaging via MCP
Every endpoint below becomes a governed tool your AI agent (Claude, ChatGPT, or a customer-facing VX agent) can call — with scoped permissions, sandbox testing, and audit logs.
| Method | Path | Operation | Description |
|---|---|---|---|
| GET | /conversations.list |
listConversations | List channels the token can see (public, private, DMs) |
| GET | /conversations.info |
getConversationInfo | Get details about one channel by id |
| GET | /conversations.history |
getConversationHistory | Read recent messages in a channel |
| GET | /conversations.replies |
getThreadReplies | Read all replies in a message thread |
| POST | /conversations.open |
openDirectMessage | Open (or find) a direct message with one or more users |
| GET | /users.list |
listUsers | List people in the workspace |
| GET | /users.info |
getUserInfo | Get a person's profile by user id |
| GET | /users.lookupByEmail |
lookupUserByEmail | Find a person by their email address |
| POST | /chat.postMessage |
postMessage | Send a message to a channel, DM or thread |
| POST | /chat.update |
updateMessage | Edit a message the app posted |
| POST | /reactions.add |
addReaction | Add an emoji reaction to a message |
| GET | /search.messages |
searchMessages | Search messages across the workspace (needs a user token) |
Authentication
slackToken
API key — sent as the Authorization header
Slack OAuth token, sent as Authorization: Bearer xoxb-....
How to get a credential
- Go to https://api.slack.com/apps and click Create New App > From scratch; pick the workspace.
- Open OAuth & Permissions and add the Bot Token Scopes from the table below.
- Click Install to Workspace (an admin may need to approve), then copy the Bot User OAuth Token (
xoxb-...). - Invite the bot to each channel it should read or post in (
/invite @your-app); bots only see channels they are members of. - Optional: for searchMessages add the User Token Scope
search:readand use the User OAuth Token (xoxp-...) instead, because search does not accept bot tokens.
Permissions used
| Scope | Operations |
|---|---|
channels:read, groups:read |
listConversations, getConversationInfo |
channels:history, groups:history |
getConversationHistory, getThreadReplies |
im:write |
openDirectMessage |
users:read |
listUsers, getUserInfo |
users:read.email |
lookupUserByEmail |
chat:write |
postMessage, updateMessage |
reactions:write |
addReaction |
search:read (user token) |
searchMessages |
Common errors
Slack usually answers HTTP 200 with ok: false and an error code: always check ok.
not_authed/invalid_auth(like a 401): missing or revoked token, or the token was sent without theBearerprefix.missing_scope(like a 403): add the scope named inneeded, then reinstall the app and copy the new token.not_in_channel/channel_not_found: invite the bot to the channel, or use the channel id (C...), not its name.invalid_arguments/invalid_blocks(like a 400): fix the named field.- HTTP 429
ratelimited: wait theRetry-Afterseconds before retrying.
Store the token as a VX Agents credential for this spec; never paste it into chat.
Usage guide
Setup
- Credential: a Bot User OAuth Token (
xoxb-...) with the scopes in the auth docs. Invite the bot to every channel it should read or post in. - searchMessages only works with a user token (
xoxp-..., scopesearch:read); with a bot token, find messages with getConversationHistory instead. - Worth pinning: the
channelid (C...) the agent posts to most, found once with listConversations.
Read and reply in a channel
- listConversations with
types=public_channel,private_channel,exclude_archived=true,limit=200to map channel names to ids. Followresponse_metadata.next_cursorwithcursoruntil it is empty. - getConversationHistory with
channelandlimit(andoldest/latestas Unix timestamps) to read recent messages. - getThreadReplies with
channeland the parent message'ststo read a thread. - Resolve people with lookupUserByEmail, getUserInfo or listUsers (user ids look like U...). Mention someone in text as
<@U123ABC>. - Draft the message and show it to the user with the target channel. After they confirm, call postMessage with
channel,text, andthread_tsto reply inside a thread instead of the channel. - updateMessage (
channel,ts,text) fixes a message the app posted; addReaction (channel,timestamp,namewithout colons, e.g.white_check_mark) acknowledges one.
Direct messages
openDirectMessage with users=U123ABC returns a DM channel id (D...); post to it with postMessage after the user confirms.
Good to know
- Every response has
ok. HTTP 200 withok: falseis an error: readerror(andneededfor missing_scope) and do not report success. tsis the message id (a string like1729050000.123456); keep it as a string.- Message text uses Slack mrkdwn:
*bold*,_italic_,<https://url|label>. - Most read methods are rate limited to about 50 calls per minute; postMessage to about 1 message per second per channel.
- Messages are seen by real people immediately: always confirm before postMessage or updateMessage. Deleting messages, file uploads and admin methods are intentionally not available.
How to use this spec
- Create a free VX Agents account (sandbox tools included).
- Open the marketplace and connect “Slack Messaging” to an agent.
- Expose it as an MCP server for Claude/ChatGPT, or chat with it directly.