Slack MCP Server
A Model Context Protocol (MCP) server for Slack integration, allowing Claude to interact with your Slack workspace.
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
- Go to https://api.slack.com/apps
- Click "Create New App" → "From scratch"
- Give it a name and select your workspace
2. Configure Bot Token Scopes
Go to OAuth & Permissions and add these Bot Token Scopes:
channels:readchat:writeusers:readchannels:historygroups:readgroups:history
3. Install the App
- Click "Install to Workspace"
- 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 usersend_thread_reply: Send a reply to a message threadsearch_messages: Search for messages across the workspace (supports Slack search syntax)list_channels: List all workspace channelsget_channel_history: Get recent messages from a channelget_thread_replies: Get all replies from a message threadlist_users: List all workspace users
Search Examples
The search_messages tool supports Slack's powerful search syntax:
"error message"- Search for exact phrasefrom:@username- Messages from specific userin:#channel- Messages in specific channelafter:2024-01-01- Messages after datehas: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
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.