🔌

Slack MCP

Communication920

Read, write, and manage Slack messages, channels, and users.

Claude DesktopCursor

Overview

Read, write, and manage Slack messages, channels, and users.

Setup

Run with npx:

npx -y @modelcontextprotocol/server-slack

Configuration

SLACK_BOT_TOKEN environment variable (xoxb-...)

Documentation

Slack MCP

Overview

Slack MCP is a Model Context Protocol server that enables AI agents to interact with Slack workspaces. It allows agents to read messages, send messages, manage channels, and integrate with Slack's collaboration features.

Key Features

💬 Messaging

  • Read Messages: Fetch messages from channels and DMs
  • Send Messages: Post messages to channels or users
  • Reply to Threads: Respond to specific thread messages
  • React to Messages: Add emojis to messages

📺 Channel Management

  • List Channels: View all public and private channels
  • Create Channels: Create new channels
  • Join/Leave Channels: Manage channel membership
  • Get Channel Info: View channel details and members

👥 User Management

  • List Users: View all workspace members
  • Get User Info: View user profile details
  • Get User Email: Retrieve user email addresses

🔍 Search

  • Search Messages: Find messages by keyword
  • Search Channels: Find channels by name
  • Filter by Date: Search within date ranges

Installation

# Using npx (recommended)
npx -y @modelcontextprotocol/server-slack

# With Slack token
SLACK_BOT_TOKEN=xoxb-your-bot-token npx -y @modelcontextprotocol/server-slack

Configuration

Required Setup

  1. Create a Slack App:

    • Visit Slack API
    • Click "Create New App" → "From scratch"
    • Name your app and select your workspace
  2. Configure OAuth Scopes: Go to OAuth & Permissions and add these scopes:

    • channels:history - View messages in channels
    • channels:read - View channel list and info
    • channels:manage - Create and manage channels
    • chat:write - Send messages
    • users:read - View user list and info
    • users:read.email - View user emails
    • reactions:write - Add emoji reactions
    • search:read - Search messages and files
  3. Install to Workspace:

    • Click "Install to Workspace"
    • Authorize the app
    • Copy the Bot User OAuth Token (starts with xoxb-)
  4. Enable Message Subscription (optional, for real-time updates):

    • Go to Event Subscriptions
    • Enable events
    • Add bot event subscriptions
  5. Configure in Claude Desktop:

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

Available Tools

ToolDescription
list_channelsList all accessible channels
get_channel_infoGet details about a specific channel
get_channel_membersGet members of a specific channel
join_channelJoin a channel
leave_channelLeave a channel
create_channelCreate a new channel
list_usersList all workspace users
get_user_infoGet details about a specific user
get_user_emailGet email address of a user
get_messagesGet messages from a channel
post_messagePost a message to a channel
reply_to_threadReply to a message thread
add_reactionAdd an emoji reaction to a message
search_messagesSearch for messages by keyword
search_channelsSearch for channels by name

Usage Examples

List Channels

Show me all the channels I'm in

Returns:

Channels:
- #general (156 members)
- #engineering (89 members)
- #product (45 members)
- #random (203 members)
- #announcements (156 members)

Get Channel Messages

Show me the last 10 messages from #engineering

Returns recent messages with timestamps and authors.

Search Messages

Find messages mentioning "deployment" from last week

Agent searches with:

  • Query: deployment
  • Date range: Last 7 days

Post a Message

Post this message to #general: "Team meeting tomorrow at 2pm"

Create a Channel

Create a new channel called #project-alpha

Get User Info

Who is @john.doe?

Returns:

Name: John Doe
Email: john.doe@company.com
Title: Senior Engineer
Status: 🚀 Shipping v2.0
Timezone: America/Los_Angeles

Reply to Thread

Reply to the last message in #engineering with "Thanks for the update!"

Add Reaction

Add a 👍 reaction to the message "Deployment successful" in #engineering

Search for Files

Find PDF files shared in #product last month

Integration with AI Agents

Meeting Assistant

Claude: "I see you have a team meeting in #general..."
[Reads meeting announcement]
Claude: "Would you like me to create a follow-up channel for meeting notes?"
[Creates #meeting-notes-2026-05-15]
Claude: "I'll track action items from the meeting and post summaries..."

Customer Support

User: "Someone asked about pricing in #support"
Claude: "Let me find that message..."
[Searches #support for pricing questions]
Claude: "Here's the message. Would you like me to draft a response?"
[Drafts response, posts to thread]

Team Coordination

Claude: "I noticed @alice mentioned a blocker in #engineering..."
[Reads message, identifies blocker]
Claude: "Should I notify the engineering lead?"
[Posts notification to #engineering-lead]

Daily Digest

Claude: "Here's your daily Slack digest..."
[Summarizes mentions, reactions, and important messages]
Claude: "You have 3 unread messages in #project-alpha and 2 mentions..."

Custom Agent Integration

from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
import os

# Connect to Slack MCP
server_params = StdioServerParameters(
    command="npx",
    args=["-y", "@modelcontextprotocol/server-slack"],
    env={"SLACK_BOT_TOKEN": os.environ["SLACK_BOT_TOKEN"]}
)

async with stdio_client(server_params) as (read, write):
    async with ClientSession(read, write) as session:
        await session.initialize()
        
        # List channels
        channels = await session.call_tool("list_channels", arguments={})
        
        # Get messages
        messages = await session.call_tool(
            "get_messages",
            arguments={"channel_id": "C123456", "limit": 10}
        )
        
        # Post message
        result = await session.call_tool(
            "post_message",
            arguments={
                "channel_id": "C123456",
                "text": "Hello from the AI agent!"
            }
        )
        
        # Search messages
        results = await session.call_tool(
            "search_messages",
            arguments={"query": "deployment", "count": 20}
        )

Security Considerations

Bot Token Security

⚠️ Important: Protect your Slack bot token:

  • Never commit tokens to version control
  • Use environment variables or secret managers
  • Rotate tokens regularly
  • Use the minimum required scopes

Channel Access

  • Bot only sees channels it's invited to
  • Private channels require explicit invitation
  • Consider using a dedicated bot user for MCP

Message Privacy

  • Bot can only read messages in channels it has access to
  • DMs require additional permissions
  • Be mindful of sensitive information in channels

Pros

  • Real-Time Collaboration: Direct Slack integration
  • Rich Messaging: Send, read, reply, react
  • Channel Management: Create and manage channels
  • User Directory: Access workspace user information
  • Search Capabilities: Find messages and channels
  • Thread Support: Work with threaded conversations

Cons

  • Token Required: Must create Slack app and bot
  • Scope Permissions: Need multiple OAuth scopes
  • Rate Limits: Slack API has rate limits
  • Bot Limitations: Can't access all user features
  • Setup Complexity: Multi-step Slack app setup

When to Use

Choose Slack MCP when:

  • Your team uses Slack for communication
  • You want AI to participate in Slack conversations
  • You need to search and analyze Slack messages
  • You want automated Slack notifications

Consider alternatives when:

  • Your team uses Discord, Teams, or other platforms
  • You only need occasional Slack access
  • You need advanced Slack workflow automation

Resources

Comparison

FeatureSlack MCPDiscord MCPTeams MCP
PlatformSlackDiscordMicrosoft Teams
Setup⚠️ Moderate✅ Easy⚠️ Complex
Message Access✅ Full✅ Full⚠️ Limited
Channel Mgmt✅ Yes✅ Yes⚠️ Limited
Search✅ Yes✅ Yes⚠️ Limited
Enterprise✅ Yes⚠️ No✅ Yes

Last updated: May 2026