Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Setting Up AI Slack Automation | Smarter Communication & Time Control
Agentic AI for Automating Daily Office Tasks

bookSetting 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

Creating Your Slack App
expand arrow
  1. Access Slack API platform;
  2. Click "Get Started" button;
  3. Click "Go to Your Apps" button then;
  4. Click green "Create New App" button;
  5. Create new application "From Scratch" for custom configuration;
  6. Choose descriptive name (e.g., "AI Assistant" or personal identifier);
  7. Select target Slack workspace from dropdown menu.
Required Bot Token Scopes
expand arrow
  • 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.
Get Slack Team ID
expand arrow
  • 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)

Clone and Build the Server
expand arrow
  • 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.
Add Config Block
expand arrow
  • 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.

Both values are sensitive. Do not share them. Claude Desktop runs locally, so it is safe to paste them here.

  • Run the prompt.
Restart Claude
expand arrow
  • 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

GitHub Repository Cloning
expand arrow
  • 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
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.
Configuration File Updates
expand arrow
  • 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).
  • Save the file.
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 2. ChapterΒ 4

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Awesome!

Completion rate improved to 10

bookSetting 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

Creating Your Slack App
expand arrow
  1. Access Slack API platform;
  2. Click "Get Started" button;
  3. Click "Go to Your Apps" button then;
  4. Click green "Create New App" button;
  5. Create new application "From Scratch" for custom configuration;
  6. Choose descriptive name (e.g., "AI Assistant" or personal identifier);
  7. Select target Slack workspace from dropdown menu.
Required Bot Token Scopes
expand arrow
  • 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.
Get Slack Team ID
expand arrow
  • 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)

Clone and Build the Server
expand arrow
  • 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.
Add Config Block
expand arrow
  • 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.

Both values are sensitive. Do not share them. Claude Desktop runs locally, so it is safe to paste them here.

  • Run the prompt.
Restart Claude
expand arrow
  • 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

GitHub Repository Cloning
expand arrow
  • 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
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.
Configuration File Updates
expand arrow
  • 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).
  • Save the file.
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 2. ChapterΒ 4
some-alt