Slack Search MCP Server

Slack Search MCP Server

An MCP server that enables LLMs to access Slack's search functionality to retrieve users, channels, messages, and thread replies from a Slack workspace.

Category
Visit Server

README

Slack Search MCP Server

A Model Context Protocol (MCP) server that provides tools and resources to access Slack's search functionality. This server allows LLMs to search and retrieve users, channels, messages, and more from a Slack workspace.

Features

Tools

  1. get_users - Get a list of users in the Slack workspace
  2. get_channels - Get a list of channels in the Slack workspace
  3. get_channel_messages - Get messages from a specific channel
  4. get_thread_replies - Get replies in a thread
  5. search_messages - Search for messages in Slack

Resources

  1. allusers:// - Get all users in the Slack workspace
  2. allchannels:// - Get all channels in the Slack workspace

Requirements

  • Bun runtime
  • Slack API token with appropriate permissions

Installation

  1. Clone the repository
  2. Install dependencies:
    bun install
    

Usage

  1. Set the Slack API token as an environment variable:

    export SLACK_TOKEN=xoxb-your-token-here
    
  2. Run the server:

    bun run index.ts
    

    Or use the compiled version:

    ./dist/slack_search_function_mcp
    

Building

To build the executable:

bun run build

This will create a compiled executable in the dist directory.

MCP Configuration

To use this server with an MCP-enabled LLM, add it to your MCP configuration:

{
  "mcpServers": {
    "slack": {
      "command": "/path/to/dist/slack_search_function_mcp",
      "env": {
        "SLACK_TOKEN": "xoxb-your-token-here"
      }
    }
  }
}

Tool Examples

Get Users

{
  "name": "get_users",
  "arguments": {
    "limit": 10
  }
}

Get Channels

{
  "name": "get_channels",
  "arguments": {
    "limit": 10,
    "exclude_archived": true
  }
}

Get Channel Messages

{
  "name": "get_channel_messages",
  "arguments": {
    "channel": "C01234ABCDE",
    "limit": 10
  }
}

Get Thread Replies

{
  "name": "get_thread_replies",
  "arguments": {
    "channel": "C01234ABCDE",
    "thread_ts": "1234567890.123456",
    "limit": 10
  }
}

Search Messages

{
  "name": "search_messages",
  "arguments": {
    "query": "important announcement",
    "sort": "timestamp",
    "sort_dir": "desc",
    "count": 10
  }
}

Resource Examples

Get All Users

allusers://

Get All Channels

allchannels://

Error Handling

The server includes comprehensive error handling for:

  • Invalid or missing Slack API token
  • API rate limits
  • Network errors
  • Invalid parameters
  • Authentication failures

Security

  • The Slack API token is never logged or exposed in responses
  • The token is securely passed via environment variables

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured