Install the Slack CLI and MCP server
Make your own Slack app from a link, install the Slack CLI with npm and sign in with its user token.
Connect your Slack workspace once, and from then on your AI agent reads and searches your channels, DMs and threads
as you. Slack lets a program read messages only through an app installed in the workspace, so you make a small app
for slk yourself. Making the app, installing slk and signing in take about ten minutes.
When you finish, the agent on this computer sees what you see in Slack, finds messages with Slack's own search and sends only what you ask it to. You need the right to install apps in the workspace, or an admin who approves the app.
On this page:
- In short
- What you need
- Why an app of your own
- Make your own Slack app
- Install the app and copy the token
- Install slk
- Sign in
- Check that it works
- Sign out
In short
- Make the app from a link that fills in its settings.
- Install it in your workspace and copy the User OAuth Token.
- Install the tool, then let
setupask for the token:
npm install -g @wirecat/slack-cli
slk personal setupWhat you need
- A Slack workspace where you may install apps. In some workspaces only an admin may. Then Slack lets you send a request, and you install the app once the admin approves it.
- Node.js 22.16 or a later 22.x, or Node.js 24 or later. Node 23 is not supported.
Why an app of your own
Slack gives a program access to messages only through an app, and the app sets how fast the program may read. Since May 2025 an app that another company publishes outside the Slack Marketplace may read one page of 15 messages a minute of a channel's history. An app made in your own workspace keeps the normal limits. It also belongs to you: nobody else holds its token, and only you use it.
The app asks only for what the commands use: reading channels, DMs, people, files, reactions and pins, searching, and sending as you.
Make your own Slack app
- Sign in to Slack in your browser, in the workspace
slkshould read: slack.com/signin. - Open Create the app in Slack.
Slack opens Create New App with the settings of
slkalready filled in. - Choose your workspace in the list and click Next until you see Create, then click Create. You do not need to change anything on the way.
- Slack opens the app's Basic Information page. Its Client ID, Client Secret, Signing Secret and Verification Token are not needed. The token you need comes in the next step.
If the link does not open the form, go to api.slack.com/apps, click Create New App, then From a manifest, and choose your workspace. Replace the text there with the manifest of slk: on its page, click Copy raw file, the button with two squares above the text, and paste.
Install the app and copy the token
- On the app's page, in the menu on the left, click OAuth & Permissions. If you lost the page, open api.slack.com/apps and click WireCat slk.
- Click Install to Workspace. Slack may show your workspace's name in place of "Workspace". It lists what the app may do as you: read and send messages, see people and files. Click Allow.
- You are back on OAuth & Permissions. Under OAuth Tokens, find User OAuth Token. It starts with
xoxp-. Click Copy.
If Slack offers to send a request in place of installing, only an admin may install apps in this workspace. Send the request. Once the admin approves it, open OAuth & Permissions again and click Install to Workspace.
Copy only the token that starts with xoxp-. A bot token (xoxb-) is refused, because a bot sees only the channels
it is added to, while slk reads as you.
Install slk
Install slk once on each computer where you or an agent use it:
npm install -g @wirecat/slack-cli
slk --version
slk doctorThe command is slk, not slack: slack is the name of Slack's own developer CLI. doctor needs no network and
opens no keyring. It shows the version, where settings live, the profiles that exist, and whether other users of the
computer can read the settings.
Give your terminal agent the tool's skill, the short guide to its commands. An app that connects to MCP servers uses the tool over MCP instead, as use it shows.
slk skill installSign in
A profile is a name you choose for one Slack workspace, such as personal or work. It is the first word of every
command that uses an account. Sign the profile in with the token:
slk personal setupsetup shows the same steps as this page one at a time, then asks for the token. slk personal session start asks
for it at once. Both read the token hidden or from stdin, never as an argument, so it does not end up in your shell
history. Slack checks the token first. Then it goes into the system keyring, or into a private file with
--credential-storage file where no keyring works.
Check that it works
slk personal session status --check
slk personal chats list
slk personal inboxsession status --check asks Slack whose token it is. chats list shows the channels, DMs and group DMs you are in,
and inbox shows what is unread.
Sign out
slk personal session end forgets the token on this computer. The token itself stays valid in Slack while the app is
installed. To revoke it, remove the app from the workspace.
Next: use it.