---
title: "MCP for Slack"
description: "Connect Slack to both Claude and Claude Code, and feel how the same MCP server lands differently in each client"
tags: ["mcp", "integration", "communication"]
difficulty: "intermediate"
time_estimate: "45 min"
---
# MCP for Slack
## What You'll Build
- A working Slack connection inside **Claude** (the desktop app or claude.ai in a browser)
- A working Slack connection inside **Claude Code** (the CLI in your terminal)
- A feel for what each one is actually good for — by running the same prompt in both and watching what happens
## Why This Quest
You already use Slack. You know what channels are, you know how DMs work, you know the difference between posting in `#general` and whispering in a thread. What you probably *haven't* done is write code that talks to Slack — that's a whole other skill (Slack Apps, OAuth, bot tokens, scopes) most people never climb.
The Slack MCP server skips that climb. Here's the twist: the *same* MCP server works in two places you already use — Claude and Claude Code — and the experience is genuinely different in each. This quest walks you through connecting it in both, and pokes at the question *"when should I reach for which?"*
If you haven't read [What Is MCP?](/XTfOPd-OTaKrncI860x0dg) yet, do that first — five minutes of warm-up about what MCP servers actually are. This quest assumes you're good with that.
## Prerequisites
- Completed Module 2.2 (Claude Code)
- You're working on a device that's logged in to the **Bok AI Lab** Slack workspace
- Claude installed on your laptop (or an open browser tab to claude.ai — either works)
You do **not** need to be a Slack admin, and you do **not** need to create a Slack App. The official Slack MCP server is published by Slack itself — you just authorize it like any other app ("Sign in with Google," "Connect your Notion account," etc.).
## The Shared Workspace
For this quest we'll use the **Bok AI Lab** workspace so everyone's pointing at the same channels. The only rule: only read or post in channels where it's OK for a little automation to leave fingerprints. If you're unsure which channel is safe to test in, ask Jordan or Jungyoon for the name of the current LLUF test channel.
## A Quick Note on Slack Apps
Before we install anything, one bit of vocabulary that trips people up:
- **Slack workspace** — the thing you already live in. Channels, DMs, people. "Bok AI Lab" is a workspace.
- **Slack App** — a piece of software that's been given permission to see or do things in a workspace. Every integration you've ever clicked "Add to Slack" on (Google Calendar, Zoom, Notion) is a Slack App.
The Slack MCP server *is* a Slack App. When you authorize it, you're telling Slack *"this app is allowed to act on my behalf — read these channels, post messages as me."* Same permission model you've seen a hundred times, you just usually don't think about it.
## Two Clients, One Server
Before you start wiring things up, it helps to understand what's different about the two places we're connecting Slack.
| | **Claude** (desktop / web) | **Claude Code** (CLI) |
|---|---|---|
| Where it runs | Anthropic's cloud, with a thin app on your computer | Locally, in your terminal |
| How you add an MCP | Sidebar → Customize → Connectors → click **+** | `/plugin install slack` inside a session (or `claude plugin install slack` from your shell) |
| Where credentials live | Anthropic's servers, tied to your account | Your project's `.mcp.json` + an OAuth token the plugin manages for you |
| Best at | Quick, conversational tasks — "catch me up," "draft a reply" | Agentic chaining — read Slack *and* edit files *and* commit to git |
| Other MCPs available | Whatever's in the Connectors catalog | Anything with a command or HTTP endpoint |
Same underlying Slack MCP server in both cases. Different client wrapping it. You'll feel the difference when you try identical prompts in each.
## Track A: Connect Slack to Claude
We'll start with Claude (the desktop/web app) because it's the gentler of the two — no terminal, no config files.
### Step A1: Open Connectors
Open Claude Desktop (or claude.ai in a browser). Open the **sidebar** and click **Customize**. On the Customize page, click **Connectors**, then click the **+** button to add a new connector. You'll see a catalog of things you can connect — Google Drive, GitHub, Slack, and more.
Find **Slack** and add it.
### Step A2: Authorize in the Browser
Claude will hand you off to Slack's standard OAuth authorization page. This is where you actually tell Slack *"yes, this app can read my channels and post as me."* Two things to pay attention to:
- **Workspace selector, top right.** Make sure it says **Bok AI Lab**. If you're in multiple workspaces, Slack defaults to whichever you logged into last — not necessarily the one you want.
- **List of scopes.** You'll see things like "read channel messages," "post messages as you." These are the same **scopes** concept from the Airtable quest — each one is a specific permission the app is asking for.
Read what it's asking for, then click **Allow**. You'll bounce back to Claude with Slack listed as a connected connector.
### Step A3: Read-Only Sanity Check in Claude
Start a new chat and try a purely read-only prompt:
```
In the Bok AI Lab Slack, list the channels I'm a member of, and for the
#lluf-testing channel tell me how many messages have been posted in the
last 24 hours and who posted them.
```
Watch Claude work. It'll say something like "I'll check your Slack…" and you'll see a little tool-call card appear. You asked in English. It read your Slack. That's MCP doing its thing, entirely inside the Claude app.
### Step A4: Post a Message (To Yourself)
Before posting anywhere public, send yourself a DM. In Slack, "yourself" is the entry at the top of your sidebar labeled with your own name.
```
Send a Slack message to my own DM saying "MCP test from Claude"
and then read it back to confirm it posted.
```
Claude will show the draft and ask you to approve. Say yes, then check your DM-with-yourself in Slack. Congrats — you just triggered your first Slack automation, and if anything had gone wrong, you'd be the only witness.
## Track B: Connect Slack to Claude Code
Now do the same thing in Claude Code. Notice that the shape of the steps is almost identical — install, authorize, sanity check, first post — but the mechanics are grittier because you're working in the terminal.
### Step B1: Install the Slack Plugin
The Slack MCP server is hosted at a URL (`https://mcp.slack.com/mcp`), and Slack distributes a Claude Code **plugin** that configures everything — the URL, the OAuth client ID, the callback port — in a single step. No flags to memorize.
If you're already inside a Claude Code session, use the slash command:
```
/plugin install slack
```
Or, from your shell:
```bash
claude plugin install slack
```
Under the hood, the plugin adds an entry to your project's `.mcp.json` that looks like this:
```json
{
"mcpServers": {
"slack": {
"type": "http",
"url": "https://mcp.slack.com/mcp",
"oauth": {
"clientId": "1601185624273.8899143856786",
"callbackPort": 3118
}
}
}
}
```
You won't hand-edit this — the plugin writes it for you — but notice three things:
- `"type": "http"` — the same HTTP transport you read about in the Airtable quest
- `"url"` — Slack's public MCP endpoint
- `"oauth"` — the plugin ships with Slack's OAuth client ID and a local callback port, so Claude Code can round-trip you through Slack's authorize screen. No API key to paste anywhere.
### Step B2: Authorize in the Browser
As soon as the plugin loads, Claude Code pops open a browser tab asking you to sign in to Slack and approve the MCP server. **Same authorize screen you saw in Track A.** Double-check the workspace selector says **Bok AI Lab**, read the scopes, click **Allow**. The tab will say "You can close this window."
Back in Claude Code, type:
```
/mcp
```
…and you should see `slack` listed as connected. If it says `needs auth`, select it to re-trigger the browser flow.
### Step B3: Run the Same Read-Only Sanity Check
Run the exact same prompt you used in Claude:
```
In the Bok AI Lab Slack, list the channels I'm a member of, and for the
#lluf-testing channel tell me how many messages have been posted in the
last 24 hours and who posted them.
```
Claude Code will call tools like `slack_list_channels` and `slack_read_channel` — and **it'll ask for permission the first time it calls each tool**. That's the big surface difference: Claude Code is noisier, asks more explicitly, and shows you the raw tool call. Claude the app hides more of that under a polished UI.
### Step B4: Post to Yourself from Claude Code
```
Send a Slack message to my own DM saying "MCP test from Claude Code"
and then read it back to confirm it posted.
```
Check your DM-with-yourself. You should now see *two* messages — one from Track A labeled "MCP test from Claude," one from Track B labeled "MCP test from Claude Code." Both posted *as you*. Both going through the same underlying Slack MCP server. Different client, same outcome.
## Compare the Two
Now that both are connected, run the exercise that makes the difference obvious. In **both** Claude and Claude Code, try this prompt:
```
Read the last 30 messages in #lluf-testing. Summarize them in under
100 words, and save the summary to a file called lluf-summary.md.
```
Pay attention to what happens:
- **In Claude (the app):** It reads and summarizes fine, but when you ask it to save a file, it can only offer you a downloadable file or ask you to copy-paste the text. It can't reach your filesystem directly — Claude runs in Anthropic's cloud, not on your laptop.
- **In Claude Code:** It reads Slack, writes the summary, and creates `lluf-summary.md` in your project folder. It might even offer to `git add` and commit it. All in one flow.
Same Slack server, radically different downstream power. That's the heart of why both clients exist: one is a *conversation*, the other is an *agent with a workbench*.
### When to Reach for Which
A rough rule of thumb you'll refine with experience:
- **Reach for Claude (the app)** when the task is *"help me think about Slack"* — catching up on a channel, drafting a reply before you hit send, finding that thread from last week, pulling a discussion into shape for a meeting. Fast, conversational, works from your phone.
- **Reach for Claude Code** when Slack is *one step in a larger job* — read Slack *and* update Airtable, read Slack *and* generate a report *and* commit it to the repo, pull messages into a file so you can process them programmatically. Slower to set up, but the chaining is where it earns its keep.
## A Real Multi-Step Task (Claude Code)
Here's the kind of task Claude the app can't quite pull off — the sort of thing Claude Code was built for.
```
Read the last 50 messages in #lluf-testing. Summarize the three main
threads of discussion in under 100 words each, save the summary to
summaries/YYYY-MM-DD-lluf.md (create the folder if needed), and post
the summary as a reply in a new thread on the most recent message in
that channel. Sign the post with "— posted by Claude on my behalf" so
people know it's automated.
```
Claude Code will:
1. Read the channel
2. Identify the discussion threads
3. Compose a summary
4. Write it to a new file on your laptop
5. Find the most recent message in the channel
6. Post a threaded reply back into Slack
Watch it work. It'll ask before each write — look at the drafts before approving. **This is where MCP stops being safe by default** — a bad file write on your laptop is hidden, but a bad post in Slack is visible to everyone in the channel. Read the draft.
### Other Starter Ideas
- **Catch-up summary:** "Summarize everything posted in `#lluf-testing` since yesterday at 5pm and DM me the result."
- **Reply draft:** "Read the last message in my DM with Dani and draft a reply I might send — don't post it, just show me the draft."
- **Cross-tool digest:** "Pull the last 20 messages from `#lluf-testing`, check which ones link to Airtable records, and tell me which records they reference." *(Requires the Airtable MCP server too — a natural follow-up to this quest.)*
- **Standup bot:** "Every weekday morning, read `#lluf-progress`, summarize what everyone said they'd work on, and DM the digest to me." *(Wire this up to a schedule — covered in a later quest.)*
## Staying Safe
Slack is the most *visible* MCP you'll set up in this unit. A mistake in Airtable can often be undone before anyone notices. A mistake in Slack is a message in a channel where everyone can see it. A few habits worth forming now:
- **Never test in a public channel you don't own.** Post to your own DM, a test channel, or a DM with someone who's expecting it.
- **Read drafts before approving posts.** Both clients will ask. Actually look. It's usually right, but when it's wrong, it's wrong in public.
- **Don't let Claude `@channel` or `@here` anyone during testing.** Those notifications wake up everyone in the channel. If a task might include them, say "do not use @channel or @here" in your prompt.
- **Remember you've authorized it to post *as you*.** Messages posted through either client look identical to ones you typed by hand. Sign automated posts explicitly when it matters — doubly true in a shared workspace like Bok AI Lab.
- **Use read-only prompts when you can.** Most of the useful Slack automations are read → summarize → tell me. You don't have to post back to Slack to get value.
- **Double-check the workspace selector.** If you're in multiple Slack workspaces, the authorize screen can quietly default to the wrong one. Posting to Bok AI Lab when you meant your personal workspace (or vice versa) is embarrassing.
## Troubleshooting
**(Both clients) The authorize screen says "contact your workspace admin."** Some workspaces restrict which apps members can install themselves — the Slack MCP integration has to be pre-approved by a workspace admin before regular members can authorize it. In Bok AI Lab you shouldn't hit this, but if you do, ping Jordan or Jungyoon and they can approve the app at the workspace level.
**(Both clients) Calls fail with "not in channel."** The server can only see channels you're a member of. Join the channel in Slack, then try again.
**(Both clients) A post went to the wrong channel.** Slack won't let you un-send, but you can delete messages you posted. Open the message, click the three-dot menu, and delete. If you posted at scale, ask Claude to generate the list of message IDs to delete.
**(Claude app) The connector says "Connect" even after you authorized.** Refresh the page or restart the desktop app. If it still won't stick, go to Slack's **Manage Apps** page for Bok AI Lab, find the MCP app, remove it, and re-authorize from Claude's Connectors settings.
**(Claude Code) `/mcp` shows slack as `needs auth` even after you clicked through.** The browser handoff sometimes stalls. Run `/mcp` again and select slack to retry; if it keeps failing, uninstall and reinstall the plugin with `/plugin` inside Claude Code, then re-run `/plugin install slack`.
**(Claude Code) Claude Code says it doesn't have Slack tools.** You probably started Claude Code *before* the plugin finished installing. Quit and reopen — the plugin's `.mcp.json` entry gets loaded on startup.
**(Either client) You want to remove the server entirely.** In Claude Desktop, go to Customize → Connectors and disconnect Slack. In Claude Code, uninstall the plugin via `/plugin`. In both cases also go to Slack's **Manage Apps** for Bok AI Lab and revoke the authorization — otherwise the app stays authorized even though neither client is using it.
## One More Thing: MCP vs. the Slack API
You might be wondering: *"So if I build a Next.js app that posts build notifications to Slack, is MCP how it does that?"*
No — same distinction as the Airtable quest, worth pinning down.
| | Who's talking to Slack | When |
|---|---|---|
| **MCP (this quest)** | Claude or Claude Code, while you're working | At **dev time** — you're exploring, prototyping, testing |
| **Slack API (future quest)** | Your deployed app's server code, or a Slack App you built | At **runtime** — every time your app has something to say |
Your deployed app doesn't have Claude Code running inside it. It talks to Slack through the Slack Web API (via a bot token you've generated for the app), or through Slack's newer webhook and Events API.
MCP is a great sidekick *while you're building* — either client can prototype posts, inspect channel structure, and help you design what your eventual Slack App should say. But the deployed Slack App uses the regular Slack API at runtime.
## Key Concepts
| Term | What It Means |
|------|--------------|
| Slack workspace | A container for channels, DMs, and people — "Bok AI Lab" is the one for this quest |
| Slack App | A piece of software granted permission to act inside a Slack workspace |
| OAuth | The "click to authorize this app" flow where you grant access without handing over a password |
| Scope | A specific permission an app is asking for (e.g., "read channel messages," "post as you") |
| Bot token | A credential a Slack App uses to authenticate its API calls — you won't see one in this quest because the MCP server manages it |
| Channel ID | Slack's internal identifier for a channel (looks like `C01234ABCDE`) — distinct from the `#channel-name` you see in the UI |
| Claude Connector | The one-click integration mechanism in Claude Desktop (Customize → Connectors) — MCP under the hood |
| Claude Code plugin | A bundle that preconfigures one or more MCP servers (URL, OAuth, etc.) so you don't have to wire them up manually — installed via `/plugin install <name>` |
| `.mcp.json` | The project-level config file Claude Code reads on startup to learn which MCP servers to load |
| HTTP transport | An MCP server that lives at a URL (like Slack's) rather than running as a local program |
| Read-only sanity check | The habit of first testing a new MCP connection without write/post permissions |
| Chaining | When an LLM calls several MCP tools in sequence to finish a multi-step task — Claude Code's superpower |