Slack MCP Server

by SergioKingOne

128 downloads
Not rated
GitHub

Description

# Slack MCP Server A comprehensive Model Context Protocol (MCP) server that enables LLMs to interact with Slack workspaces. This server provides tools for searching, reading, and managing Slack content, along with resources for workspace information and prompts for common…

About

# Slack MCP Server A comprehensive Model Context Protocol (MCP) server that enables LLMs to interact with Slack workspaces. This server provides tools for searching, reading, and managing Slack content, along with resources for workspace information and prompts for common workflows. ## Features ### 🛠️ Tools (11…

Details

Author
SergioKingOne
Downloads
128
Categories
Communication

- 11 tools for channel, message, user, file, and reaction management
- 4 resources for workspace, user, and channel metadata
- 5 prompts for guided workflows like standup and knowledge search
- Search with modifiers (from, in, after, before, has:link, has:file)
- Pagination and rate-limit awareness
- Modular architecture for easy extension

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Slack MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install via npx with a Slack bot token and team ID. Add the server to your Claude Desktop configuration under mcpServers, specifying "command": "npx", "args": ["-y", "@sergdev1/slack-mcp-server"], and setting SLACK_BOT_TOKEN and SLACK_TEAM_ID environment variables.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "slack mcp server": {
            "slack-mcp-server-sergiokingone": {
                "command": "npx",
                "args": [
                    "@modelcontextprotocol/inspector"
                ]
            }
        }
    }
}

McpServers

{
    "slack-mcp-server-sergiokingone": {
        "command": "npx",
        "args": [
            "@modelcontextprotocol/inspector"
        ]
    }
}

Slack MCP Server

A comprehensive Model Context Protocol (MCP) server that enables LLMs to interact with Slack workspaces. This server provides tools for searching, reading, and managing Slack content, along with resources for workspace information and prompts for common workflows.

Features

🛠️ Tools (11 available)

- Channel Management
- slack_list_channels - Browse public and private channels
- slack_get_channel_info - Get detailed channel information
- slack_list_bookmarks - List bookmarks in a channel
- Message Operations
- slack_list_messages - Read messages from channels and threads
- slack_list_threads - Discover threaded conversations
- slack_search_messages - Search across the workspace
- User Management
- slack_get_user_info - Get detailed user information
- slack_list_users - List workspace users
- Content & Reactions
- slack_list_files - Browse shared files
- slack_add_reaction - Add emoji reactions
- slack_remove_reaction - Remove emoji reactions

📚 Resources (4 available)

- slack://workspace - Workspace information
- slack://me - Current bot user information
- slack://users - Complete user directory
- slack://channels - All accessible channels

💡 Prompts (5 available)

- find_recent_discussions - Search for discussions on specific topics
- channel_activity_summary - Summarize channel activity
- team_member_activity - Check team member participation
- daily_standup_helper - Gather standup information
- knowledge_search - Find institutional knowledge

Quick Start

1. Create a Slack App

1. Go to api.slack.com/apps and click "Create New App"
2. Choose "From scratch" and give your app a name
3. Select the workspace where you want to install it

2. Configure OAuth Scopes

In your app settings, go to "OAuth & Permissions" and add these Bot Token Scopes:

Essential Scopes:

- channels:read - View basic channel information
- channels:history - View messages in public channels
- groups:read - View basic information about private channels
- groups:history - View messages in private channels
- users:read - View people in the workspace
- users:read.email - View email addresses
- team:read - View workspace information

Additional Scopes for Full Functionality:

- im:read - View direct messages
- im:history - View messages in direct messages
- mpim:read - View group direct messages
- mpim:history - View messages in group direct messages
- search:read - Search messages
- files:read - View files
- reactions:read - View emoji reactions
- reactions:write - Add and remove reactions
- bookmarks:read - View bookmarks

3. Install the App

1. In "OAuth & Permissions", click "Install to Workspace"
2. Copy the "Bot User OAuth Token" (starts with xoxb-)

4. Configure Claude Desktop

Add to your Claude Desktop config:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "slack": {
      "command": "npx",
      "args": ["-y", "@sergdev1/slack-mcp-server"],
      "env": {
        "SLACK_BOT_TOKEN": "xoxb-your-bot-token",
        "SLACK_TEAM_ID": "T01234567"
      }
    }
  }
}

Usage Examples

Using Tools

"Search for messages about the deployment"
"List all channels I have access to"
"Show me threads in #engineering from the last week"
"Get information about user U1234567890"
"Add a thumbsup reaction to message 1234567890.123456 in channel C1234567890"

Using Resources

Resources provide quick access to commonly needed information:

"Check the workspace resource for company info"
"Look at the users resource to see all team members"
"Review the channels resource for a complete channel list"

Using Prompts

Prompts provide guided workflows for common tasks:

"Use the find_recent_discussions prompt to search for budget talks"
"Run the channel_activity_summary for #general and #random"
"Execute daily_standup_helper for the #engineering channel"
"Use knowledge_search to find our deployment process"

Detailed API Reference

Tools

slack_list_channels

Lists channels in your Slack workspace.

Parameters:

- exclude_archived (boolean, optional): Exclude archived channels (default: true)
- types (string, optional): Channel types (default: "public_channel,private_channel")
- limit (number, optional): Maximum channels to return (default: 100)
- cursor (string, optional): Pagination cursor

slack_search_messages

Search for messages across the workspace.

Parameters:

- query (string, required): Search query with Slack modifiers
- count (number, optional): Results per page (default: 20)
- page (number, optional): Page number (default: 1)
- highlight (boolean, optional): Highlight matches (default: true)
- sort (string, optional): Sort by 'score' or 'timestamp' (default: 'score')
- sort_dir (string, optional): Sort direction 'asc' or 'desc' (default: 'desc')

Search Modifiers:

- from:@username - Messages from specific user
- in:#channel - Messages in specific channel
- after:2024-01-01 - Messages after date
- before:2024-12-31 - Messages before date
- has:link - Messages with links
- has:file - Messages with files

slack_add_reaction / slack_remove_reaction

Manage emoji reactions on messages.

Parameters:

- channel (string, required): Channel ID
- timestamp (string, required): Message timestamp
- name (string, required): Emoji name without colons (e.g., 'thumbsup')

Resources

Resources are accessed via their URIs and return JSON data:

- slack://workspace: Returns workspace ID, name, domain, and enterprise info
- slack://me: Returns bot user ID, name, and authentication details
- slack://users: Returns all active users with profiles
- slack://channels: Returns all accessible channels with metadata

Prompts

Each prompt accepts arguments and returns a structured message for the LLM:

find_recent_discussions

- topic (string, required): Topic to search for
- days (string, optional): Days to look back (default: "7")

channel_activity_summary

- channel_names (string, required): Comma-separated channel names
- hours (string, optional): Hours to analyze (default: "24")

Advanced Configuration

Environment Variables

- SLACK_BOT_TOKEN (required): Your Slack bot token
- SLACK_TEAM_ID (optional): Your workspace ID for team info

Security Best Practices

1. Token Security

- Never commit tokens to version control
- Use environment variables for sensitive data
- Rotate tokens regularly

2. Channel Access

- Bot must be invited to private channels: /invite @your-bot-name
- DMs require explicit user permission

3. Rate Limits
- Respect Slack's rate limits
- Implement exponential backoff for retries
- Cache frequently accessed data

Development

Project Structure

slack-mcp-server/
├── src/
│   ├── index.ts       # Main server entry point
│   ├── slack-client.ts # Slack API client wrapper
│   ├── tools.ts       # Tool implementations
│   ├── resources.ts   # Resource handlers
│   ├── prompts.ts     # Prompt definitions
│   └── types.ts       # TypeScript interfaces
├── package.json
├── tsconfig.json
└── README.md

Building from Source

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.