The MCP (Model Context Protocol) server for Slack enables AI assistants to interact with Slack workspaces through a standardized interface. This server bridges AI systems with Slack's API, providing tools for message posting, channel management, user information retrieval, and more.
This server supports various Slack operations through the following tools:
slack_list_channels
- List public channels in the workspace with paginationslack_post_message
- Post a new message to a Slack channelslack_reply_to_thread
- Reply to a specific message thread in Slackslack_add_reaction
- Add a reaction emoji to a messageslack_get_channel_history
- Get recent messages from a channelslack_get_thread_replies
- Get all replies in a message threadslack_get_users
- Retrieve basic profile information of all users in the workspaceslack_get_user_profile
- Get a user's profile informationslack_get_user_profiles
- Get multiple users' profile information in bulkslack_search_messages
- Search for messages in the workspaceInstall the package using npm:
npm install @ubie-oss/slack-mcp-server
Note that the package is hosted in GitHub Registry, so you'll need a Personal Access Token (PAT).
Set up the required environment variables:
SLACK_BOT_TOKEN
: Your Slack Bot User OAuth TokenSLACK_USER_TOKEN
: Your Slack User OAuth Token (needed for certain features like message search)You can set these directly or create a .env
file:
SLACK_BOT_TOKEN=xoxb-your-bot-token
SLACK_USER_TOKEN=xoxp-your-user-token
The server supports two transport methods:
For local integration, run:
npx @ubie-oss/slack-mcp-server
For web applications and remote clients, specify a port:
npx @ubie-oss/slack-mcp-server -port 3000
Alternatively, you can run the installed module with node:
# Stdio transport
node node_modules/.bin/slack-mcp-server
# HTTP transport
node node_modules/.bin/slack-mcp-server -port 3000
-port <number>
: Start with Streamable HTTP transport on the specified port-h, --help
: Display help information{
"slack": {
"command": "npx",
"args": [
"-y",
"@ubie-oss/slack-mcp-server"
],
"env": {
"NPM_CONFIG_//npm.pkg.github.com/:_authToken": "<your-github-pat>",
"SLACK_BOT_TOKEN": "<your-bot-token>",
"SLACK_USER_TOKEN": "<your-user-token>"
}
}
}
First, start the server:
SLACK_BOT_TOKEN=<your-bot-token> SLACK_USER_TOKEN=<your-user-token> npx @ubie-oss/slack-mcp-server -port 3000
Then connect your client to: http://localhost:3000/mcp
The server processes requests through a standardized flow:
For example, when using slack_list_channels
, the server validates the request parameters, calls slackClient.conversations.list
, and returns a response containing only the relevant channel information.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.