Slack MCP Server
Provides comprehensive Slack workspace integration with tools for channel management (creating, archiving, listing channels), user management, messaging (sending, updating, deleting messages with Block Kit formatting), file uploads, emoji reactions, message search, and workspace information retrieval.
Click on "Deploy 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 Server send a message to #general saying our team meeting starts at 2 PM today"
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 TypeScript-based Model Context Protocol (MCP) server that provides comprehensive Slack workspace integration. This server enables AI assistants to interact with Slack channels, users, messages, files, and more through the MCP protocol.
Table of Contents
Related MCP server: Slack MCP Server
Features
Channel Management
list_channels - List workspace channels with filtering options
get_channel_info - Get detailed information about a specific channel
create_channel - Create new public or private channels
archive_channel - Archive channels
User Management
list_users - List all users in the workspace
get_user_info - Get detailed user profile information
invite_to_channel - Invite users to channels
Messaging
send_message - Send text messages to channels
update_message - Update existing messages
delete_message - Delete messages
get_channel_history - Fetch message history with pagination
search_messages - Search messages across the workspace
send_formatted_message - Send messages with Block Kit formatting
File Operations
upload_file - Upload files to channels
Reactions
add_reaction - Add emoji reactions to messages
remove_reaction - Remove emoji reactions
Workspace Information
get_team_info - Get workspace/team information
Prerequisites
Before you begin, ensure you have:
Node.js 18 or higher - Verify with:
node --versionnpm - Verify with:
npm --versionSlack workspace admin access - You need permission to create and install apps
Estimated setup time: ~20 minutes
Installation & Setup
Step 1: Project Setup (5 minutes)
Clone the repository and install dependencies:
# Clone the repository
git clone <your-repo-url>
cd slack-bot-mcp
# Install dependencies
npm install✓ Verification: Run npm list @modelcontextprotocol/sdk to confirm the MCP SDK is installed.
Step 2: Create Slack App (10 minutes)
2.1 Create the App
Click "Create New App" → "From scratch"
Enter an app name (e.g., "MCP Bot") and select your workspace
Click "Create App"
2.2 Configure OAuth Scopes
Navigate to "OAuth & Permissions" in the sidebar, scroll to "Scopes", and add these Bot Token Scopes:
Scope | Purpose | Used By |
| View basic channel information | list_channels, get_channel_info |
| Create channels | create_channel |
| Archive channels, invite users | archive_channel, invite_to_channel |
| View user profiles | list_users, get_user_info |
| Send and update messages | send_message, update_message, delete_message |
| Upload files to Slack | upload_file |
| Add/remove emoji reactions | add_reaction, remove_reaction |
| Get workspace information | get_team_info |
| Search messages | search_messages |
💡 Tip: Each scope is necessary for specific tools to function. Missing scopes will cause "missing_scope" errors.
2.3 Install to Workspace
Scroll to "OAuth Tokens for Your Workspace"
Click "Install to Workspace"
Review permissions and click "Allow"
2.4 Copy Your Bot Token
After installation, you'll see the "Bot User OAuth Token"
Click "Copy" (token starts with
xoxb-)Keep this token secure - you'll need it in the next step
✓ Verification: Your token should look like: xoxb-<numbers>-<numbers>-<random-string>
Step 3: Configure Environment (2 minutes)
Create your environment configuration:
# Copy the example file
cp .env.example .envEdit .env and add your bot token:
SLACK_BOT_TOKEN=xoxb-your-actual-token-here✓ Verification: Run this command to confirm your token is loaded:
node -e "require('dotenv').config(); console.log('Token loaded:', !!process.env.SLACK_BOT_TOKEN)"You should see: Token loaded: true
⚠️ Common Issue: Make sure your token starts with
xoxb-(notxoxp-orxoxa-)
Step 4: Build & Verify (3 minutes)
Build the TypeScript project:
npm run build✓ Verification: Confirm the build/ directory was created:
ls build/index.jsYou should see the compiled index.js file.
Testing Your Setup
Before integrating with Claude Desktop, test that everything works:
Using MCP Inspector
The MCP Inspector provides a GUI to test your tools:
npx @modelcontextprotocol/inspector node build/index.jsThis will open a web interface where you can:
See all available tools
Test individual tools with sample inputs
View responses and debug errors
Quick Test Commands
Try these simple tests in the MCP Inspector:
List channels:
Tool:
list_channelsArguments:
{"limit": 5}Expected: List of your workspace channels
Get team info:
Tool:
get_team_infoArguments:
{}Expected: Your workspace name and details
List users:
Tool:
list_usersArguments:
{"limit": 5}Expected: List of workspace users
✓ Success Indicator: If these commands return data (not errors), your setup is working correctly!
⚠️ Troubleshooting: If you see "invalid_auth" or "token_revoked", double-check your
SLACK_BOT_TOKENin the.envfile.
Usage
With Claude Desktop
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
Option 1: Direct from GitHub (Recommended)
Use npx to run directly from the GitHub repository:
{
"mcpServers": {
"slack": {
"command": "npx",
"args": [
"github:Hais/slack-bot-mcp"
],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-token-here"
}
}
}
}Benefits:
✓ No local installation needed
✓ Always uses the latest version
✓ Simpler configuration
✓ Works on any machine with Node.js
Option 2: Local Installation
For local development or offline use:
{
"mcpServers": {
"slack": {
"command": "node",
"args": ["/absolute/path/to/slack-bot-mcp/build/index.js"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-token-here"
}
}
}
}Setup for local installation:
Clone and build the project (see Installation & Setup)
Replace
/absolute/path/to/slack-bot-mcpwith your full project pathFind it by running
pwdin your project directoryExample:
/Users/yourname/projects/slack-bot-mcp/build/index.js
Important notes:
Token configuration: Set
SLACK_BOT_TOKENin the config file as shown aboveThe config file token takes precedence over
.envfilesKeep your token secure and never commit it to version control
Restart required: Restart Claude Desktop after editing the config file
First run: The first time using
npx, it will download and cache the package (may take a few seconds)
✓ Verification: Open Claude Desktop and type: "List my Slack channels". If configured correctly, Claude will use the list_channels tool.
With Other MCP Clients
The server runs on stdio transport and can be integrated with any MCP client:
node build/index.jsDevelopment Mode
For development with hot reload:
npm run devTool Examples
List Channels
{
"name": "list_channels",
"arguments": {
"types": "public_channel,private_channel",
"exclude_archived": true,
"limit": 50
}
}Send Message
{
"name": "send_message",
"arguments": {
"channel": "C1234567890",
"text": "Hello from MCP!"
}
}Send Formatted Message with Block Kit
{
"name": "send_formatted_message",
"arguments": {
"channel": "C1234567890",
"text": "Fallback text",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Hello* from MCP with _formatting_!"
}
}
]
}
}Search Messages
{
"name": "search_messages",
"arguments": {
"query": "important announcement",
"count": 10,
"sort": "timestamp"
}
}Upload File
{
"name": "upload_file",
"arguments": {
"channels": ["C1234567890"],
"content": "File content here",
"filename": "report.txt",
"title": "Monthly Report"
}
}Add Reaction
{
"name": "add_reaction",
"arguments": {
"channel": "C1234567890",
"timestamp": "1234567890.123456",
"name": "thumbsup"
}
}Required OAuth Scopes
Make sure your Slack app has these scopes:
Scope | Purpose |
| List and get channel information |
| Create channels |
| Archive channels |
| List and get user information |
| Send, update, and delete messages |
| Upload files |
| Add and remove reactions |
| Get workspace information |
| Search messages |
Project Structure
slack-bot-mcp/
├── src/
│ ├── index.ts # MCP server entry point
│ ├── tools/
│ │ ├── channels.ts # Channel management tools
│ │ ├── users.ts # User management tools
│ │ ├── messages.ts # Messaging tools
│ │ ├── files.ts # File upload tool
│ │ ├── reactions.ts # Reaction tools
│ │ └── workspace.ts # Workspace info tool
│ ├── config/
│ │ └── credentials.ts # Environment config loader
│ ├── types/
│ │ └── slack.ts # TypeScript interfaces
│ └── utils/
│ ├── slack-client.ts # Slack API wrapper
│ └── validators.ts # Zod input validators
├── build/ # Compiled JavaScript
├── .env # Your environment variables
├── .env.example # Environment template
├── package.json
├── tsconfig.json
└── README.mdTroubleshooting
Setup Issues
"SLACK_BOT_TOKEN environment variable is required"
Cause: The server can't find your bot token.
Solutions:
Verify
.envfile exists in project root:ls -la .envCheck token format:
cat .env(should showSLACK_BOT_TOKEN=xoxb-...)If using Claude Desktop config, ensure the token is in the
envsectionRestart your MCP client after making changes
"Missing required OAuth scope"
Cause: Your bot token doesn't have necessary permissions.
Solution:
Go to https://api.slack.com/apps → Your App → "OAuth & Permissions"
Add the missing scope (error message will specify which one)
Click "Reinstall to Workspace" (this is required after adding scopes)
Copy the new bot token and update your configuration
💡 Note: You must reinstall the app after changing scopes. The old token won't gain new permissions automatically.
Runtime Issues
"Channel not found" or "User not found"
Cause: You're using channel/user names instead of IDs.
Solution:
Channel IDs start with
C(public),G(private), orD(DM)User IDs start with
UUse
list_channelsorlist_userstools to find the correct IDs
Example:
// ❌ Wrong
{"channel": "general"}
// ✓ Correct
{"channel": "C1234567890"}"invalid_auth" or "token_revoked"
Cause: Bot token is incorrect or expired.
Solution:
Go to https://api.slack.com/apps → Your App → "OAuth & Permissions"
Copy the current "Bot User OAuth Token"
Update your
.envfile or Claude Desktop configRestart the MCP server
Rate Limiting
Cause: Slack API has rate limits (Tier 3: 50+ requests per minute).
Solution:
Add delays between rapid requests
Use pagination parameters (limit, cursor) for large data sets
Monitor rate limit headers in error messages
MCP Inspector Won't Start
Cause: Port already in use or Node.js issues.
Solution:
# Kill any existing inspector processes
pkill -f "mcp.*inspector"
# Try again
npx @modelcontextprotocol/inspector node build/index.jsGetting Help
If you're still stuck:
Check the build output: Run
npm run buildand look for TypeScript errorsVerify Node version: Run
node --version(need 18+)Test token manually: Use Slack's API tester at https://api.slack.com/methods/auth.test/test
Enable debug logging: Set
DEBUG=*environment variable
Still having issues? Open an issue at the GitHub repository with:
Error message (full text)
Your Node.js version
Steps to reproduce
Development
Building
npm run buildRunning in Development
npm run devTesting with MCP Inspector
npx @modelcontextprotocol/inspector node build/index.jsLicense
ISC
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Acknowledgments
Ported from the Python implementation: https://github.com/piekstra/slack-mcp-server
Available Tools
17 toolsadd_reactionB
Add an emoji reaction to a message
Inputs: channel (required), timestamp (required), name (required).
archive_channelC
Archive a channel
Inputs: channel (required).
create_channelC
Create a new channel
Inputs: name (required), is_private.
delete_messageC
Delete a message
Inputs: channel (required), ts (required).
get_channel_historyC
Get message history from a channel
Inputs: channel (required), limit, oldest, latest.
get_channel_infoC
Get detailed information about a specific channel
Inputs: channel (required).
get_team_infoB
Get information about the Slack workspace
Inputs: no named parameters.
get_user_infoC
Get detailed information about a specific user
Inputs: user (required).
invite_to_channelC
Invite users to a channel
Inputs: channel (required), users (required).
list_channelsC
List channels in the Slack workspace
Inputs: types, exclude_archived, limit.
list_usersC
List users in the Slack workspace
Inputs: limit.
remove_reactionB
Remove an emoji reaction from a message
Inputs: channel (required), timestamp (required), name (required).
search_messagesC
Search for messages across the workspace
Inputs: query (required), count, sort.
send_formatted_messageB
Send a message with Block Kit formatting
Inputs: channel (required), text (required), blocks (required), thread_ts.
send_messageB
Send a message to a channel
Inputs: channel (required), text (required), thread_ts.
update_messageC
Update an existing message
Inputs: channel (required), ts (required), text (required).
upload_fileC
Upload a file to Slack
Inputs: channels (required), content (required), filename (required), title, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Each tool has a clearly distinct purpose targeting specific resources and actions, such as send_message vs. send_formatted_message for different message types, and add_reaction vs. remove_reaction for opposite operations. There is no significant overlap that would cause confusion in tool selection.
All tool names follow a consistent verb_noun pattern with clear, descriptive actions like create_channel, get_channel_history, and update_message. The naming is uniform throughout, using snake_case without any deviations or mixed conventions.
With 17 tools, the count is slightly high but reasonable for a Slack integration covering channels, messages, users, files, and reactions. It provides comprehensive functionality without being overwhelming, though it borders on the upper limit of typical scopes.
The toolset offers complete CRUD/lifecycle coverage for Slack's core domain, including channel management (create, archive, invite, list, get info), message handling (send, update, delete, search, history), user operations (list, get info), and file uploads. No obvious gaps exist for common workflows.
Maintenance
Related MCP Connectors
Connect assistants to your workspace knowledge, skills, and work tools.
Enable interaction with Slack workspaces. Supports subscribing to Slack events through Resources.
Chat with your AI agents from Slack: each gets a thread in your DM, and your replies there wake it.
Use your apps from your AI: Gmail, Slack, Google Sheets, HubSpot and 2,300+ more on your accounts.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Slack workspaces through comprehensive integration capabilities. Supports channel management, messaging, thread replies, reactions, and message history retrieval through natural language commands.MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with Slack workspaces through comprehensive channel management, messaging, direct messages, search functionality, and user management capabilities.305 npm3MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Slack workspaces through natural language, supporting channel management, message operations, user profiles, reactions, and threaded conversations.-
- AlicenseAqualityDmaintenanceIntegrates AI assistants with Slack workspaces using OAuth 2.0 authenticated user tokens for secure, multi-functional interaction. It enables comprehensive operations including channel management, message searching, file handling, and reaction management through natural language.20169 npmMIT