tutorial7 min read8d ago

How to Set Up Slack MCP Server with Claude Code (2026 Guide)

Step-by-step guide to connecting Slack with Claude Code via MCP. Create a Slack app, get a bot token, configure the MCP server, and send messages from your terminal.

How to Set Up Slack MCP Server with Claude Code (2026 Guide)
mcpslackclaude codemcp server setupslack integrationAI toolsdeveloper toolstutorial2026

How to Set Up Slack MCP Server with Claude Code (2026 Guide)

By David Henderson | March 26, 2026 | 12 min read


What you will build: A working Slack integration for Claude Code. When you are done, you can search Slack messages, read channel history, post messages, manage channels, and automate team communication — all from Claude Code in your terminal. Setup takes about 15 minutes.


Table of Contents

  1. Prerequisites
  2. Step 1: Create a Slack App
  3. Step 2: Configure Bot Permissions
  4. Step 3: Install the App to Your Workspace
  5. Step 4: Configure Claude Code
  6. Step 5: Test the Connection
  7. Real-World Use Cases
  8. Troubleshooting
  9. Frequently Asked Questions

Prerequisites {#prerequisites}

You need:

  • Claude Code installed and running
  • A Slack workspace where you have permission to install apps
  • Node.js 18+ installed
  • Workspace admin access (or the ability to request app approval)

Step 1: Create a Slack App {#step-1}

  1. Go to https://api.slack.com/apps
  2. Click "Create New App"
  3. Choose "From scratch"
  4. Enter:
  • App Name: Claude Code Bot (or your preferred name)
  • Workspace: Select the workspace you want to connect
  1. Click "Create App"

You now have a Slack app. It has no permissions yet — that comes next.


Step 2: Configure Bot Permissions {#step-2}

Your Slack app needs specific permissions (called "scopes") to interact with your workspace through Claude Code.

  1. In your app's settings, go to "OAuth & Permissions" in the left sidebar
  2. Scroll down to "Bot Token Scopes"
  3. Click "Add an OAuth Scope" and add the following scopes:

Essential scopes (add all of these):

ScopeWhat it allows
----------------------
channels:readList public channels
channels:historyRead message history in public channels
chat:writeSend messages as the bot
groups:readList private channels the bot is in
groups:historyRead message history in private channels
im:readList direct message conversations
im:historyRead direct message history
users:readList workspace members
search:readSearch messages and files

Optional but recommended:

ScopeWhat it allows
----------------------
reactions:writeAdd emoji reactions to messages
reactions:readRead emoji reactions
files:readAccess file information
channels:manageCreate and archive channels
pins:writePin messages

Start with the essential scopes. You can add more later without reinstalling.


Step 3: Install the App to Your Workspace {#step-3}

  1. In your app's settings, go to "OAuth & Permissions"
  2. Click "Install to Workspace" at the top
  3. Review the permissions and click "Allow"
  4. You will see a Bot User OAuth Token that starts with xoxb-
  5. Copy this token — you need it for the Claude Code configuration

Keep this token secret. It grants access to your Slack workspace. Do not commit it to version control or share it publicly.

Invite the Bot to Channels

Your bot can only read and write in channels where it has been invited. For each channel you want Claude Code to access:

  1. Open the channel in Slack
  2. Type /invite @Claude Code Bot (or whatever you named the app)
  3. The bot is now a member of that channel

You do not need to invite the bot to every channel right away. You can add it to more channels as needed.


Step 4: Configure Claude Code {#step-4}

Add the Slack MCP server to your Claude Code configuration.

Project-Level Configuration

Create or edit .claude/mcp.json in your project root:

{
  "mcpServers": {
    "slack": {
      "command": "npx",
      "args": ["-y", "@anthropic/slack-mcp-server"],
      "env": {
        "SLACK_BOT_TOKEN": "xoxb-your-bot-token-here"
      }
    }
  }
}

Global Configuration

For access in every Claude Code session, edit ~/.claude/mcp.json:

{
  "mcpServers": {
    "slack": {
      "command": "npx",
      "args": ["-y", "@anthropic/slack-mcp-server"],
      "env": {
        "SLACK_BOT_TOKEN": "xoxb-your-bot-token-here"
      }
    }
  }
}

Replace xoxb-your-bot-token-here with the Bot User OAuth Token from Step 3.

Adding to Existing Config

If you already have other MCP servers configured (like Notion or GitHub), add the Slack entry alongside them:

{
  "mcpServers": {
    "notion": {
      "command": "npx",
      "args": ["-y", "@notionhq/notion-mcp-server"],
      "env": {
        "NOTION_API_KEY": "ntn_your_notion_key"
      }
    },
    "slack": {
      "command": "npx",
      "args": ["-y", "@anthropic/slack-mcp-server"],
      "env": {
        "SLACK_BOT_TOKEN": "xoxb-your-bot-token-here"
      }
    }
  }
}

Step 5: Test the Connection {#step-5}

Restart Claude Code to load the new configuration. Then test with a simple query:

claude "List the Slack channels I have access to"

If the connection is working, Claude will return a list of channels where the bot is a member.

Test a few more operations:

claude "What were the last 5 messages in #general?"
claude "Search Slack for messages about the product launch"
claude "Send a message to #engineering saying 'Deployment complete - all systems green'"

If you see real data from your workspace, the setup is complete.


Real-World Use Cases {#use-cases}

The Slack MCP server is most valuable when you combine it with other tools or when you need to process information from conversations. Here is how I use it every day.

Morning Standup Summary

I start every morning with:

"Read the last 24 hours of messages in #engineering, #product, and #incidents. Summarize the key updates, any blockers mentioned, and items that need my attention."

This saves me 15-20 minutes of scrolling through channels. Claude reads the messages and gives me a structured summary with the important items highlighted.

Deployment Notifications

After deploying code, I have Claude post a structured update:

"Post to #deployments: Version 2.4.1 deployed to production. Changes: fixed the checkout flow timeout issue, added rate limiting to the search API, updated the dashboard charts. No breaking changes."

Cross-Channel Research

When I need to find information scattered across channels:

"Search all Slack channels for discussions about the authentication migration. Who was involved? What decisions were made? What is the current status?"

Incident Response

During incidents, speed matters:

"Post to #incidents: API response times elevated. Investigating. Will update in 15 minutes."
"Read the last hour of #incidents and summarize the timeline of events."

Pairing with Other MCP Servers

The real power comes from combining Slack with other servers:

Slack + GitHub: "Check if there are any open PRs from this week that haven't been reviewed, and post a reminder in #engineering with the list."

Slack + Notion: "Read the sprint retrospective notes from Notion and post a summary of the action items to #product."

Slack + Postgres: "Query the database for today's signups, and post the count to #metrics."

For the full catalog of MCP servers you can combine with Slack, browse the Skiln MCP directory.


Troubleshooting {#troubleshooting}

"not_in_channel" error

The bot is trying to read or post in a channel it has not been invited to.

Fix: Open the channel in Slack and type /invite @Claude Code Bot.

"missing_scope" error

The bot does not have the required permission for the action you requested.

Fix: Go to your app's settings at https://api.slack.com/apps, navigate to "OAuth & Permissions," add the missing scope, and reinstall the app to your workspace. You will get a new bot token — update your mcp.json with the new token.

MCP server fails to start

  1. Check Node.js version: node -v (need 18+)
  2. Test manually: SLACK_BOT_TOKEN=xoxb-your-token npx @anthropic/slack-mcp-server
  3. Verify the token: Go to https://api.slack.com/apps, select your app, check "OAuth & Permissions" to confirm the token is valid

Claude says it does not have Slack tools

  1. Restart Claude Code after editing the config
  2. Verify the JSON is valid (no trailing commas, correct quotes)
  3. Check the config file path: .claude/mcp.json for project-level, ~/.claude/mcp.json for global

Rate limiting

Slack's API has rate limits (approximately 1 request per second for most methods). If you are making many requests in sequence, you may see temporary errors.

Fix: Be specific in your requests. "Read the last 10 messages in #general" is better than "Read everything in #general."


Frequently Asked Questions {#faq}

Can the bot read private channels and DMs?

The bot can read private channels it has been invited to (with the groups:history scope) and DMs sent directly to the bot (with im:history). It cannot read DMs between other users — that is not possible through the Slack API regardless of scopes.

Will messages sent by the bot show as "Claude Code Bot" or as me?

Messages sent through the MCP server appear as the bot, not as you. The bot name and avatar are whatever you configured when creating the Slack app. Team members will see messages coming from "Claude Code Bot" (or your custom name). This is by design — it is transparent that an AI tool is posting.

Can I use this with Slack Enterprise Grid?

Yes, but the installation process may differ. Enterprise Grid workspaces often require admin approval for new apps. You may need to submit the app for review through your organization's Slack admin panel before you can install it and get a bot token.

How do I limit what the bot can access?

The bot can only read channels it has been explicitly invited to. Do not invite it to sensitive channels (like #exec-team or #hr-confidential). For additional control, you can create the Slack app with fewer scopes — for example, omit chat:write if you only want read access.

Is there a cost to running the Slack MCP server?

The MCP server itself is free and open source. Slack's API is free for standard usage within a workspace. The only cost is the Claude Code usage itself (API calls to Anthropic). There are no additional charges from Slack for API access unless you exceed very high rate limits.


Frequently Asked Questions

Can the Slack MCP bot read private channels and DMs?
The bot can read private channels it has been invited to (with the groups:history scope) and DMs sent directly to the bot. It cannot read DMs between other users — that is not possible through the Slack API regardless of scopes.
Will messages sent by the bot show as 'Claude Code Bot' or as me?
Messages sent through the MCP server appear as the bot, not as you. Team members will see messages coming from the bot name you configured. This is by design — it is transparent that an AI tool is posting.
Can I use the Slack MCP server with Slack Enterprise Grid?
Yes, but the installation process may differ. Enterprise Grid workspaces often require admin approval for new apps. You may need to submit the app for review through your organization's Slack admin panel.
How do I limit what the Slack MCP bot can access?
The bot can only read channels it has been explicitly invited to. Do not invite it to sensitive channels. For additional control, create the Slack app with fewer scopes — for example, omit chat:write if you only want read access.
Is there a cost to running the Slack MCP server?
The MCP server itself is free and open source. Slack's API is free for standard usage within a workspace. The only cost is the Claude Code usage itself (API calls to Anthropic).

Stay in the Loop

Join 1,000+ developers. Get the best new Skills & MCPs weekly.

No spam. Unsubscribe anytime.