Slack MCP Server

Slack MCP Server

A feature-rich Model Context Protocol server for integrating Slack Workspaces with AI model context management.

903
Stars
136
Forks
903
Watchers
17
Issues
Slack MCP Server acts as a Model Context Protocol (MCP) server tailored for Slack Workspaces, providing flexible integration modes including Stealth and OAuth. It enables advanced functionalities such as fetching channel and thread messages, supporting direct and group messages, smart history retrieval, and robust context management for AI workflows. Communication is supported over Stdio, SSE, and HTTP transports, and the platform includes enhanced features like user information embedding and cache support. Designed for enterprise and individual use, it allows seamless context extraction and management without compromising workspace security.

Key Features

Stealth and OAuth operational modes
Support for Slack enterprise workspaces
Channel and thread message retrieval
Direct and group direct messages support
Smart history pagination by date or count
Search functionality with advanced filters
Embedded user information in messages
User and channel caching for performance
Multiple transport protocols (Stdio, SSE, HTTP)
Proxy support for outgoing requests

Use Cases

Integrating Slack context into AI-powered applications
Historical message retrieval and contextual analysis
Enterprise Slack workspace data extraction for model input
Automating message search and context gathering
Developing chatbots with Slack channel and DM context
Secure access to Slack workspace data via OAuth or stealth
Contextual summarization of Slack conversations
Enabling ML models to perform actions based on Slack history
Aggregating multi-user direct message context for AI
Custom analytics applications using Slack data feeds

README

Slack MCP Server

Trust Score

Model Context Protocol (MCP) server for Slack Workspaces. The most powerful MCP Slack server — supports Stdio, SSE and HTTP transports, proxy settings, DMs, Group DMs, Smart History fetch (by date or count), may work via OAuth or in complete stealth mode with no permissions and scopes in Workspace 😏.

[!IMPORTANT]
We need your support! Each month, over 30,000 engineers visit this repository, and more than 9,000 are already using it.

If you appreciate the work our contributors have put into this project, please consider giving the repository a star.

This feature-rich Slack MCP Server has:

  • Stealth and OAuth Modes: Run the server without requiring additional permissions or bot installations (stealth mode), or use secure OAuth tokens for access without needing to refresh or extract tokens from the browser (OAuth mode).
  • Enterprise Workspaces Support: Possibility to integrate with Enterprise Slack setups.
  • Channel and Thread Support with #Name @Lookup: Fetch messages from channels and threads, including activity messages, and retrieve channels using their names (e.g., #general) as well as their IDs.
  • Smart History: Fetch messages with pagination by date (d1, 7d, 1m) or message count.
  • Search Messages: Search messages in channels, threads, and DMs using various filters like date, user, and content.
  • Safe Message Posting: The conversations_add_message tool is disabled by default for safety. Enable it via an environment variable, with optional channel restrictions.
  • DM and Group DM support: Retrieve direct messages and group direct messages.
  • Embedded user information: Embed user information in messages, for better context.
  • Cache support: Cache users and channels for faster access.
  • Stdio/SSE/HTTP Transports & Proxy Support: Use the server with any MCP client that supports Stdio, SSE or HTTP transports, and configure it to route outgoing requests through a proxy if needed.

Analytics Demo

Analytics

Add Message Demo

Add Message

Tools

1. conversations_history:

Get messages from the channel (or DM) by channel_id, the last row/column in the response is used as 'cursor' parameter for pagination if not empty

  • Parameters:
    • channel_id (string, required): - channel_id (string): ID of the channel in format Cxxxxxxxxxx or its name starting with #... or @... aka #general or @username_dm.
    • include_activity_messages (boolean, default: false): If true, the response will include activity messages such as channel_join or channel_leave. Default is boolean false.
    • cursor (string, optional): Cursor for pagination. Use the value of the last row and column in the response as next_cursor field returned from the previous request.
    • limit (string, default: "1d"): Limit of messages to fetch in format of maximum ranges of time (e.g. 1d - 1 day, 1w - 1 week, 30d - 30 days, 90d - 90 days which is a default limit for free tier history) or number of messages (e.g. 50). Must be empty when 'cursor' is provided.

2. conversations_replies:

Get a thread of messages posted to a conversation by channelID and thread_ts, the last row/column in the response is used as cursor parameter for pagination if not empty.

  • Parameters:
    • channel_id (string, required): ID of the channel in format Cxxxxxxxxxx or its name starting with #... or @... aka #general or @username_dm.
    • thread_ts (string, required): Unique identifier of either a thread’s parent message or a message in the thread. ts must be the timestamp in format 1234567890.123456 of an existing message with 0 or more replies.
    • include_activity_messages (boolean, default: false): If true, the response will include activity messages such as 'channel_join' or 'channel_leave'. Default is boolean false.
    • cursor (string, optional): Cursor for pagination. Use the value of the last row and column in the response as next_cursor field returned from the previous request.
    • limit (string, default: "1d"): Limit of messages to fetch in format of maximum ranges of time (e.g. 1d - 1 day, 1w - 1 week, 30d - 30 days, 90d - 90 days which is a default limit for free tier history) or number of messages (e.g. 50). Must be empty when 'cursor' is provided.

3. conversations_add_message

Add a message to a public channel, private channel, or direct message (DM, or IM) conversation by channel_id and thread_ts.

Note: Posting messages is disabled by default for safety. To enable, set the SLACK_MCP_ADD_MESSAGE_TOOL environment variable. If set to a comma-separated list of channel IDs, posting is enabled only for those specific channels. See the Environment Variables section below for details.

  • Parameters:
    • channel_id (string, required): ID of the channel in format Cxxxxxxxxxx or its name starting with #... or @... aka #general or @username_dm.
    • thread_ts (string, optional): Unique identifier of either a thread’s parent message or a message in the thread_ts must be the timestamp in format 1234567890.123456 of an existing message with 0 or more replies. Optional, if not provided the message will be added to the channel itself, otherwise it will be added to the thread.
    • payload (string, required): Message payload in specified content_type format. Example: 'Hello, world!' for text/plain or '# Hello, world!' for text/markdown.
    • content_type (string, default: "text/markdown"): Content type of the message. Default is 'text/markdown'. Allowed values: 'text/markdown', 'text/plain'.

4. conversations_search_messages

Search messages in a public channel, private channel, or direct message (DM, or IM) conversation using filters. All filters are optional, if not provided then search_query is required.

  • Parameters:
    • search_query (string, optional): Search query to filter messages. Example: 'marketing report' or full URL of Slack message e.g. 'https://slack.com/archives/C1234567890/p1234567890123456', then the tool will return a single message matching given URL, herewith all other parameters will be ignored.
    • filter_in_channel (string, optional): Filter messages in a specific channel by its ID or name. Example: C1234567890 or #general. If not provided, all channels will be searched.
    • filter_in_im_or_mpim (string, optional): Filter messages in a direct message (DM) or multi-person direct message (MPIM) conversation by its ID or name. Example: D1234567890 or @username_dm. If not provided, all DMs and MPIMs will be searched.
    • filter_users_with (string, optional): Filter messages with a specific user by their ID or display name in threads and DMs. Example: U1234567890 or @username. If not provided, all threads and DMs will be searched.
    • filter_users_from (string, optional): Filter messages from a specific user by their ID or display name. Example: U1234567890 or @username. If not provided, all users will be searched.
    • filter_date_before (string, optional): Filter messages sent before a specific date in format YYYY-MM-DD. Example: 2023-10-01, July, Yesterday or Today. If not provided, all dates will be searched.
    • filter_date_after (string, optional): Filter messages sent after a specific date in format YYYY-MM-DD. Example: 2023-10-01, July, Yesterday or Today. If not provided, all dates will be searched.
    • filter_date_on (string, optional): Filter messages sent on a specific date in format YYYY-MM-DD. Example: 2023-10-01, July, Yesterday or Today. If not provided, all dates will be searched.
    • filter_date_during (string, optional): Filter messages sent during a specific period in format YYYY-MM-DD. Example: July, Yesterday or Today. If not provided, all dates will be searched.
    • filter_threads_only (boolean, default: false): If true, the response will include only messages from threads. Default is boolean false.
    • cursor (string, default: ""): Cursor for pagination. Use the value of the last row and column in the response as next_cursor field returned from the previous request.
    • limit (number, default: 20): The maximum number of items to return. Must be an integer between 1 and 100.

5. channels_list:

Get list of channels

  • Parameters:
    • channel_types (string, required): Comma-separated channel types. Allowed values: mpim, im, public_channel, private_channel. Example: public_channel,private_channel,im
    • sort (string, optional): Type of sorting. Allowed values: popularity - sort by number of members/participants in each channel.
    • limit (number, default: 100): The maximum number of items to return. Must be an integer between 1 and 1000 (maximum 999).
    • cursor (string, optional): Cursor for pagination. Use the value of the last row and column in the response as next_cursor field returned from the previous request.

Resources

The Slack MCP Server exposes two special directory resources for easy access to workspace metadata:

1. slack://<workspace>/channels — Directory of Channels

Fetches a CSV directory of all channels in the workspace, including public channels, private channels, DMs, and group DMs.

  • URI: slack://<workspace>/channels
  • Format: text/csv
  • Fields:
    • id: Channel ID (e.g., C1234567890)
    • name: Channel name (e.g., #general, @username_dm)
    • topic: Channel topic (if any)
    • purpose: Channel purpose/description
    • memberCount: Number of members in the channel

2. slack://<workspace>/users — Directory of Users

Fetches a CSV directory of all users in the workspace.

  • URI: slack://<workspace>/users
  • Format: text/csv
  • Fields:
    • userID: User ID (e.g., U1234567890)
    • userName: Slack username (e.g., john)
    • realName: User’s real name (e.g., John Doe)

Setup Guide

Environment Variables (Quick Reference)

Variable Required? Default Description
SLACK_MCP_XOXC_TOKEN Yes* nil Slack browser token (xoxc-...)
SLACK_MCP_XOXD_TOKEN Yes* nil Slack browser cookie d (xoxd-...)
SLACK_MCP_XOXP_TOKEN Yes* nil User OAuth token (xoxp-...) — alternative to xoxc/xoxd
SLACK_MCP_PORT No 13080 Port for the MCP server to listen on
SLACK_MCP_HOST No 127.0.0.1 Host for the MCP server to listen on
SLACK_MCP_API_KEY No nil Bearer token for SSE and HTTP transports
SLACK_MCP_PROXY No nil Proxy URL for outgoing requests
SLACK_MCP_USER_AGENT No nil Custom User-Agent (for Enterprise Slack environments)
SLACK_MCP_CUSTOM_TLS No nil Send custom TLS-handshake to Slack servers based on SLACK_MCP_USER_AGENT or default User-Agent. (for Enterprise Slack environments)
SLACK_MCP_SERVER_CA No nil Path to CA certificate
SLACK_MCP_SERVER_CA_TOOLKIT No nil Inject HTTPToolkit CA certificate to root trust-store for MitM debugging
SLACK_MCP_SERVER_CA_INSECURE No false Trust all insecure requests (NOT RECOMMENDED)
SLACK_MCP_ADD_MESSAGE_TOOL No nil Enable message posting via conversations_add_message by setting it to true for all channels, a comma-separated list of channel IDs to whitelist specific channels, or use ! before a channel ID to allow all except specified ones, while an empty value disables posting by default.
SLACK_MCP_ADD_MESSAGE_MARK No nil When the conversations_add_message tool is enabled, any new message sent will automatically be marked as read.
SLACK_MCP_ADD_MESSAGE_UNFURLING No nil Enable to let Slack unfurl posted links or set comma-separated list of domains e.g. github.com,slack.com to whitelist unfurling only for them. If text contains whitelisted and unknown domain unfurling will be disabled for security reasons.
SLACK_MCP_USERS_CACHE No .users_cache.json Path to the users cache file. Used to cache Slack user information to avoid repeated API calls on startup.
SLACK_MCP_CHANNELS_CACHE No .channels_cache_v2.json Path to the channels cache file. Used to cache Slack channel information to avoid repeated API calls on startup.
SLACK_MCP_LOG_LEVEL No info Log-level for stdout or stderr. Valid values are: debug, info, warn, error, panic and fatal

*You need either xoxp or both xoxc/xoxd tokens for authentication.

Limitations matrix & Cache

Users Cache Channels Cache Limitations
:x: :x: No cache, No LLM context enhancement with user data, tool channels_list will be fully not functional. Tools conversations_* will have limited capabilities and you won't be able to search messages by @userHandle or #channel-name, getting messages by @userHandle or #channel-name won't be available either.
:white_check_mark: :x: No channels cache, tool channels_list will be fully not functional. Tools conversations_* will have limited capabilities and you won't be able to search messages by @userHandle or #channel-name, getting messages by @userHandle or #channel-name won't be available either.
:white_check_mark: :white_check_mark: No limitations, fully functional Slack MCP Server.

Debugging Tools

bash
# Run the inspector with stdio transport
npx @modelcontextprotocol/inspector go run mcp/mcp-server.go --transport stdio

# View logs
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log

Security

  • Never share API tokens
  • Keep .env files secure and private

License

Licensed under MIT - see LICENSE file. This is not an official Slack product.

Star History

Star History Chart

Repository Owner

korotovsky
korotovsky

User

Repository Details

Language Go
Default Branch master
Size 3,099 KB
Contributors 19
License MIT License
MCP Verified Nov 11, 2025

Programming Languages

Go
96.2%
Makefile
2.46%
JavaScript
0.98%
Dockerfile
0.36%

Tags

Topics

assistants llm mcp mcp-server slack slack-api

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • Slite MCP Server

    Slite MCP Server

    Bridge Slite notes with AI model context using the MCP standard.

    Slite MCP Server implements the Model Context Protocol to interface with Slite's API, enabling seamless search, retrieval, and hierarchical browsing of workspace notes. It exposes standardized tools for searching notes, retrieving content by ID, and navigating note structures, making Slite content programmatically accessible to contextual AI pipelines. Built in Node.js and TypeScript, it is configurable and supports authentication via API key.

    • 0
    • MCP
    • fajarmf/slite-mcp
  • Google Workspace MCP Server

    Google Workspace MCP Server

    Full natural language control of Google Workspace through the Model Context Protocol.

    Google Workspace MCP Server enables comprehensive natural language interaction with Google services such as Calendar, Drive, Gmail, Docs, Sheets, Slides, Forms, Tasks, and Chat via any MCP-compatible client or AI assistant. It supports both single-user and secure multi-user OAuth 2.1 authentication, providing a production-ready backend for custom apps. Built on FastMCP, it delivers high performance and advanced context handling, offering deep integration with the entire Google Workspace suite.

    • 890
    • MCP
    • taylorwilsdon/google_workspace_mcp
  • MyMCP Server (All-in-One Model Context Protocol)

    MyMCP Server (All-in-One Model Context Protocol)

    Powerful and extensible Model Context Protocol server with developer and productivity integrations.

    MyMCP Server is a robust Model Context Protocol (MCP) server implementation that integrates with services like GitLab, Jira, Confluence, YouTube, Google Workspace, and more. It provides AI-powered search, contextual tool execution, and workflow automation for development and productivity tasks. The system supports extensive configuration and enables selective activation of grouped toolsets for various environments. Installation and deployment are streamlined, with both automated and manual setup options available.

    • 93
    • MCP
    • nguyenvanduocit/all-in-one-model-context-protocol
  • Graphlit MCP Server

    Graphlit MCP Server

    Integrate and unify knowledge sources for RAG-ready AI context with the Graphlit MCP Server.

    Graphlit MCP Server provides a Model Context Protocol interface, enabling seamless integration between MCP clients and the Graphlit platform. It supports ingestion from a wide array of sources such as Slack, Discord, Google Drive, email, Jira, and GitHub, turning them into a searchable, RAG-ready knowledge base. Built-in tools allow for document, media extraction, web crawling, and web search, as well as advanced retrieval and publishing functionalities. The server facilitates easy configuration, sophisticated data operations, and automated notifications for diverse workflows.

    • 369
    • MCP
    • graphlit/graphlit-mcp-server
  • Teamwork MCP Server

    Teamwork MCP Server

    Seamless Teamwork.com integration for Large Language Models via the Model Context Protocol

    Teamwork MCP Server is an implementation of the Model Context Protocol (MCP) that enables Large Language Models to interact securely and programmatically with Teamwork.com. It offers standardized interfaces, including HTTP and STDIO, allowing AI agents to perform various project management operations. The server supports multiple authentication methods, an extensible toolset architecture, and is designed for production deployments. It provides read-only capability for safe integrations and robust observability features.

    • 11
    • MCP
    • Teamwork/mcp
  • Octocode MCP

    Octocode MCP

    Enterprise-grade AI context server for codebase research and analysis.

    Octocode MCP is a Model Context Protocol (MCP) server designed to enable AI assistants to search, analyze, and extract insights from millions of GitHub repositories with high security and token efficiency. It offers intelligent orchestration for deep code research, planning, and agentic workflows, streamlining the process of building and understanding complex software projects. The platform features robust tools and commands, such as /research for expert code research, designed to support developers and AI systems with context-rich information.

    • 577
    • MCP
    • bgauryy/octocode-mcp
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results