Connect to the Slack Web API to manage channels, messages, users, reactions, and more.
- A Slack workspace
- A Bot token (
xoxb-...) or User token (xoxp-...)
{
"mcpServers": {
"slack": {
"command": "npx",
"args": [
"-y",
"anyapi-mcp-server",
"--name", "slack",
"--spec", "https://raw.githubusercontent.com/slackapi/slack-api-specs/master/web-api/slack_web_openapi_v2.json",
"--base-url", "https://slack.com/api",
"--header", "Authorization: Bearer ${SLACK_TOKEN}"
],
"env": {
"SLACK_TOKEN": "xoxb-your-bot-token"
}
}
}
}- Bot tokens (
xoxb-) are recommended. User tokens (xoxp-) give broader access but are tied to a specific user. - The token's scopes determine which API methods are accessible. Common scopes:
channels:read,chat:write,users:read. - The spec is sourced from Slack's official API specs repository.