slack-mcp

slack-mcp

Read-only MCP server for Slack with OAuth 2.1 authentication, enabling message retrieval, thread replies, search, user and channel listing.

Category
Visit Server

README

Slack MCP Server

A read-only MCP (Model Context Protocol) server for Slack with OAuth 2.1 authentication.

License Python 3.10+

Demo

https://github.com/user-attachments/assets/211bd428-209f-461a-b9a1-9cc85fd7c438

Available Tools

  • slack_get_channel_messages - Retrieve messages from channels
  • slack_get_thread_replies - Get conversation thread replies
  • slack_search_messages - Advanced message search with filters
  • slack_get_users - List workspace users or get specific profiles
  • slack_get_channels - List channels or get detailed info

Quick Start

1. Create Slack App

  1. Visit Slack API Apps and create a new app
  2. Under App Credentials, copy your Client ID and Client Secret
  3. Navigate to OAuth & Permissions and add these User Token Scopes: channels:history groups:history im:history mpim:history channels:read groups:read im:read mpim:read users:read users:read.email search:read
  4. Add Redirect URL under OAuth & Permissions:
    • For local testing: Use an HTTPS proxy like ngrok (E.g: https://abc123.ngrok.io/oauth2callback). See local development setup below.
    • For production: https://your-domain.com/oauth2callback

2. Installation

uv sync

3. Local Development Setup (HTTPS Proxy)

Slack requires HTTPS for OAuth callbacks. For local development, use ngrok or a similar HTTPS proxy:

# Visit https://ngrok.com/ to download ngrok and start the proxy
ngrok http 8001

Copy the HTTPS forwarding URL (e.g., https://abc123.ngrok.io/oauth2callback) and add it as a Redirect URL in your Slack app settings.

4. Configuration

Set required environment variables:

export SLACK_CLIENT_ID="your_client_id"
export SLACK_CLIENT_SECRET="your_client_secret"
# Use https://your-domain.com for production.
export SLACK_MCP_BASE_URI="http://localhost"
# Use https://your-domain.com for production.
export SLACK_EXTERNAL_URL="https://abc123.ngrok.io"
# Optional, if you want to run the MCP server on a different port.
export SLACK_MCP_PORT=8001

5. Run the Server

uv run python main.py

The server will start on http://localhost:8001 by default. Make sure your ngrok proxy is running alongside it for OAuth to work.

6. Configure Your MCP Client

Add to your MCP client configuration (e.g. ~/.cursor/mcp.json for Cursor):

{
  "mcpServers": {
    "slack": { "url": "http://localhost:8001/mcp", "transport": "http" }
  }
}

7. Authenticate

Authentication happens automatically via OAuth 2.1 when your MCP client first connects. Your client will open a browser window for Slack authorization — approve access and you're ready to go.

Deployment

For production deployment, you can run it inside docker:

docker build -t slack-mcp .
docker run -p 8001:8001 \
  -e SLACK_CLIENT_ID="your_client_id" \
  -e SLACK_CLIENT_SECRET="your_client_secret" \
  -e SLACK_MCP_BASE_URI="https://your-domain.com" \
  -e SLACK_EXTERNAL_URL="https://your-domain.com" \
  slack-mcp

Development

Run tests with uv run pytest.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Duolingo is hiring! Apply at https://www.duolingo.com/careers

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured