- Home
- MCP servers
- Slack
Slack
- python
0
GitHub Stars
python
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"mcp-mirror-teresjsiu_mcp": {
"command": "python",
"args": [
"/path/to/slack-mcp/slack_mcp_server.py"
],
"env": {
"LOG_LEVEL": "INFO",
"SLACK_BOT_TOKEN": "xoxb-your-bot-token-here"
}
}
}
}You set up a Slack MCP Server to control Slack from an MCP client with FastMCP, enabling asynchronous, reliable interactions such as sending messages, listing channels, reading histories, and handling direct messages directly from Cursor IDE.
How to use
You connect to the MCP server using your MCP client, then issue natural language requests that map to Slack actions. You can send messages to channels, fetch channel lists, retrieve channel history, start direct messages, look up users, add reactions, and search messages. All actions run asynchronously for high performance and provide structured, actionable results.
How to install
Prerequisites you need before starting:
- Python 3.8 or newer
- pip installed and available in your PATH
- Cursor IDE installed and configured for MCP clients
- A Slack Bot Token that starts with xoxb-
Complete the following steps to set up the Slack MCP Server locally.
-
Clone the project repository
-
Install Python dependencies
-
Set up environment variables
-
Register the MCP server with your Cursor setup
-
Run tests to verify the setup
Configuration
The MCP server is configured to run as a local process that you start via Python. The following example shows how to configure the MCP entry for a local, stdio-based server.
{
"mcpServers": {
"slack": {
"type": "stdio",
"name": "slack",
"command": "python",
"args": ["/path/to/slack-mcp/slack_mcp_server.py"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-bot-token-here",
"LOG_LEVEL": "INFO"
}
}
}
}
Security and environment
Protect your Slack Bot Token and other sensitive values. Store tokens in a secure environment file or secret manager and reference them in your environment configuration. Do not share tokens or commit them to version control.
Troubleshooting
If you encounter token or permission issues, verify the Slack Bot Token authenticity and confirm that the token has the required scopes. Ensure the bot is added to the workspace and has access to the intended channels.
Notes
The server uses asynchronous HTTP calls for high performance and includes comprehensive error handling, type hints, and logging to aid debugging and maintenance.
Available tools
send_slack_message
Send a message to a Slack channel or user. Requires channel or user target and message text.
get_slack_channels
Retrieve the list of accessible Slack channels.
get_slack_channel_history
Fetch message history from a specific channel with an optional limit.
send_slack_direct_message
Send a direct message to a specific user.
get_slack_users
Obtain a list of workspace users.
add_slack_reaction
Add an emoji reaction to a specific message identified by channel and timestamp.
search_slack_messages
Search messages by keyword with an optional count.
test_slack_connection
Test the Slack API connection and token validity.