Search for messages and files within a Slack workspace using the Slack API.
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.
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 Slackallusers://
- Get all users in the Slack workspaceallchannels://
- Get all channels in the Slack workspacebun install
Set the Slack API token as an environment variable:
export SLACK_TOKEN=xoxb-your-token-here
Run the server:
bun run index.ts
Or use the compiled version:
./dist/slack_search_function_mcp
To build the executable:
bun run build
This will create a compiled executable in the dist
directory.
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"
}
}
}
}
{
"name": "get_users",
"arguments": {
"limit": 10
}
}
{
"name": "get_channels",
"arguments": {
"limit": 10,
"exclude_archived": true
}
}
{
"name": "get_channel_messages",
"arguments": {
"channel": "C01234ABCDE",
"limit": 10
}
}
{
"name": "get_thread_replies",
"arguments": {
"channel": "C01234ABCDE",
"thread_ts": "1234567890.123456",
"limit": 10
}
}
{
"name": "search_messages",
"arguments": {
"query": "important announcement",
"sort": "timestamp",
"sort_dir": "desc",
"count": 10
}
}
allusers://
allchannels://
The server includes comprehensive error handling for:
An MCP agent that integrates various search tools using the SearchAPI service. Requires SearchAPI and Google API keys.
Efficiently search Obsidian vaults using the ripgrep tool.
An MCP server for advanced research assistance, configurable via environment variables.
Provides weather data using the US National Weather Service (NWS) API. Built with pure JavaScript ES Modules.
Local RAG (on-premises) with MCP server.
Best people search engine that reduces the time spent on talent discovery.
A bridge server for connecting to a SearXNG metasearch engine instance.
Search and get up-to-date information about NPM, Cargo, PyPi, and NuGet packages.
Query Shodan's database of internet-connected devices and vulnerabilities using the Shodan API.
A server for performing deep web searches using the @just-every/search library, requiring API keys via an environment file.