The Slack MCP Server enables Claude to interact with Slack workspaces through the Model Context Protocol, providing tools for posting messages, listing channels, adding reactions, and more.
Before using the MCP server, you need to create and configure a Slack app:
Create a Slack App:
Configure Bot Token Scopes: Navigate to "OAuth & Permissions" and add these scopes:
channels:history
- View messages in public channelschannels:read
- View basic channel informationchat:write
- Send messages as the appreactions:write
- Add emoji reactions to messagesusers:read
- View users and their basic informationusers.profile:read
- View detailed profiles about usersInstall App to Workspace:
xoxb-
Get your Team ID (starts with a T
) by following this guidance
Add the following to your claude_desktop_config.json
:
{
"mcpServers": {
"slack": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-slack"
],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-bot-token",
"SLACK_TEAM_ID": "T01234567",
"SLACK_CHANNEL_IDS": "C01234567, C76543210"
}
}
}
}
{
"mcpServers": {
"slack": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SLACK_BOT_TOKEN",
"-e",
"SLACK_TEAM_ID",
"-e",
"SLACK_CHANNEL_IDS",
"mcp/slack"
],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-bot-token",
"SLACK_TEAM_ID": "T01234567",
"SLACK_CHANNEL_IDS": "C01234567, C76543210"
}
}
}
}
For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P
and typing Preferences: Open Settings (JSON)
.
Alternatively, you can add it to a file called .vscode/mcp.json
in your workspace for sharing configurations.
{
"mcp": {
"inputs": [
{
"type": "promptString",
"id": "slack_bot_token",
"description": "Slack Bot Token (starts with xoxb-)",
"password": true
},
{
"type": "promptString",
"id": "slack_team_id",
"description": "Slack Team ID (starts with T)"
}
],
"servers": {
"slack": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-slack"],
"env": {
"SLACK_BOT_TOKEN": "${input:slack_bot_token}",
"SLACK_TEAM_ID": "${input:slack_team_id}"
}
}
}
}
}
{
"mcp": {
"inputs": [
{
"type": "promptString",
"id": "slack_bot_token",
"description": "Slack Bot Token (starts with xoxb-)",
"password": true
},
{
"type": "promptString",
"id": "slack_team_id",
"description": "Slack Team ID (starts with T)"
}
],
"servers": {
"slack": {
"command": "docker",
"args": ["run", "-i", "--rm", "mcp/slack"],
"env": {
"SLACK_BOT_TOKEN": "${input:slack_bot_token}",
"SLACK_TEAM_ID": "${input:slack_team_id}"
}
}
}
}
}
SLACK_BOT_TOKEN
: Required. The Bot User OAuth Token starting with xoxb-
SLACK_TEAM_ID
: Required. Your Slack workspace ID starting with T
SLACK_CHANNEL_IDS
: Optional. Comma-separated list of channel IDs to limit channel access (e.g., "C01234567, C76543210"). If not specified, all public channels will be accessible.The server provides the following tools for interacting with Slack:
limit
(default: 100, max: 200): Maximum number of channels to returncursor
: Pagination cursor for the next pageslack_post_message: Posts a new message to a Slack channel
channel_id
: The ID of the channel to post totext
: The message text to postslack_reply_to_thread: Replies to a specific message thread
channel_id
: The channel containing the threadthread_ts
: Timestamp of the parent messagetext
: The reply textslack_add_reaction: Adds an emoji reaction to a message
channel_id
: The channel containing the messagetimestamp
: Message timestamp to react toreaction
: Emoji name without colonsslack_get_channel_history: Gets recent messages from a channel
channel_id
: The channel IDlimit
(default: 10): Number of messages to retrieveslack_get_thread_replies: Gets all replies in a message thread
channel_id
: The channel containing the threadthread_ts
: Timestamp of the parent messageslack_get_users: Gets list of workspace users with basic profile information
cursor
: Pagination cursor for next pagelimit
(default: 100, max: 200): Maximum users to returnslack_get_user_profile: Gets detailed profile information for a specific user
user_id
: The user's IDIf you encounter permission errors, verify that:
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.