Setting Up AI Slack Automation
In this tutorial, we will connect the Slack MCP server to automate Slack workflows. This server is a secure, open-source option.
Slack API Application Setup
- Access Slack API platform;
- Click "Get Started" button;
- Click "Go to Your Apps" button then;
- Click green "Create New App" button;
- Create new application "From Scratch" for custom configuration;
- Choose descriptive name (e.g., "AI Assistant" or personal identifier);
- Select target Slack workspace from dropdown menu.
- In the side menu, choose "OAuth & Permissions";
- To make the "Install to Workspace" button active, scroll down to the "Scope" section;
- In the "User Token Scopes" subsection, click "Add an Oauth Scope";
- One-by-one, add the following scopes:
channels:history
- read message history from public channels;channels:read
- access basic channel information;chat:write
- send messages to channels and users;reactions:read
- view emoji reactions on messages;reactions:write
- add emoji reactions to messages;users:read
- access basic user profile information.
- Scroll up and now click "Install to Workspace" button;
- In a new window, get acquainted with the requested permissions and allow them by clicking "Allow";
- Now, you have received an OAuth Token that starts with
xoxp-
. Don't close the window for future use.
- Open the target Slack workspace in a browser;
- Or open the Slack Desktop window;
- Click the workspace name to access settings;
- Copy the workspace URL and paste it to the browser address bar or write it manually;
- Locate Team ID in the URL structure (appears after "T" prefix);
- Don't close this browser tab as well.
Automatic MCP Server Installation (Recommended)
- In Claude, type this prompt:
Clone this MCP server to the Documents/projects folder and run the commands
git clone https://github.com/lars-hagen/slack-user-mcp.git
cd slack-user-mcp
npm install
npm run build
- Run the prompt.
- In Claude, paste the prompt:
Add this block to the Claude config file
{
"mcpServers": {
"slack": {
"command": "npm",
"args": [
"run",
"--prefix",
"/path/to/slack-user-mcp",
"start"
],
"env": {
"SLACK_TOKEN": "xoxp-your-user-token",
"SLACK_TEAM_ID": "T01234567"
}
}
}
}
- Add two required parameters inside the block:
- Slack token (starts with
xoxp-
) β copy it from the Slack API page; - Slack team ID (starts with
T
) β copy it from the workspace URL.
- Slack token (starts with
Both values are sensitive. Do not share them. Claude Desktop runs locally, so it is safe to paste them here.
- Run the prompt.
- Fully exit Claude Desktop (macOS:
Cmd + Q
, Windows:Alt + F4
); - Re-open Claude.
Some warnings may appear β ignore them. These do not affect functionality.
Manual Integration
- Open the Termianl (Mac) or Command Line (Windows);
- Navigate to the directory where you store AI agents repos by
cd
command, for example:
cd Documents/projects
- Download the Slack MCP server repository from GitHub to your local machine:
git clone https://github.com/lars-hagen/slack-user-mcp.git
- Enter the newly created repository directory:
cd slack-user-mcp
- Install all required dependencies and packages for the Slack MCP server:
npm install
- Compile the project and create the build files needed for execution:
npm run build
- If you experience some problems in command execution in Terminal, use
Command/Ctrl + C
for process termination.
- Access Claude config via
Command/Ctrl + ,
; - Open Developer tab and select "Edit Config";
- Add Slack MCP configuration block after existing entries;
"slack": {
"command": "npm",
"args": [
"run",
"--prefix",
"/path/to/slack-user-mcp",
"start"
],
"env": {
"SLACK_TOKEN": "xoxp-...",
"SLACK_TEAM_ID": "T..."
}
}
- Insert required credentials:
- Repository path (from
pwd
command in the Terminal/Command line); - User OAuth Token
xoxp-...
(from Slack API); - Team ID
T...
(from workspace URL).
- Repository path (from
- Save the file.
Thanks for your feedback!
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 10
Setting Up AI Slack Automation
Swipe to show menu
In this tutorial, we will connect the Slack MCP server to automate Slack workflows. This server is a secure, open-source option.
Slack API Application Setup
- Access Slack API platform;
- Click "Get Started" button;
- Click "Go to Your Apps" button then;
- Click green "Create New App" button;
- Create new application "From Scratch" for custom configuration;
- Choose descriptive name (e.g., "AI Assistant" or personal identifier);
- Select target Slack workspace from dropdown menu.
- In the side menu, choose "OAuth & Permissions";
- To make the "Install to Workspace" button active, scroll down to the "Scope" section;
- In the "User Token Scopes" subsection, click "Add an Oauth Scope";
- One-by-one, add the following scopes:
channels:history
- read message history from public channels;channels:read
- access basic channel information;chat:write
- send messages to channels and users;reactions:read
- view emoji reactions on messages;reactions:write
- add emoji reactions to messages;users:read
- access basic user profile information.
- Scroll up and now click "Install to Workspace" button;
- In a new window, get acquainted with the requested permissions and allow them by clicking "Allow";
- Now, you have received an OAuth Token that starts with
xoxp-
. Don't close the window for future use.
- Open the target Slack workspace in a browser;
- Or open the Slack Desktop window;
- Click the workspace name to access settings;
- Copy the workspace URL and paste it to the browser address bar or write it manually;
- Locate Team ID in the URL structure (appears after "T" prefix);
- Don't close this browser tab as well.
Automatic MCP Server Installation (Recommended)
- In Claude, type this prompt:
Clone this MCP server to the Documents/projects folder and run the commands
git clone https://github.com/lars-hagen/slack-user-mcp.git
cd slack-user-mcp
npm install
npm run build
- Run the prompt.
- In Claude, paste the prompt:
Add this block to the Claude config file
{
"mcpServers": {
"slack": {
"command": "npm",
"args": [
"run",
"--prefix",
"/path/to/slack-user-mcp",
"start"
],
"env": {
"SLACK_TOKEN": "xoxp-your-user-token",
"SLACK_TEAM_ID": "T01234567"
}
}
}
}
- Add two required parameters inside the block:
- Slack token (starts with
xoxp-
) β copy it from the Slack API page; - Slack team ID (starts with
T
) β copy it from the workspace URL.
- Slack token (starts with
Both values are sensitive. Do not share them. Claude Desktop runs locally, so it is safe to paste them here.
- Run the prompt.
- Fully exit Claude Desktop (macOS:
Cmd + Q
, Windows:Alt + F4
); - Re-open Claude.
Some warnings may appear β ignore them. These do not affect functionality.
Manual Integration
- Open the Termianl (Mac) or Command Line (Windows);
- Navigate to the directory where you store AI agents repos by
cd
command, for example:
cd Documents/projects
- Download the Slack MCP server repository from GitHub to your local machine:
git clone https://github.com/lars-hagen/slack-user-mcp.git
- Enter the newly created repository directory:
cd slack-user-mcp
- Install all required dependencies and packages for the Slack MCP server:
npm install
- Compile the project and create the build files needed for execution:
npm run build
- If you experience some problems in command execution in Terminal, use
Command/Ctrl + C
for process termination.
- Access Claude config via
Command/Ctrl + ,
; - Open Developer tab and select "Edit Config";
- Add Slack MCP configuration block after existing entries;
"slack": {
"command": "npm",
"args": [
"run",
"--prefix",
"/path/to/slack-user-mcp",
"start"
],
"env": {
"SLACK_TOKEN": "xoxp-...",
"SLACK_TEAM_ID": "T..."
}
}
- Insert required credentials:
- Repository path (from
pwd
command in the Terminal/Command line); - User OAuth Token
xoxp-...
(from Slack API); - Team ID
T...
(from workspace URL).
- Repository path (from
- Save the file.
Thanks for your feedback!