Slack

Provides Slack channel search, message querying, and channel history via MCP endpoints.
  • javascript

0

GitHub Stars

javascript

Language

3 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "nikhilchintawar-slack-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "github:nikhilchintawar/slack-mcp"
      ],
      "env": {
        "SLACK_CHANNELS": "general,engineering,support",
        "SLACK_BOT_TOKEN": "xoxb-your-token-here",
        "SLACK_DEFAULT_CHANNEL": "C0123456789"
      }
    }
  }
}

You can use the Slack MCP Server to search Slack channels and messages through a Model Context Protocol client. It provides simple endpoints to list channels, search messages by text, and fetch channel histories, enabling seamless integration with your workflows and assistants.

How to use

To use the Slack MCP Server with your MCP client, load it as an MCP service and call its tools to list channels, search messages, or retrieve channel histories. You can search across configured channels, filter results by channel, and request histories with optional date ranges. Ensure your client passes the appropriate parameters and handles token-based authentication as needed by Slack.

How to install

Prerequisites: you need Node.js and npm installed on your system to run the MCP server via npm or npx. You will also require a Slack Bot User OAuth Token with the proper scopes.

Option A: Run via npx (recommended) Use this approach to start quickly without local installation.

{
  "mcpServers": {
    "slack_desktop": {
      "command": "npx",
      "args": ["-y", "github:nikhilchintawar/slack-mcp"],
      "env": {
        "SLACK_BOT_TOKEN": "xoxb-your-token-here"
      }
    }
  }
}

Option B: Run via npx for the Claude Code configuration (same commands, different config file):

{
  "mcpServers": {
    "slack_code": {
      "command": "npx",
      "args": ["-y", "github:nikhilchintawar/slack-mcp"],
      "env": {
        "SLACK_BOT_TOKEN": "xoxb-your-token-here"
      }
    }
  }
}

Additional installation path

Option C: Manual installation from source if you prefer to build locally.

# Clone the repository
git clone https://github.com/nikhilchintawar/slack-mcp.git
cd slack-mcp

# Install dependencies
npm install

# Build
npm run build

After building, add to your MCP configuration to point to the built index. Here is an example command-based configuration:

{
  "mcpServers": {
    "slack": {
      "command": "node",
      "args": ["/absolute/path/to/slack-mcp/build/index.js"],
      "env": {
        "SLACK_BOT_TOKEN": "xoxb-your-token-here"
      }
    }
  }
}

Configuration

You configure the Slack MCP Server with environment variables and optional channel restrictions. The following options appear in the configuration and control access and behavior.

Environment variables

The following variables can be set in your environment to control access and behavior. Marked as required if specified.

SLACK_BOT_TOKEN: required - Slack Bot User OAuth Token (xoxb-...)
SLACK_CHANNELS: optional - comma-separated list of allowed channel IDs or names
SLACK_DEFAULT_CHANNEL: optional - default channel ID for operations

Channel restrictions

Use SLACK_CHANNELS to restrict which channels can be searched. If configured, searches without a channel will cover all allowed channels, searches with a specific channel will validate that it is in the allowed list, and get_channel_history will only work with allowed channels.

{
  "env": {
    "SLACK_BOT_TOKEN": "xoxb-your-token",
    "SLACK_CHANNELS": "general,engineering,support"
  }
}

Slack App setup

Follow these steps to prepare Slack access for the MCP server: create a Slack App, grant the necessary OAuth scopes, install the app to your workspace, and provide the Bot User OAuth Token to the MCP server.

Steps to configure the Slack App:

  1. Create a Slack App at the Slack API site.

  2. Go to OAuth & Permissions and add scopes: channels:read, channels:history, groups:read (optional), groups:history (optional).

  3. Install the app to your workspace and copy the Bot User OAuth Token (starts with xoxb-).

  4. Add the bot to each channel you want to search.

Usage examples

You can use natural language prompts with your MCP client to perform actions such as listing channels, searching for messages, or showing channel history.

Available tools

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.

Notes on usage and behavior

All token-based requests should be kept secure. If you restrict channels, ensure your client enforces the same restrictions to avoid exposing data from unauthorized channels.

Development

If you are developing against this MCP server, you can run in watch mode, build for production, or test with the MCP Inspector by providing your Slack token and starting the compiled bundle.

# 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.js

License

MIT License.

Available tools

list_channels

List available Slack channels in the workspace.

search_messages

Search for messages across Slack channels using text matching.

get_channel_history

Get message history from a specific Slack channel.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational