Skip to main content
Glama
Slack MCP Server

Slack MCP Server

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

Related MCP server: Slack MCP Server

Installation

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 build

Then 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.json

  • Claude Desktop (Windows): %APPDATA%\Claude\claude_desktop_config.json

  • Claude Code: ~/.claude/settings.json

Environment Variables

Variable

Required

Description

SLACK_BOT_TOKEN

Yes

Slack Bot User OAuth Token

SLACK_CHANNELS

No

Comma-separated list of allowed channels (restricts searches)

SLACK_DEFAULT_CHANNEL

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_history will only work with allowed channels

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

Slack App Setup

  1. Create a Slack App at https://api.slack.com/apps

  2. Go to "OAuth & Permissions"

  3. Add the following Bot Token Scopes:

    • channels:read - List public channels

    • channels:history - Read messages from public channels

    • groups:read - List private channels (optional)

    • groups:history - Read messages from private channels (optional)

  4. Install the app to your workspace

  5. Copy the "Bot User OAuth Token" (starts with xoxb-)

  6. 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

includePrivate

No

Include private channels (default: false)

includeArchived

No

Include archived channels (default: false)

limit

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

query

Yes

Search text (case-insensitive). Use | for OR, spaces for AND

channel

No

Channel ID or name. If not set, searches all SLACK_CHANNELS

after

No

Search messages after date (YYYY-MM-DD or ISO 8601)

before

No

Search messages before date (YYYY-MM-DD or ISO 8601)

limit

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

channel

No

Channel ID (uses env var default)

oldest

No

Start time (Unix timestamp or ISO date)

latest

No

End time (Unix timestamp or ISO date)

limit

No

Max results (default: 100, max: 1000)

includeThreadReplies

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

License

MIT

Available Tools

3 tools
get_channel_historyC

Get message history from a specific Slack channel

Inputs: channel, oldest, latest, limit, +1 more.

list_channelsB

List available Slack channels in the workspace

Inputs: includePrivate, includeArchived, limit.

search_messagesC

Search for messages across Slack channels using query syntax

Inputs: query (required), channel, after, before, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: get_channel_history retrieves messages from a specific channel, list_channels enumerates available channels, and search_messages performs cross-channel searches. There is no overlap in functionality, making tool selection straightforward for an agent.

    Naming Consistency5/5

    All tools follow a consistent verb_noun naming pattern (get_channel_history, list_channels, search_messages), using snake_case uniformly. The verbs (get, list, search) are appropriate and predictable, enhancing readability and usability.

    Tool Count3/5

    With only 3 tools, the server feels thin for a Slack integration, as it lacks essential operations like sending messages, managing users, or handling reactions. While the tools are well-defined, the count is borderline low for the domain's typical scope.

    Completeness2/5

    The toolset is significantly incomplete for a Slack server, missing core CRUD operations such as sending messages, creating channels, updating messages, or deleting content. This creates dead ends for agents trying to perform common Slack workflows, likely leading to failures.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that enables LLMs to access Slack's search functionality to retrieve users, channels, messages, and thread replies from a Slack workspace.
      4
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that enables AI agents to search and retrieve messages within a Slack workspace using the Slack Web API. It supports specific channel filtering and includes built-in rate limit handling for efficient message discovery.
      133 npm
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that enables interaction with Slack workspaces through tools for managing channels, sending messages, and retrieving user profiles. It leverages the Slack API and FastMCP to provide functionalities like message history lookup and reaction management.
      1
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      This MCP server provides integration with the Slack API via HTTP transport, allowing for channel management and message operations. It enables users to list channels, send or edit messages, search message history, and retrieve user information through standardized tools.
      133 npm
      MIT