Slack MCP Server

Slack MCP Server

A Model Context Protocol (MCP) server for Slack integration, allowing Claude to interact with your Slack workspace.

Category
Visit Server

README

Slack MCP Server

A Model Context Protocol (MCP) server for Slack integration, allowing Claude to interact with your Slack workspace. This server runs exclusively in Docker/Podman containers.

Features

  • Send messages to channels or users
  • Send replies to message threads
  • Search for messages across the workspace
  • List all channels in workspace
  • Get channel message history
  • Get replies from message threads
  • List all users in workspace

Prerequisites

  • Docker or Podman installed
  • A Slack Bot Token (see Setup section)

Setup

1. Create a Slack App

  1. Go to https://api.slack.com/apps
  2. Click "Create New App" → "From scratch"
  3. Give it a name and select your workspace

2. Configure Bot Token Scopes

Go to OAuth & Permissions and add these Bot Token Scopes:

  • channels:read
  • chat:write
  • users:read
  • channels:history
  • groups:read
  • groups:history

3. Install the App

  1. Click "Install to Workspace"
  2. Copy the Bot User OAuth Token (starts with xoxb-)

4. Set Up Environment Variable

Create a .env file in the project root:

SLACK_BOT_TOKEN=xoxb-your-bot-token-here

Running with Docker

Build the Image

docker build -t slack-mcp-server .

Run the Container

docker run -i \
  -e SLACK_BOT_TOKEN=xoxb-your-bot-token-here \
  slack-mcp-server

Using docker-compose

# Set your token in .env file first
docker-compose up

Running with Podman

Build the Image

podman build -t slack-mcp-server .

Run the Container

podman run -i \
  -e SLACK_BOT_TOKEN=xoxb-your-bot-token-here \
  slack-mcp-server

Using podman-compose

# Set your token in .env file first
podman-compose up

Configuration with Claude Code

Add this to your Claude Code MCP settings file:

Docker Configuration

{
  "mcpServers": {
    "slack": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SLACK_BOT_TOKEN=xoxb-your-actual-bot-token-from-step-3",
        "slack-mcp-server"
      ]
    }
  }
}

Podman Configuration

{
  "mcpServers": {
    "slack": {
      "command": "podman",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SLACK_BOT_TOKEN=xoxb-your-actual-bot-token-from-step-3",
        "slack-mcp-server"
      ]
    }
  }
}

Alternative: Using Environment File

{
  "mcpServers": {
    "slack": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--env-file",
        "/absolute/path/to/.env",
        "slack-mcp-server"
      ]
    }
  }
}

Available Tools

The server communicates via stdio and provides these tools:

  • send_message: Send a message to a channel or user
  • send_thread_reply: Send a reply to a message thread
  • search_messages: Search for messages across the workspace (supports Slack search syntax)
  • list_channels: List all workspace channels
  • get_channel_history: Get recent messages from a channel
  • get_thread_replies: Get all replies from a message thread
  • list_users: List all workspace users

Search Examples

The search_messages tool supports Slack's powerful search syntax:

  • "error message" - Search for exact phrase
  • from:@username - Messages from specific user
  • in:#channel - Messages in specific channel
  • after:2024-01-01 - Messages after date
  • has:link - Messages containing links
  • Combine: from:@john in:#general error - Complex queries

Development

Build and Test Locally

# Build the image
docker build -t slack-mcp-server:dev .

# Run tests
docker run --rm slack-mcp-server:dev npm test

Shell Access for Debugging

docker run -it --rm \
  -e SLACK_BOT_TOKEN=xoxb-your-token \
  --entrypoint /bin/sh \
  slack-mcp-server

Security Features

  • Multi-stage build for minimal image size
  • Non-root user execution
  • Read-only root filesystem
  • No new privileges
  • Resource limits configured in docker-compose
  • Minimal Alpine Linux base image

Troubleshooting

Container exits immediately

Make sure you're running with -i (interactive) flag for stdin communication.

Token not found

Verify your SLACK_BOT_TOKEN is correctly set in the environment or .env file.

Permission errors

The container runs as a non-root user (nodejs). Ensure any mounted volumes have appropriate permissions.

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured