Slack Setup Guide
Connect Slack to mcpgate so your AI can search messages, read channels, post messages, and manage reminders.
Time required: ~10 minutes
You need: Slack workspace admin access
You need: Slack workspace admin access
What you'll get
Once connected, your AI client can:
- Search messages across channels
- Read channel history and threads
- Post messages and replies
- Look up user profiles
- Send DM notifications (via Bot Token)
1. Create a Slack App
- Go to api.slack.com/apps
- Click "Create New App"
- Choose "From scratch"
- Enter an app name (e.g.
mcpgate) and select your workspace - Click "Create App"
2. Configure Bot Token Scopes
In the left sidebar, go to OAuth & Permissions. Scroll down to Scopes → Bot Token Scopes and add:
| Scope | Purpose |
|---|---|
channels:history | Read message history in public channels |
channels:read | List channels and their metadata |
chat:write | Post messages and replies |
search:read | Search messages and files |
users:read | Look up user profiles |
users:read.email | Match users by email address |
3. Configure OAuth (optional)
If you want per-user Slack connections via the mcpgate dashboard (recommended for teams):
- In OAuth & Permissions, scroll to Redirect URLs
- Click "Add New Redirect URL"
- Enter:
https://your-gateway-url/auth/slack/callback - Click "Save URLs"
Then go to User Token Scopes and add search:read and users:read. User tokens enable searches scoped to each user's accessible channels.
4. Install the app
- In the left sidebar, go to Install App
- Click "Install to Workspace"
- Review the permissions and click "Allow"
5. Copy credentials
You need 5 values. Here's where to find each one:
| Value | Where to find it |
|---|---|
Bot Token (xoxb-...) | OAuth & Permissions → Bot User OAuth Token |
| Signing Secret | Basic Information → App Credentials → Signing Secret |
| Client ID | Basic Information → App Credentials → Client ID |
| Client Secret | Basic Information → App Credentials → Client Secret |
| Team ID | Your workspace URL is your-team.slack.com — the Team ID is inSettings & Administration → Workspace settings → scroll to bottom |
6. Add to mcpgate
In the mcpgate setup wizard or .env file:
SLACK_BOT_TOKEN=xoxb-your-bot-token
SLACK_SIGNING_SECRET=your-signing-secret
SLACK_CLIENT_ID=your-client-id
SLACK_CLIENT_SECRET=your-client-secret
SLACK_TEAM_ID=T01234567 Restart mcpgate if using .env. Wizard changes apply automatically.
Verify
Ask your AI: "Search Slack for messages about project X". If configured correctly, you'll see results from your workspace.
Bot Token vs User Token: The Bot Token (
xoxb-) lets the AI post messages and read public channels. User Tokens (xoxp-, via OAuth) let the AI search with each user's permissions, including private channels they have access to.