slack-platform-integration-engine
Facilitates bidirectional connectivity with Slack environments, enabling message retrieval via conversation identifiers, leveraging Stdio and Server-Sent Events (SSE) communication protocols, entirely bypassing the need for explicit application permissions or bot ratification.
Author

korotovsky
Quick Info
Actions
Tags
Slack Integration Engine for Model Context Protocol (MCP)
This is an advanced Model Context Protocol (MCP) server instance designed specifically for interacting with Slack Workspaces. It represents a highly capable Slack MCP gateway, natively supporting Stdio, SSE, and HTTP communication channels, configurable proxy settings, functionality for Direct Messages (DMs) and Group DMs, intelligent message history fetching (based on date ranges or count thresholds), and the flexibility to operate via standard OAuth or in a completely clandestine mode without any required Workspace scopes or permissions. 😏
[!IMPORTANT]
Your sustained patronage is crucial! This project attracts more than 30,000 developers monthly, with over 9,000 actively integrating it into their workflows.If the dedication demonstrated by our contributors resonates with your needs, kindly consider bestowing a star upon the repository.
This comprehensive Slack MCP Gateway is equipped with the following core capabilities:
- Stealth vs. OAuth Operational Modes: Deploy the server without mandating supplementary authorizations or installing external bots (Stealth Mode), or utilize secure OAuth credentials to gain access without the requirement of continuously refreshing or extracting session tokens from the browser (OAuth Mode).
- Enterprise Grid Compatibility: Capability to integrate seamlessly within Enterprise Slack deployments.
- Conversation and Thread Interrogation with Naming/Lookup: Retrieve messages from both public channels and private threads, including system activity notifications, and address conversations using human-readable names (e.g., #general) alongside their formal IDs.
- Adaptive History Retrieval: Fetch message archives with smart pagination controls based on relative timeframes (e.g., 1d, 7d, 1m) or a specific message count.
- Message Content Searching: Execute detailed searches across channel transcripts, threads, and DMs, supporting granular filtering by temporal boundaries, specific users, and textual content.
- Secure Message Injection: The conversations_add_message functionality is deactivated by default as a security precaution. Activation requires setting an environment variable, optionally restricting posting capabilities to a predefined whitelist of channel identifiers.
- Direct and Group Direct Messaging Access: Full support for querying message logs within one-on-one DMs and multi-party DMs.
- Contextual User Data Embedding: Injects relevant user metadata directly into message objects for enriched context.
- Local Caching Mechanisms: Implements caching for user and channel metadata to accelerate subsequent operational startup times.
- Transport Flexibility & Proxy Handling: Adaptable for use with any MCP client supporting Stdio, SSE, or HTTP transports, with built-in configuration for routing all outbound network traffic through a specified proxy server.
Data Retrieval Demonstration
Message Publication Example
Exposed Tools
1. conversations_history:
Obtain message logs from a specified conversation (channel or DM) using its unique identifier. Pagination is supported via a cursor derived from the final elements of the preceding response payload.
- Parameters:
- channel_id (string, required): Identifier for the conversation, formatted as Cxxxxxxxxxx or its accessible name prefixing with #... (e.g., #general) or @... (e.g., @user_dm).
- include_activity_messages (boolean, default: false): If set to true, system events like user joining/leaving are included in the retrieval. Default is false.
- cursor (string, optional): Token necessary for fetching subsequent pages of results. Populate with the next_cursor value from the previous service response.
- limit (string, default: "1d"): Defines the scope of the fetch, either as a relative time duration (e.g., 1d, 1w, 30d, 90d for standard history limits) or an absolute message count (e.g., "50"). This field must remain unset when a cursor is supplied.
2. conversations_replies:
Retrieve the complete message thread associated with a conversation, specified by channel_id and the parent message's timestamp (thread_ts). Pagination utilizes a cursor derived from the response's tail elements.
- Parameters:
- channel_id (string, required): The identifier for the conversation (Cxxxxxxxxxx) or its moniker (#... or @...).
- thread_ts (string, required): The precise timestamp (1234567890.123456) of the initiating message within the thread that possesses zero or more replies.
- include_activity_messages (boolean, default: false): Flag to include system notifications within the thread history. Default is false.
- cursor (string, optional): Pagination token. Should be populated with the next_cursor value from the prior invocation.
- limit (string, default: "1d"): Defines the fetch scope (time duration or message count). Must be omitted if cursor is used.
3. conversations_add_message
Permits the injection of a new message into a public channel, private group, or direct message session, identified by channel_id. Thread correlation via thread_ts is optional.
Security Advisory: Message posting is inert by default. Enable this capability by setting the
SLACK_MCP_ADD_MESSAGE_TOOLenvironment variable. Setting this totrueenables all channels, a comma-separated list of IDs whitelists specific channels, or prefixing an ID with!allows all except those listed. An empty value maintains the default disabled state.
- Parameters:
channel_id(string, required): The designated conversation identifier (Cxxxxxxxxxxor its name lookup:#...or@...).thread_ts(string, optional): The timestamp of the parent message (1234567890.123456) if the message should be posted within an existing thread. If omitted, the message targets the main channel stream.payload(string, required): The raw content of the message, formatted according to the specifiedcontent_type. E.g., 'Hello, World!' for plain text or '# Header\nContent' for Markdown.content_type(string, default: "text/markdown"): Specifies the encoding of the message payload. Accepted values: 'text/markdown', 'text/plain'.
4. conversations_search_messages
Execute sophisticated content searches across all accessible conversation types (channels, DMs, MPIMs) utilizing various optional predicate filters.
- Parameters:
- search_query (string, optional): The primary textual or URL-based search term (e.g., 'quarterly results' or a direct Slack message URL). If provided, other filtering parameters are ignored, and a single matching message is returned.
- filter_in_channel (string, optional): Restrict the search scope to a specific channel ID or name (e.g., C1234567890 or #development). Defaults to searching all channels.
- filter_in_im_or_mpim (string, optional): Constrain the search to a specific DM or MPIM identifier (e.g., D1234567890 or @colleague). Defaults to searching all DMs/MPIMs.
- filter_users_with (string, optional): Filter results to include messages where a specific user (ID or display name, e.g., @admin) was involved in the conversation or thread.
- filter_users_from (string, optional): Filter results to only include messages authored by a specific user (ID or display name).
- filter_date_before (string, optional): Limits results to messages predating the specified date/period (YYYY-MM-DD, 'July', 'Yesterday', 'Today').
- filter_date_after (string, optional): Limits results to messages sent subsequent to the specified date/period.
- filter_date_on (string, optional): Filters messages to those sent precisely on the given date (YYYY-MM-DD, 'July', 'Yesterday', 'Today').
- filter_date_during (string, optional): Filters messages sent within the specified relative timeframe (e.g., 'July', 'Yesterday').
- filter_threads_only (boolean, default: false): If true, only messages that are thread roots or replies will be returned.
- cursor (string, default: ""): Pagination token to request the next batch of results.
- limit (number, default: 20): Maximum count of results to return, constrained between 1 and 100.
5. channels_list:
Retrieves an index of all accessible conversation containers within the workspace.
- Parameters:
- channel_types (string, required): A comma-delimited specification of conversation types to include. Valid entries: mpim, im, public_channel, private_channel. Example: public_channel,private_channel,im.
- sort (string, optional): Metric for ordering the output. Currently supports popularity (based on participant count).
- limit (number, default: 100): Maximum number of records to return, capped between 1 and 999.
- cursor (string, optional): Token for fetching subsequent pages.
Accessible Directory Resources
The Slack MCP Server exposes two specialized, read-only directory URIs for accessing workspace metadata in CSV format:
1. slack://<workspace>/channels — Conversation Directory
Generates a Comma Separated Values (CSV) manifest detailing every workspace channel, including direct and group direct message contexts.
- URI:
slack://<workspace>/channels - Format:
text/csv - Data Fields:
id: The unique Channel Identifier (e.g.,C1234567890).name: The conversation's designated name (e.g.,#generalor@user_dm).topic: The current descriptive topic assigned to the channel.purpose: The channel's stated objective or description.memberCount: Total number of users enrolled in the conversation.
2. slack://<workspace>/users — Personnel Directory
Provides a CSV export listing all known user entities within the Slack instance.
- URI:
slack://<workspace>/users - Format:
text/csv - Data Fields:
userID: The unique User Identifier (e.g.,U1234567890).userName: The user's Slack handle (e.g.,jane_smith).realName: The user's registered full name (e.g.,Jane A. Smith).
Deployment Instructions
- Authentication Token Configuration
- Installation Procedure
- Configuration and Operational Guide
Essential Environment Configuration Parameters
| Variable | Mandatory? | Default Value | Functional Description |
|---|---|---|---|
SLACK_MCP_XOXC_TOKEN |
Conditional* | nil |
Slack browser session token (xoxc-...). Required for certain authentication flows. |
SLACK_MCP_XOXD_TOKEN |
Conditional* | nil |
Slack browser cookie token (xoxd-...). Used alongside XOXC for authentication. |
SLACK_MCP_XOXP_TOKEN |
Conditional* | nil |
User OAuth access token (xoxp-...) — an alternative credential source to XOXC/XOXD pairs. |
SLACK_MCP_PORT |
Optional | 13080 |
The network port where the MCP gateway service will listen for incoming connections. |
SLACK_MCP_HOST |
Optional | 127.0.0.1 |
The network interface address to bind the listening socket to. |
SLACK_MCP_API_KEY |
Optional | nil |
A secret bearer credential required by SSE and HTTP transport clients for authorization. |
SLACK_MCP_PROXY |
Optional | nil |
Uniform Resource Locator (URL) specifying an intermediary proxy server for all outbound Slack API requests. |
SLACK_MCP_USER_AGENT |
Optional | nil |
Permits specification of a custom User-Agent string, often necessary for compatibility within specific Enterprise Slack environments. |
SLACK_MCP_CUSTOM_TLS |
Optional | nil |
Instructs the server to use a custom TLS handshake profile, based on the defined SLACK_MCP_USER_AGENT or the default string, useful for Enterprise setups. |
SLACK_MCP_SERVER_CA |
Optional | nil |
Filesystem path pointing to a custom Root Certificate Authority (CA) file for verifying server identity. |
SLACK_MCP_SERVER_CA_TOOLKIT |
Optional | nil |
A flag to inject the HTTPToolkit CA certificate directly into the system's trust store for Man-in-the-Middle (MitM) debugging purposes. |
SLACK_MCP_SERVER_CA_INSECURE |
Optional | false |
Overrides certificate verification entirely, trusting all connections (HIGHLY DISCOURAGED FOR PRODUCTION USE). |
SLACK_MCP_ADD_MESSAGE_TOOL |
Optional | nil |
Controls message posting enablement. Use true for global access, a comma-separated list of Channel IDs for whitelisting, or prefixing IDs with ! to create an exclusion list. Default state is disabled. |
SLACK_MCP_ADD_MESSAGE_MARK |
Optional | nil |
When message posting is active, this ensures any newly posted message is immediately marked as 'read' by the posting entity. |
SLACK_MCP_ADD_MESSAGE_UNFURLING |
Optional | nil |
Enables or selectively whitelists link unfurling for posted messages. Specify a comma-separated list of domain names (e.g., github.com,atlassian.net). If mixed domains are present, unfurling is suppressed for security. |
SLACK_MCP_USERS_CACHE |
Optional | .users_cache.json |
Location for persisting the cached data pertaining to Slack users, mitigating redundant startup API calls. |
SLACK_MCP_CHANNELS_CACHE |
Optional | .channels_cache_v2.json |
Location for persisting the cached data pertaining to Slack channels, mitigating redundant startup API calls. |
SLACK_MCP_LOG_LEVEL |
Optional | info |
Specifies the verbosity of output directed to stdout/stderr. Acceptable levels: debug, info, warn, error, panic, fatal. |
Authentication requires either the xoxp token OR* the combined presence of both xoxc and xoxd tokens.
Feature Dependency Matrix: Caching Impact
| User Cache Status | Channel Cache Status | Operational Limitations / Context Enhancement |
|---|---|---|
| Disabled (:x:) | Disabled (:x:) | Complete absence of caching. No enhancement of context data for LLM processing. The channels_list tool will fail operationally. conversations_* tools will suffer degraded performance and inability to resolve lookups by user handle (@...) or channel name (#...), and direct lookups by these names will be unavailable. |
| Enabled (:white_check_mark:) | Disabled (:x:) | Channel metadata caching is absent, rendering the channels_list tool non-functional. conversations_* tools will exhibit limitations: user lookup by handle/name will fail, and message retrieval by channel name/handle will be unsupported. |
| Enabled (:white_check_mark:) | Enabled (:white_check_mark:) | Full feature parity. Zero operational limitations. Complete Slack MCP Engine functionality is available. |
Diagnostic Operations
bash
Initiate the inspector utility using the stdio transport method
npx @modelcontextprotocol/inspector go run mcp/mcp-server.go --transport stdio
Monitor recent system logs
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
Security Posture
- Ensure API tokens are never compromised or shared.
- Maintain the integrity and privacy of all configuration files (e.g., .env).
Licensing
Distributed under the MIT License terms; refer to the LICENSE file for details. Note: This component is not an officially endorsed Slack utility.
WIKIPEDIA: Management support utilities encompass all frameworks, software, control mechanisms, analytical solutions, and methodologies employed by corporate entities to effectively navigate evolving marketplaces, secure a competitive market stance, and elevate overall organizational efficacy.
== General Overview == There exists a diverse array of specialized utilities corresponding to distinct organizational divisions, which can be segmented based on specific management foci. For instance, tools designed for strategic oversight, workflow management, documentation maintenance, human capital administration, evidence-based determination, performance monitoring, and so forth. A functional classification often aggregates these into broad categories such as:
Utilities utilized for data acquisition and integrity verification across any department. Tools dedicated to governing and optimizing operational workflows. Systems employed for data aggregation and strategic decision formulation. Modern business management tooling has undergone substantial transformation over the past decade, propelled by rapid technological advancements, making the selection of the optimal utility for a given corporate scenario increasingly complex. This complexity stems from the perpetual drive toward cost reduction, revenue maximization, deep comprehension of client demands, and the efficient provision of requisite products in the manner clients expect. Within this environment, leadership personnel must adopt a deliberate, strategic approach toward adopting business tools, rather than impulsively choosing the newest available option. Frequently, management integrates tools without requisite customization, leading to systemic instability. Business management utilities must be chosen with precision and subsequently tailored to the organization's precise requirements, not the reverse.
== Prevalent Selections == In 2013, an evaluation commissioned by Bain & Company mapped the global utilization patterns of business utilities. These tools often reflect regional necessities shaped by market conditions and economic shifts. The leading ten categories identified included:
Strategic planning frameworks Client relationship management systems Workforce sentiment assessment tools Comparative performance analysis (Benchmarking) Integrated performance measurement (Balanced Scorecard) Definition of core organizational competencies Strategic outsourcing management Organizational transformation programs Logistics and inventory oversight (Supply Chain Management) Formalized organizational directives (Mission/Vision Statements) Customer segmentation methodologies Total Quality Management (TQM) systems
== Corporate Software Applications == A software suite or collection of computing programs utilized by personnel to execute diverse operational functions is termed enterprise software (or a business application). These applications serve to enhance productivity rates, quantify results, and execute various company processes with exactitude. This domain evolved from early Management Information Systems (MIS) into integrated Enterprise Resource Planning (ERP) solutions. Subsequently, Customer Relationship Management (CRM) capabilities were incorporated, leading the consolidated package into the realm of cloud-based business management services. Although a demonstrable linkage exists between Information Technology investments and organizational success metrics, two factors are paramount for value realization: the efficacy of the deployment process and the rigorous methodology applied to tool selection and subsequent modification.
== Tools Tailored for Small and Medium Enterprises (SMEs) == Business utilities specifically designed for SMEs are vital as they furnish pathways to minimize operational...
