slack
OAuth-based multi-user Slack MCP server with HTTP transport
claude mcp add --transport stdio duolingo-slack-mcp python main.py \ --env SLACK_MCP_PORT="Optional: port to run on (default 8001)" \ --env SLACK_CLIENT_ID="Your Slack App Client ID" \ --env SLACK_EXTERNAL_URL="https://your-domain.com or http(s)://ngrok-url" \ --env SLACK_MCP_BASE_URI="http://localhost (production: https://your-domain.com)" \ --env SLACK_CLIENT_SECRET="Your Slack App Client Secret"
How to use
This Slack MCP server exposes a read-only Model Context Protocol interface for Slack, enabling OAuth authenticated access to Slack workspace data such as channels, messages, users, and threads. It provides tools like slack_get_channel_messages, slack_get_thread_replies, slack_search_messages, slack_get_users, slack_get_channels, and slack_get_oauth_url to query Slack data and perform OAuth authorization flows. After configuring the required Slack app credentials and environment variables, you can start the server and connect via an MCP client to retrieve channel histories, search messages with filters, list users or channels, and generate the OAuth URL needed to authorize the app within Slack.
Key capabilities include:
- Retrieve messages from channels via slack_get_channel_messages
- Fetch thread replies with slack_get_thread_replies
- Perform advanced message searches using slack_search_messages
- List workspace users or fetch user profiles with slack_get_users
- List channels or obtain detailed channel information via slack_get_channels
- Generate the OAuth authorization URL with slack_get_oauth_url for the Slack app setup
To use these tools, run the server with the configured environment variables, then query the MCP endpoint (/mcp/slack) using your MCP client. Authenticate as needed through the OAuth flow to access restricted data.
How to install
Prerequisites:
- Python 3.10+ installed on the host
- Access to configure environment variables as described in the README
- Optional: ngrok or another HTTPS proxy for local OAuth testing
Installation steps:
- Create and configure a Python virtual environment (recommended):
python -m venv venv
source venv/bin/activate # on macOS/Linux
venv\Scripts\activate # on Windows
- Install dependencies (adjust if a requirements.txt is provided by the project):
pip install -r requirements.txt
- Ensure you have the Slack app credentials prepared:
- SLACK_CLIENT_ID
- SLACK_CLIENT_SECRET
- SLACK_MCP_BASE_URI (e.g., http://localhost)
- SLACK_EXTERNAL_URL (e.g., https://your-domain.com or ngrok URL)
- Run the server:
python main.py
If you prefer, you can also run it via a process manager or container as described in the deployment section of the project README.
- Verify the MCP endpoint is reachable (example):
http http://localhost:8001/mcp/slack
Additional notes
Notes and tips:
- Ensure the OAuth redirect URL in your Slack app matches your SLACK_EXTERNAL_URL and the /oauth2callback path used by the MCP server.
- When testing locally, use ngrok or a similar HTTPS proxy so Slack can perform the OAuth callback over HTTPS.
- If you change port or base URL, update SLACK_MCP_BASE_URI and SLACK_EXTERNAL_URL accordingly.
- The MCP client configuration should point to the server's /mcp endpoint, e.g., { "mcpServers": { "slack": { "url": "http://localhost:8001/mcp", "transport": "http" } } }.
- If you encounter OAuth callback failures, double-check that the Slack app has the proper scopes listed in OAuth & Permissions and that the user has granted access.
- For production deployments, consider using a reverse proxy and ensuring TLS termination is handled by the proxy.
Related MCP Servers
code-mode
🔌 Plug-and-play library to enable agents to call MCP and UTCP tools via code execution.
mysql_mcp_server
A Model Context Protocol (MCP) server that enables secure interaction with MySQL databases
Gitingest
mcp server for gitingest
skill-to
Convert AI Skills (Claude Skills format) to MCP server resources - Part of BioContextAI
Convert-Markdown-PDF
Markdown To PDF Conversion MCP
obsidian
MCP server for git-backed Obsidian vaults. Access and manage notes through Claude, ChatGPT, and other LLMs with automatic git sync. Supports local (stdio/HTTP) and remote (AWS Lambda) deployment.