githubEdit

Slack MCP

Slack MCP

What This Does

Enables Claude Code to list channels, read messages, post messages, and interact with Slack.

Source

  • Docker Hub: https://hub.docker.com/r/mcp/slack

  • Docker: mcp/slack

  • Alternative: https://github.com/korotovsky/slack-mcp-server

Prerequisites

  • Docker Desktop installed

  • Access to Slack workspace (admin or ability to install apps)

  • Slack Bot Token and Team ID

Step 1: Create Local Config Folder

mkdir -p ~/.config/mcp/slack

Step 2: Get Credentials

Create Slack App

  1. Go to https://api.slack.com/apps

  2. Click Create New App

  3. Choose From scratch

  4. Name: "MCP Bot"

  5. Select your workspace

  6. Click Create App

Configure Bot Permissions

  1. Go to OAuth & Permissions

  2. Under Scopes → Bot Token Scopes, add:

Scope
Purpose

channels:history

Read public channel messages

channels:read

List public channels

chat:write

Post messages

groups:history

Read private channel messages

groups:read

List private channels

im:history

Read DM messages

im:read

List DMs

im:write

Send DMs

reactions:write

Add reactions

users:read

List users

users.profile:read

Read user profiles

Install App to Workspace

  1. Go to OAuth & Permissions

  2. Click Install to Workspace

  3. Click Allow

  4. Copy the Bot User OAuth Token (starts with xoxb-)

Get Team ID

Option A - From browser:

  1. Open Slack in browser

  2. URL: https://app.slack.com/client/TXXXXXXXX/...

  3. The TXXXXXXXX part is your Team ID

Option B - From desktop app:

  1. Click workspace name → Settings & administrationWorkspace settings

  2. Team ID shown in URL

Step 3: Save Credentials Locally

Create ~/.config/mcp/slack/.env:

Replace with your actual values.

Step 4: Pull Docker Image

Step 5: Test the Connection

Step 6: Add to Claude Code

Add to ~/.claude/settings.json:

Note: If ${HOME} doesn't expand, use absolute path:

Step 7: Verify It Works

Restart Claude Code and test:

Expected: List of channels in your workspace.

Available Tools

Tool
Description

slack_list_channels

List public channels

slack_post_message

Post a new message to a channel

slack_reply_to_thread

Reply to a specific thread

slack_add_reaction

Add emoji reaction to a message

slack_get_channel_history

Get recent messages from a channel

slack_get_thread_replies

Get all replies in a thread

slack_get_users

List workspace users

slack_get_user_profile

Get specific user's profile

Invite Bot to Channels

Before the bot can access a channel:

  1. Go to the channel in Slack

  2. Type /invite @MCP Bot (use your bot's name)

  3. Or: Channel settings → Integrations → Add apps

Limiting Channel Access (Optional)

For security, limit which channels the bot can access:

Get channel IDs:

  1. Right-click channel in Slack

  2. Click View channel details

  3. Scroll to bottom → Channel ID

Troubleshooting

Issue
Solution

"not_authed"

Check bot token is correct and starts with xoxb-

"channel_not_found"

Invite bot to the channel first

"missing_scope"

Add required scope in Slack app settings, reinstall app

"invalid_auth"

Token may be revoked, generate new one

Can't see private channels

Add groups:read scope, invite bot to channel

Can't post messages

Add chat:write scope

env-file not found

Use absolute path instead of ${HOME}

Last updated