Skip to main content
Guide10 min read·Updated June 3, 2026
🧩

How to Install the Slack MCP Server with Claude Code

B

A. Frans

Published June 3, 2026

SlackMCPClaude CodeTutorial2026

Getting back from two days off and scrolling through #incidents is its own small punishment. Forty unread messages, three of them important, the rest reactions and "any update?" pings. The thing you actually want is one paragraph: what broke, who fixed it, what's still open. The Slack MCP server lets Claude Code read that channel and write you that paragraph.

This guide walks through installing the official Slack MCP server, connecting it to your workspace with a properly scoped token, and running it without handing a bot the keys to every private channel you have. I've set it up on a real workspace, so the steps below are the ones that actually worked, including the parts the README skips over.

What the Slack MCP server actually does

An MCP server is a bridge. It sits between Claude Code and an outside system and exposes that system as tools the agent can call. The Slack MCP server (maintained by Slack, around 1,600 GitHub stars) connects Claude Code to a Slack workspace. Once it's running, Claude can read channels, search messages across the workspace, post into a channel or thread, and summarize long threads on request.

If you've already set up the GitHub MCP, the pattern here is the same: one install command, one token, one verification prompt. The difference is what the token grants access to. A GitHub token reads your repos; a Slack token can read conversations real people had assuming they were talking only to each other. That changes how carefully you scope it, which is the part of this guide I'd ask you not to skim.

For the difference between an MCP server like this and an agent skill, see MCP servers vs agent skills. Short version: a server connects Claude to a live system over a protocol; a skill is packaged instructions and code Claude loads into its own context. Slack is a server because there's a live workspace on the other end.

Slack MCP vs the alternatives

Before you install anything, it helps to see where this sits against the two things people usually do instead: catching up by hand, or paying for a Slack-AI add-on.

ApproachSetup effortCostWhat you can automate
Read Slack manuallyNoneYour timeNothing. You scroll, you read, you forget half of it
Slack MCP + Claude Code~20 min, one-timeFree (you already pay for Claude Code)Summaries, search across channels, drafting replies, posting updates, thread digests
Paid Slack-AI add-onMinutes, but per-seat$5-20 per user per month, typicallyVendor-defined summaries; limited to their feature set, your data on their servers
The manual row isn't a joke. For a lot of teams it's the real status quo, and the honest pitch for the MCP server is that it replaces twenty minutes of scrolling with one prompt. The paid add-ons do more polishing, but you're renting a fixed feature set and routing workspace data through another vendor. The MCP server keeps the work inside Claude Code, where you already have a subscription, and lets you ask for whatever you want rather than whatever the vendor built.

Before you start

You'll need three things:

1. Claude Code installed and working from your terminal. 2. Node.js (the install command uses npx, which ships with Node). 3. Admin rights on the Slack workspace, or an admin willing to approve a new app. Creating a Slack app and installing it usually needs workspace-admin sign-off.

If you're not an admin, talk to whoever is before you start, because step 1 produces an app that has to be approved for your workspace.

Step 1: Create a Slack app and add scopes

Go to api.slack.com/apps and click Create New App. Choose From scratch, give it a name like "Claude Code", and pick the workspace you want to connect.

Once the app exists, open OAuth & Permissions in the left sidebar. This is where you decide what the app can touch. Scroll to Scopes and add only what you need under Bot Token Scopes:

  • channels:read — list public channels and read their basic info
  • channels:history — read messages in public channels the bot is in
  • chat:write — post messages
  • search:read — search messages across the workspace (this one needs a user token; see the note below)
  • groups:read and groups:history, only if you need private channels, and only the ones the bot is invited to

Add the minimum. Every scope you grant is access someone has to trust. If you only want read-only summaries of one public channel, you don't need chat:write and you definitely don't need the private-channel scopes. You can always add a scope later and reinstall.

A note on token types: Slack has two. A bot token acts as the app and can only see channels the bot has been invited to. A user token acts as you and sees everything you can see, which is broader and riskier. Workspace-wide search often requires a user token. Start with a bot token and only reach for a user token if a feature genuinely needs it.

Step 2: Get the token

With your scopes set, scroll up on the same OAuth & Permissions page and click Install to Workspace. Slack shows you exactly what you're granting; read that screen instead of clicking through it. Approve it.

After installation, Slack gives you a Bot User OAuth Token. It starts with xoxb-. Copy it. If you set up a user token as well, that one starts with xoxp- and appears on the same page.

Treat this string like a password. Anyone holding it can do everything the scopes allow, as the app, in your workspace. Don't paste it into a chat, a commit, or a screenshot.

Step 3: Run the install command

Now connect the server to Claude Code. From your terminal, run:

claude mcp add slack -- npx -y @slack/mcp-server

This registers a server named slack and tells Claude Code to launch it with npx -y @slack/mcp-server. The -y flag lets npx fetch the package without a confirmation prompt. The -- separates Claude's own flags from the command Claude should run; everything after it is the server's launch command.

Step 4: Set the token as an environment variable

The server reads your token from the environment, not from any file you commit. The cleanest approach is to pass it when you register the server. Remove the server and re-add it with the token set:

claude mcp remove slack
claude mcp add slack --env SLACK_BOT_TOKEN=xoxb-your-token-here -- npx -y @slack/mcp-server

If you added a user token for search, set SLACK_USER_TOKEN the same way. Check the server's GitHub README for the exact variable names it expects, since they can change between versions.

Why an environment variable and not a config file you edit by hand? Because config files end up in git. A token in your shell environment or in Claude's managed server config stays out of version control, which is where leaked Slack tokens usually come from. If you must store it somewhere, use a secrets manager or your OS keychain, never a plain file in the repo.

Step 5: Verify it works

Restart Claude Code so it picks up the new server, then run:

claude mcp list

You should see slack in the list. To confirm the connection end to end, open Claude Code and try a small prompt:

> List the public channels in my Slack workspace.

If the token and scopes are right, you'll get a list back. If you get an authentication error, the token is wrong or missing. If you get a "missing scope" error, Slack tells you which scope it wanted; go back to OAuth & Permissions, add it, reinstall, and update your environment variable with the fresh token.

One gotcha worth flagging: the bot can only read channels it's been invited to. If a channel returns nothing, go into Slack and type /invite @Claude Code (or whatever you named the app) in that channel. This is a feature, not a bug. It's how you control what the bot sees.

Example prompts once it's connected

Here's what the setup actually buys you. These are prompts I run on a normal workday:

> Summarize what I missed in #incidents over the last 24 hours. Group it by issue and tell me what's still open.

> Search the workspace for messages mentioning the staging deploy from this week and give me the three most relevant.

> Draft a reply in the #support thread about the login timeout, asking for their browser and the exact error. Don't post it yet, show me first.

> Catch me up on #product-decisions since Monday in five bullet points.

Notice the "show me first" in the third one. For anything that writes to Slack, ask Claude to draft and wait for your review before it posts. The agent posting on your behalf to a real channel is exactly the kind of action you want a human checkpoint on.

Security note: an official tier doesn't mean zero risk

The Slack MCP server is official, maintained by Slack, and that's the highest trust tier you'll find. The code is fine. The risk isn't the code, it's the token you hand it.

A bot token is a standing grant of real workspace access. A few habits keep it boring:

1. Scope minimally. Read-only summaries don't need chat:write. One public channel doesn't need private-channel scopes. Add scopes when a task needs them, not in advance. 2. Keep the token in the environment, not in code. This is the single most common way Slack tokens leak: committed to a repo, then scraped. Environment variable or secrets manager, never a tracked file. 3. Control what the bot can see through channel membership. The bot reads only channels it's invited to. Don't invite it to #hr or #leadership unless you have a specific reason, and remove it when the task is done. 4. Review the server before you trust it. Even official servers deserve a look. Check the GitHub repo (github.com/slackapi/slack-mcp-server), read what it does, and apply the same scrutiny to every MCP server you install regardless of tier. A community server with a vague README and broad token demands is a reason to slow down. 5. Rotate the token if it's ever exposed. Slack lets you revoke and regenerate from the app's OAuth page. If a token shows up somewhere it shouldn't, revoke first, ask questions later.

None of this is exotic. It's the same discipline you'd apply to any credential that can read what your coworkers wrote.

FAQ

Do I need to be a Slack admin to set this up? Usually yes. Creating an app and installing it to a workspace typically requires admin approval. If you're not an admin, you can build the app but an admin has to approve the install. Talk to whoever runs your workspace before you start.

Can the bot read private channels and DMs? Only channels it's explicitly invited to, and only if you granted the groups:history scope. Direct messages need separate scopes that you should think hard about before adding. By default, a fresh bot sees nothing until you invite it somewhere.

What's the difference between a bot token and a user token? A bot token acts as the app and sees only channels the bot joined. A user token acts as you and sees everything your account can see, which is far broader. Workspace-wide search often needs a user token. Default to a bot token; reach for a user token only when a feature can't work without it.

Is the Slack MCP server free? Yes. The server is open source, and you run it through your existing Claude Code setup. There's no separate subscription. You're already paying for Claude Code, and Slack itself charges nothing extra for the API access an app uses.

The bot returns nothing for a channel that clearly has messages. Why? It hasn't been invited to that channel. Type /invite @YourAppName in the channel inside Slack. The bot can only read channels it's a member of, which is the mechanism you use to limit its reach.

Where this fits

The Slack MCP server is worth setting up if catching up on channels eats real time in your week, or if you'd rather ask one question than scroll through a backlog. Twenty minutes of setup, a tightly scoped token, and a habit of reviewing drafts before they post gets you most of the value with little of the risk. Start it read-only on one channel, see whether the summaries earn their place, and widen the scopes only when a task actually demands it.

Share this article

⚙Related Tools

📬

Get More AI Tool Guides

New comparisons and guides every week. Join thousands of professionals staying ahead of the AI curve.