Enables searching for messages across Slack workspaces using Slack's search API, with support for filtering results, pagination, and retrieving message details including text, timestamps, users, channels, and permalinks.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Slack Search MCP Serversearch for messages about the Q3 project deadline"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
slack-search-mcp
This is an MCP server for searching Slack messages using the Model Context Protocol (MCP).
Overview
This server provides integration with Slack's search API using the Model Context Protocol (MCP). You can search for messages across your Slack workspace from MCP clients such as Claude Code or Continue.dev. The server filters and returns relevant message information including text, timestamps, users, and channel details.
Features
get_slack_search_results: Search Slack messages using the Slack search.messages API
Filtered Results: Returns only necessary message information (text, timestamp, user, channel, permalink)
Pagination Support: Supports cursor-based pagination for large result sets
Error Handling: Comprehensive error handling for authentication, permissions, and rate limiting
Configurable: Supports configuration via config.json file
Slack App Configuration
Create an app at Slack API
Under OAuth & Permissions, add the following scopes:
search:read(required for searching messages)
Install the app to your workspace
Copy the User OAuth Token (starts with
xoxp-)
Installation & Startup
1. Install uv
2. Project Setup
3. Set Environment Variables
Create a .env file in the project root and set the following variables:
Important: Use a User OAuth Token (xoxp-) with search:read scope, not a Bot Token.
4. Optional Configuration
Create a config.json file for additional configuration:
5. Using with MCP Clients
Configure your MCP client (e.g., Claude Code or Continue.dev) as follows:
To add the MCP server from the Claude Code command line:
slack-search: Server name (arbitrary)uv run ...: Starts the server with automatic virtual environment and dependency resolution
After running this command, slack-search will be added to the list of MCP servers in Claude Code, and the get_slack_search_results tool will be available.
Note: Since it is not possible to grant command permissions from Slack, it is recommended to run the server in a safe environment with auto-run or dangerously-skip-permissions mode enabled, so that the server does not prompt for command permissions.
6. Debugging
Command:
uvArguments:
run server.py
API Reference
get_slack_search_results
Searches for messages in your Slack workspace.
Parameters:
query(string, required): Search query stringcount(integer, optional): Number of results to return (default: 20)cursor(string, optional): Pagination cursor for getting more resultshighlight(boolean, optional): Whether to highlight matching terms (default: true)
Returns:
Error Handling
The server handles various Slack API errors:
Authentication errors: Invalid or missing token
Permission errors: Missing
search:readscopeRate limiting: Automatic handling of Slack API rate limits
Network errors: SSL certificate and connection issues
Security Notes
Store your Slack token securely in the
.envfileNever commit tokens to version control
Use User OAuth tokens with minimal required scopes
Consider using environment-specific tokens for different deployments