collaboration-interface-adaptor-slack
A standardized Model Context Protocol (MCP) bridge designed to facilitate programmatic orchestration of team communication features within the Slack ecosystem, enabling workflow automation and enhanced digital workspace interactivity.
Author

Chandrakant0110
Quick Info
Actions
Tags
Slack Collaboration Interface Adaptor (MCP Server)
This repository details an implementation of a Slack-specific Model Context Protocol (MCP) endpoint. It abstracts core Slack API interactions into a unified interface, allowing sophisticated computational models to govern and manipulate team-oriented operational flows.
Core Functionalities
The system exposes mechanisms for:
- Enumerating publicly accessible channels.
- Dispatching textual content to specified destinations.
- Providing direct responses within ongoing conversational threads.
- Applying emoji feedback indicators (reactions) to specific messages.
- Retrieving chronological message logs from a designated channel.
- Fetching the complete record of replies associated with a thread identifier.
- Generating lists of registered workspace participants.
- Acquiring comprehensive attribute sets for individual user accounts.
Setup Requirements
To successfully deploy this service, ensure the following prerequisites are met:
- Runtime Environment: Node.js, version 16 or newer.
- Package Manager: npm or yarn.
- Workspace Credentials: Administrative permissions within the target Slack environment.
- Authorization Key: A valid Slack Bot User OAuth Token.
- Workspace Identifier: The globally unique ID for your Slack Team/Workspace.
Deployment Procedure
- Secure a local copy of the source code repository.
-
Resolve dependencies using your preferred package manager:
```bash npm install
Alternatively:
yarn install ```
-
Compile the underlying TypeScript source structure:
```bash npm run build
Alternatively:
yarn build ```
Configuration Steps
Modify the primary execution file (index.ts) to inject sensitive credentials:
public static readonly BOT_TOKEN = "substitute-your-bot-authentication-string-here";
public static readonly TEAM_ID = "substitute-your-team-identifier-here";
Populate these constants with your actual Slack authorization credentials and workspace identifier.
Operational Guidelines
Launching the Adaptor
Once the compilation is complete, initiate the server process:
node dist/index.js
Integration into Cursor Environment
For utilization within the Cursor IDE context, configure a new Model Context Protocol entry:
- Access Cursor's preference panel.
- Navigate to the 'Model Context Protocol' settings.
- Establish a new tool definition:
- Name:
slack - Command:
node /absolute/path/to/your/dist/index.js - Working Directory:
/absolute/path/to/your/project
- Name:
Substitute /absolute/path/to/your with the actual filesystem location of the project directory.
Exposed Endpoints (Tools)
-
slack_list_channels- Function: Fetches a catalog of public channels.
- Arguments:
limit(optional),cursor(optional for pagination).
-
slack_post_message- Function: Transmits content to a specified channel.
- Mandatory Arguments:
channel_id,text.
-
slack_reply_to_thread- Function: Posts a targeted response within an existing thread structure.
- Mandatory Arguments:
channel_id,thread_ts,text.
-
slack_add_reaction- Function: Attaches an emoji notation to a message instance.
- Mandatory Arguments:
channel_id,timestamp,reaction(emoji name).
-
slack_get_channel_history- Function: Retrieves the most recent message stream from a channel.
- Mandatory Argument:
channel_id. - Optional Argument:
limit.
-
slack_get_thread_replies- Function: Gathers all nested responses belonging to a thread.
- Mandatory Arguments:
channel_id,thread_ts.
-
slack_get_users- Function: Provides a roster of all workspace members.
- Optional Arguments:
limit,cursor.
-
slack_get_user_profile- Function: Demands detailed identity and attribute data for a user.
- Mandatory Argument:
user_id.
Modification Workflow
To introduce modifications to the server logic:
- Edit the source code within
index.ts. - Re-execute the compilation step:
bash npm run build # or yarn build
Security Considerations
- Crucially, refrain from committing sensitive authentication keys (Token, Team ID) into any persistent, shared source control system.
- For production deployment environments, prioritize the utilization of environment variables for credential management.
- Verify that the Slack Bot application possesses the requisite OAuth scopes necessary to execute the intended operations.
Contributions
Feedback via bug reports (issues) or proposed enhancements (pull requests) are highly welcomed.
Licensing
This software is released under the MIT License.
