Slack Search
Search for messages and files within a Slack workspace using the Slack API.
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
get_users- Get a list of users in the Slack workspaceget_channels- Get a list of channels in the Slack workspaceget_channel_messages- Get messages from a specific channelget_thread_replies- Get replies in a threadsearch_messages- Search for messages in Slack
Resources
allusers://- Get all users in the Slack workspaceallchannels://- Get all channels in the Slack workspace
Requirements
- Bun runtime
- Slack API token with appropriate permissions
Installation
- Clone the repository
- Install dependencies:
bun install
Usage
-
Set the Slack API token as an environment variable:
export SLACK_TOKEN=xoxb-your-token-here -
Run the server:
bun run index.tsOr 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
Related Servers
YouTube MCP Server
Search YouTube videos, retrieve transcripts, and perform semantic search over video content.
DevRag
Free local RAG for Claude Code - Save tokens & time with vector search. Indexes markdown docs and finds relevant info without reading entire files (40x fewer tokens, 15x faster).
Jina AI MCP Tools
Integrates with Jina AI APIs for web reading, search, and fact-checking.
Academia MCP
Search for scientific publications across ArXiv, ACL Anthology, HuggingFace Datasets, and Semantic Scholar.
MCP Open Library
A Model Context Protocol (MCP) server for the Open Library API that enables AI assistants to search for book and author information.
Qdrant RAG MCP Server
A semantic search server for codebases using Qdrant, featuring intelligent GitHub issue and project management.
Dynamics Partner Advisor
An MCP server for finding and comparing Microsoft Dynamics 365 implementation partners. Features tools to search by industry/region, get detailed partner profiles, and generate personalized shortlists for new projects.
Langgraph Deep Search MCP Server
A deep search server powered by LangGraph and the Google Gemini API.
Nexus
Web search server that integrates Perplexity Sonar models via OpenRouter API for real-time, context-aware search with citations
Bus Nearby MCP
Provides access to the Israeli transport API for geocoding and transit directions.