Back to Library
Stage 02 / Setup

Slack CLI Toolkit.

Full programmatic control of Slack from the terminal, for your agents. Send messages, search channels, manage users, post files, and react, across 306 API methods with raw passthrough for the rest. The key difference from the Slack MCP: this posts as a named bot identity, not as you. One bot token, zero external dependencies, and it survives restarts.

What you'll have
  • A clean bot identity automated messages post as your named bot app, so nobody confuses an agent post with something you typed.
  • The whole Slack API 306 methods wrapped, plus a raw passthrough escape hatch for anything not yet covered.
  • No MCP server to babysit a CLI on a bot token is scriptable, fast, and it just works after a restart.
Slack
4D Setup
Build time ~5 min
Track 4D required, 8D extensible
Touches slack-cli, Messages, Channels, Files, 306 methods
Source blueprints/slack-cli-toolkit/
One-click start

Connect it with Claude.

Paste this into Claude Code. Claude reads the local blueprint, walks you through creating the Slack app and bot token, then confirms the bot identity before posting anything.

How this fits in the OS.

Depends on

Python, a Slack workspace where you can create and install an app, a bot token, and the blueprints/slack-cli-toolkit/ files in your local workshop repo.

Uses

A zero-dependency Python CLI, slack-cli, that wraps the Slack Web API. This is a CLI path, not an MCP path. The agent calls it through Bash.

Unlocks

Your agent can post updates, read a channel for context, manage files and reactions, and search past conversations, all as a named bot.

What changes for you.

The Slack MCP server is convenient, but it posts as whatever human connected it, so every automated message looks like it came from you. This CLI fixes that.

  • Your agent gets its own identity. Posts come from your named bot app. No confusion about what was human and what was agent.
  • You get the whole API. 306 methods are wrapped, and a raw passthrough covers anything else.
  • It stays up. A CLI on a bot token is scriptable and survives restarts, unlike a flaky MCP connection.

Before you start.

Three things specific to this build

  • A Slack workspace where you can create and install an app.
  • Python 3.9 or newer. The toolkit has zero external dependencies, just stdlib.
  • 1Password or Infisical ready for your bot token. You will never paste it into Claude chat.
Bot, not human

This posts as your bot app, using a bot token that starts with xoxb-. That is the whole point: clean identity, persistent credentials, and a clear line between agent posts and yours.

The build.

Four checkpoints. The agent runs the commands, but you create the Slack app and type the token in yourself.

Step 01

Create the Slack app

2 min

Make a new app from scratch and pick your workspace:

Do in browser

Go to api.slack.com/apps, then Create New App, then From scratch. Name it and choose your workspace.

Step 02

Add bot scopes

2 min

Under OAuth and Permissions, add the bot token scopes you need. A good starter set:

Scopes to add chat:write, channels:read, channels:history, groups:read, reactions:write, files:write, users:read

Add more later as your builds need them.

Step 03

Install and get the token

2 min

Install the app to your workspace and let Claude install the CLI:

Paste into Claude Code

Read blueprints/slack-cli-toolkit/ and set up the slack-cli for me. After I install the app to my workspace, tell me exactly where to put the Bot User OAuth Token. I will paste it myself, never into this chat.

Claude offers to enter your token? Say no. The token (it starts with xoxb-) goes into the config file or an env var, typed by you.
Step 04

Confirm the bot identity

2 min

Run the auth test, then post one message:

Run in terminal slack-cli api auth.test

Then ask Claude: "Post a test message to #general." Check that it shows up as your bot, not as you.

If auth.test returns your bot's identity and a test message posts as the bot, your Slack CLI Toolkit is connected.

When it works.

You know the connection is real when four things happen in order:

  1. slack-cli api auth.test passes. The bot token is valid and the CLI can reach Slack.
  2. A test message posts as the bot. Not as you. That is the whole point.
  3. A read command returns channel history. The agent can pull context for a summary.
  4. The raw passthrough works. Any of the 306 methods is one slack-cli api call away.

If you get stuck.

Common failure modes, ranked by how often they waste time:

  • invalid_auth on auth.test. Recheck the bot token. Make sure you copied the Bot User OAuth Token, not a different one.
  • Missing scope errors. Add the scope the error names under OAuth and Permissions, then reinstall the app.
  • Bot cannot post to a channel. Invite the bot to that channel first.
  • Token in git. Stop. Move it to 1Password/Infisical or an env var, then re-run git status --short.

Where to go next.

Once Slack is connected, these are the natural next moves.

Back to the Library