Labsco
takuya0206 logo

Slack Search

β˜… 4

from takuya0206

Search for messages and files within a Slack workspace using the Slack API.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedAccount requiredAdvanced setup

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

Building

To build the executable:

Copy & paste β€” that's it
bun run build

This will create a compiled executable in the dist directory.

Tool Examples

Get Users

Copy & paste β€” that's it
{
  "name": "get_users",
  "arguments": {
    "limit": 10
  }
}

Get Channels

Copy & paste β€” that's it
{
  "name": "get_channels",
  "arguments": {
    "limit": 10,
    "exclude_archived": true
  }
}

Get Channel Messages

Copy & paste β€” that's it
{
  "name": "get_channel_messages",
  "arguments": {
    "channel": "C01234ABCDE",
    "limit": 10
  }
}

Get Thread Replies

Copy & paste β€” that's it
{
  "name": "get_thread_replies",
  "arguments": {
    "channel": "C01234ABCDE",
    "thread_ts": "1234567890.123456",
    "limit": 10
  }
}

Search Messages

Copy & paste β€” that's it
{
  "name": "search_messages",
  "arguments": {
    "query": "important announcement",
    "sort": "timestamp",
    "sort_dir": "desc",
    "count": 10
  }
}

Resource Examples

Get All Users

Copy & paste β€” that's it
allusers://

Get All Channels

Copy & paste β€” that's it
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