All integrations
Get an API key
Slack
Post messages, read channels and search history in Slack.
Communication
How an agent reaches it
MCPREST APICLI
How you authenticate
API key
OAuth
- Create a Slack app at api.slack.com/apps for your own workspace.
- Under OAuth and Permissions, add the bot scopes you need (chat:write, channels:read, channels:history).
- Install the app to the workspace and copy the Bot User OAuth Token (starts with xoxb-).
- Invite the bot to any private channel you want it to read. Slack returns not_in_channel otherwise.
Connection details
- Base URL
- https://slack.com/api
- Pagination
- cursor
- Rate limit
- Tiered per method, roughly 1 to 100 per minute. 429 carries Retry-After.
Common endpoints
| verify the token | POST /auth.test |
| post a message | POST /chat.postMessage |
| list channels | GET /conversations.list?types=public_channel |
| read channel history | GET /conversations.history?channel=C123 |
| search messages | GET /search.messages?query={q} |
Worth knowing
- Slack answers 200 with {ok:false, error:"..."} on failure. A 200 is NOT success; always read `ok`.
- Posting to a private channel needs the bot invited to it, otherwise error is not_in_channel.
- chat.postMessage takes application/json; several older methods only accept form encoding.
- Channel IDs (C…) are stable; names are not, and renaming breaks anything that stored a name.