Configure Slack channel tokens (bot token + app-level token)
Configure the Slack channel MCP plugin by providing your Slack bot token and app-level token. Writes credentials to a secure .env file with owner-only permissions.
xoxb-...) from OAuth & Permissionsxapp-...) from Socket Mode settings~/.claude/channels/slack//slack-channel:configure <xoxb-bot-token> <xapp-app-token>
Parse the two arguments from $ARGUMENTS:
xoxb- (Bot User OAuth Token)xapp- (App-Level Token)If either token is missing or has the wrong prefix, show this error and stop:
Error: Two tokens required.
- Bot token (starts with xoxb-) from OAuth & Permissions
- App token (starts with xapp-) from Socket Mode settings
Usage: /slack-channel:configure xoxb-... xapp-...
Create the state directory if it doesn't exist:
~/.claude/channels/slack/
Write the .env file at ~/.claude/channels/slack/.env:
SLACK_BOT_TOKEN=<bot-token>
SLACK_APP_TOKEN=<app-token>
Set file permissions to owner-only:
chmod 600 ~/.claude/channels/slack/.env
Confirm success:
Slack channel configured.
Start Claude with the Slack channel:
claude --channels plugin:slack-channel@claude-code-plugins
Or for development:
claude --dangerously-load-development-channels server:slack
.env.env fileOn success, displays:
Slack channel configured.
Start Claude with the Slack channel:
claude --channels plugin:slack-channel@claude-code-plugins
On validation failure, displays the error with correct usage syntax.
| Error | Cause | Resolution |
|---|---|---|
| Missing token argument | Fewer than 2 arguments provided | Show usage with required token prefixes |
| Invalid bot token prefix | First token does not start with xoxb- | Explain where to find the Bot User OAuth Token |
| Invalid app token prefix | Second token does not start with xapp- | Explain where to find the App-Level Token in Socket Mode settings |
| Permission denied | Cannot write to ~/.claude/channels/slack/ | Check directory permissions and create parent dirs if needed |
Standard configuration:
/slack-channel:configure xoxb-1234567890-abcdef xapp-1-ABCDEF-ghijkl
→ Slack channel configured.
Missing token error:
/slack-channel:configure xoxb-1234567890
→ Error: Two tokens required.
- Bot token (starts with xoxb-) from OAuth & Permissions
- App token (starts with xapp-) from Socket Mode settings
/slack-channel:access — configure who can message your session