Slack MCP Server
Allows searching Slack channels and messages, listing available workspace channels, and retrieving detailed message history from specific channels.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Slack MCP Serverfind messages about the API update in #development"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Slack MCP Server
A Model Context Protocol (MCP) server for searching Slack channels and messages.
Features
list_channels - List available Slack channels in the workspace
search_messages - Search for messages across channels using text matching
get_channel_history - Get message history from a specific channel
Installation
Using npx (Recommended)
No installation required. Add directly to your config:
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"slack": {
"command": "npx",
"args": ["-y", "github:nikhilchintawar/slack-mcp"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-token-here"
}
}
}
}Claude Code (~/.claude/settings.json):
{
"mcpServers": {
"slack": {
"command": "npx",
"args": ["-y", "github:nikhilchintawar/slack-mcp"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-token-here"
}
}
}
}Manual Installation
# Clone the repository
git clone https://github.com/nikhilchintawar/slack-mcp.git
cd slack-mcp
# Install dependencies
npm install
# Build
npm run buildThen add to your config:
{
"mcpServers": {
"slack": {
"command": "node",
"args": ["/absolute/path/to/slack-mcp/build/index.js"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-token-here"
}
}
}
}Configuration
Config File Locations
Claude Desktop (macOS):
~/Library/Application Support/Claude/claude_desktop_config.jsonClaude Desktop (Windows):
%APPDATA%\Claude\claude_desktop_config.jsonClaude Code:
~/.claude/settings.json
Environment Variables
Variable | Required | Description |
| Yes | Slack Bot User OAuth Token |
| No | Comma-separated list of allowed channels (restricts searches) |
| No | Default channel ID for operations |
Channel Restrictions
Use SLACK_CHANNELS to restrict which channels can be searched. When configured:
Searches without a channel specified will search all allowed channels
Searches with a specific channel will validate it's in the allowed list
get_channel_historywill only work with allowed channels
{
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-token",
"SLACK_CHANNELS": "general,engineering,support"
}
}Slack App Setup
Create a Slack App at https://api.slack.com/apps
Go to "OAuth & Permissions"
Add the following Bot Token Scopes:
channels:read- List public channelschannels:history- Read messages from public channelsgroups:read- List private channels (optional)groups:history- Read messages from private channels (optional)
Install the app to your workspace
Copy the "Bot User OAuth Token" (starts with
xoxb-)Important: Add the bot to each channel you want to search (right-click channel → "Open channel details" → "Integrations" → "Add apps")
Usage Examples
Once configured, you can use natural language to interact with Slack:
"List all channels in my Slack workspace"
"Search for messages about deployment in #engineering"
"Show me the last 50 messages from #general"
"Find messages from @john about the API"
"Search for error messages from last week"
Available Tools
list_channels
List available Slack channels in the workspace.
Parameter | Required | Description |
| No | Include private channels (default: false) |
| No | Include archived channels (default: false) |
| No | Max results (default: 100, max: 1000) |
search_messages
Search for messages across Slack channels using text matching. Fetches channel history and filters by query.
Parameter | Required | Description |
| Yes | Search text (case-insensitive). Use |
| No | Channel ID or name. If not set, searches all |
| No | Search messages after date (YYYY-MM-DD or ISO 8601) |
| No | Search messages before date (YYYY-MM-DD or ISO 8601) |
| No | Max results (default: 20, max: 100) |
Query examples:
error- messages containing "error"error warning- messages containing both "error" AND "warning"error | warning- messages containing "error" OR "warning"
get_channel_history
Get message history from a specific Slack channel.
Parameter | Required | Description |
| No | Channel ID (uses env var default) |
| No | Start time (Unix timestamp or ISO date) |
| No | End time (Unix timestamp or ISO date) |
| No | Max results (default: 100, max: 1000) |
| No | Include thread replies (default: false) |
Development
# Watch mode for development
npm run dev
# Build for production
npm run build
# Test with MCP Inspector
SLACK_BOT_TOKEN=xoxb-your-token \
npx @modelcontextprotocol/inspector node build/index.jsLicense
MIT
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nikhilchintawar/slack-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server