Slack MCP Server: Give Your AI Agents Real-Time Slack Access
Your AI agents are getting smarter by the week. But they’re still flying blind when it comes to your team’s actual work — the threads, decisions, and context living inside Slack.
A Slack MCP server fixes that. It gives any MCP-compatible AI agent (Claude, Cursor, TeamDay, or your own) live read/write access to your Slack workspace. Suddenly your agent can check the #incidents channel before escalating a bug, post a standup summary without you touching a keyboard, or search three months of sales discussions to draft a proposal.
This guide walks through everything: what Slack MCP servers are, how to set one up in under 20 minutes, and five patterns developers are actually shipping with them.
What Is MCP, and Why Does It Matter for Slack?
Model Context Protocol (MCP) is an open standard from Anthropic that lets AI agents connect to external tools and data sources through a consistent interface. Instead of each AI integration requiring custom code, MCP defines a universal plug-in format.
An MCP server is a small process that:
- Declares a list of tools (functions the AI can call)
- Accepts tool call requests from the AI
- Executes the action and returns results
A Slack MCP server exposes your Slack workspace as a set of tools: read_channel, post_message, search_messages, list_users, and so on. Once connected, any MCP-compatible AI can call these tools naturally in conversation.
Why Connect Slack to Your AI Agents?
Before getting into the setup, here’s what becomes possible when your AI agents have live Slack access:
- Context-aware responses — An agent handling a support ticket can check
#customer-successfor previous discussions before responding - Autonomous notifications — A deployment agent posts to
#releaseswhen a build completes, with a diff summary - Meeting prep — An agent reads the last 30 messages in
#productbefore a standup and drafts talking points - Incident response — An on-call agent monitors
#alerts, correlates patterns, and pages humans only when needed - Knowledge retrieval — Ask an agent “what did we decide about the pricing model last month?” — it searches Slack and tells you
Prerequisites
- A Slack workspace with admin access (or permission to create apps)
- Node.js 18+ or Python 3.10+
- An MCP-compatible AI client: Claude Desktop, Cursor, or an agent platform like TeamDay
- 20 minutes
Step 1: Create a Slack App
Go to api.slack.com/apps and click Create New App → From scratch.
Name it something like AI Agent and select your workspace.
Configure OAuth Scopes
Under OAuth & Permissions → Bot Token Scopes, add:
channels:read
channels:history
chat:write
users:read
search:read
For private channels and DMs, also add:
groups:read
groups:history
im:read
im:history
Install the App
Click Install to Workspace and authorize. Copy the Bot User OAuth Token — it starts with xoxb-. You’ll need this in the next step.
Step 2: Install the Slack MCP Server
The fastest path is the official @slack/mcp-server package:
npm install -g @slack/mcp-server
Or use npx without installing globally:
npx @slack/mcp-server
Set your bot token as an environment variable:
export SLACK_BOT_TOKEN=xoxb-your-token-here
Test it’s working:
npx @slack/mcp-server --list-tools
You should see output listing available tools like slack_list_channels, slack_post_message, slack_read_channel, etc.
Step 3: Connect to Claude Desktop
Open your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add the Slack MCP server:
{
"mcpServers": {
"slack": {
"command": "npx",
"args": ["@slack/mcp-server"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-token-here"
}
}
}
}
Restart Claude Desktop. You’ll see a plug icon in the bottom-left indicating MCP servers are connected. Now you can ask Claude:
“What’s the latest status update in #releases?”
“Post a message to #dev-alerts: deployment v2.3.1 complete”
“Search for messages about ‘database migration’ from last week”
Step 4: Connect to an Agent Platform
If you’re running autonomous agents (agents that work without you in the conversation), you’ll want to wire this up at the platform level.
Using TeamDay
TeamDay supports custom MCP servers across all your AI agents. Once you add the Slack MCP, every agent in your workspace gets Slack access without per-conversation configuration.
In your TeamDay space settings, add a new MCP with these parameters:
{
"name": "Slack",
"command": "npx @slack/mcp-server",
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-token-here"
}
}
Your agents (the SEO analyst, the content writer, the DevOps bot) can now all post to Slack, read channel history, and search messages as part of their autonomous missions.
Custom MCP Client (Node.js)
If you’re building your own agent, use the official MCP TypeScript SDK:
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
const transport = new StdioClientTransport({
command: "npx",
args: ["@slack/mcp-server"],
env: { SLACK_BOT_TOKEN: process.env.SLACK_BOT_TOKEN }
});
const client = new Client({ name: "my-agent", version: "1.0.0" }, {});
await client.connect(transport);
// List available tools
const tools = await client.listTools();
console.log(tools.tools.map(t => t.name));
// Call a tool
const result = await client.callTool({
name: "slack_read_channel",
arguments: { channel: "C0123ABCDEF", limit: 10 }
});
console.log(result.content);
5 Agent Patterns You Can Ship This Week
1. Daily Standup Summarizer
An agent reads your #standup channel each morning and posts a summary to #leaders:
Tools used: slack_read_channel → LLM summarize → slack_post_message
Schedule: 9:05 AM daily (after standup posts)
2. Incident Correlation
When PagerDuty fires, an agent searches Slack for the last 3 similar incidents and posts root cause history to #incidents before the on-call engineer even opens Slack.
3. Customer Context Aggregator
Before a sales call, an agent searches #customer-success and #support for the account name and prepares a one-paragraph briefing. Drops it in #crm-updates with the meeting link.
4. Release Notes Generator
When a PR is merged, an agent reads the commit messages, queries #product-decisions for context, and posts formatted release notes to #releases.
5. Knowledge Search
A /ask slash command in Slack that queries an AI agent with your last 90 days of channel history. Users get AI-synthesized answers drawn from real team discussions — not hallucinations.
Troubleshooting
”missing_scope” errors
Your bot token is missing required OAuth scopes. Go back to your Slack App’s OAuth & Permissions page, add the missing scope, and reinstall the app to get a new token.
Rate limiting
Slack’s API has tier-based rate limits. The Slack MCP server handles basic rate limiting, but if you’re calling channels:history in bulk, add delays or use the cursor-based pagination built into the tool.
”channel_not_found”
Your bot isn’t in the channel. Go to Slack, open the channel, and type /invite @YourAppName. The bot needs to be a member to read a channel’s history.
Connection timeouts in Claude Desktop
Make sure npx is in your PATH. Try replacing npx with the full path: which npx to find it, then use the absolute path in your config.
Building a Custom Slack MCP Server
If you need capabilities beyond the official server (thread replies, file uploads, emoji reactions at scale), building your own takes about 100 lines:
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { WebClient } from "@slack/web-api";
const slack = new WebClient(process.env.SLACK_BOT_TOKEN);
const server = new Server({ name: "slack-custom", version: "1.0.0" }, {
capabilities: { tools: {} }
});
server.setRequestHandler("tools/list", async () => ({
tools: [
{
name: "post_to_channel",
description: "Post a message to a Slack channel",
inputSchema: {
type: "object",
properties: {
channel: { type: "string", description: "Channel name or ID" },
text: { type: "string", description: "Message text (Markdown supported)" }
},
required: ["channel", "text"]
}
},
{
name: "search_slack",
description: "Search Slack messages across all channels",
inputSchema: {
type: "object",
properties: {
query: { type: "string", description: "Search query" },
count: { type: "number", description: "Max results (default 10)" }
},
required: ["query"]
}
}
]
}));
server.setRequestHandler("tools/call", async (request) => {
const { name, arguments: args } = request.params;
if (name === "post_to_channel") {
const result = await slack.chat.postMessage({
channel: args.channel,
text: args.text,
mrkdwn: true
});
return { content: [{ type: "text", text: `Posted: ${result.ts}` }] };
}
if (name === "search_slack") {
const result = await slack.search.messages({
query: args.query,
count: args.count || 10
});
const messages = result.messages?.matches?.map(m =>
`[${m.channel?.name}] ${m.username}: ${m.text}`
).join("\n");
return { content: [{ type: "text", text: messages || "No results" }] };
}
});
const transport = new StdioServerTransport();
await server.connect(transport);
Run with:
SLACK_BOT_TOKEN=xoxb-... node slack-mcp.js
What to Build Next
Once your agents have Slack access, the next natural step is giving them persistent memory and scheduled autonomy. That’s where most teams move from “interesting demo” to “agent that actually runs our workflows.”
TeamDay ships with Slack MCP support alongside memory, scheduling, and multi-agent coordination out of the box. If you’re building on top of the patterns in this guide, it’s worth a look.
Published March 2026. This guide covers @slack/mcp-server v0.x and MCP spec 2024-11-05. The Slack and MCP ecosystems are moving fast — check the official MCP docs and Slack API changelog for updates.