cyber-slack
cyber-slack
Slack CLI and MCP server for AI agents. Follows the AXI (API + CLI + MCP) pattern.
Installation
npm install -g cyber-slack
# or
pnpm add -g cyber-slackSetup
Set SLACK_TOKEN (user token) or SLACK_BOT_TOKEN (bot token):
# User token (xoxp-) - full access including search
export SLACK_TOKEN=xoxp-your-token-here
# Or bot token (xoxb-) - limited access, no search
export SLACK_BOT_TOKEN=xoxb-your-token-hereIf both are set, SLACK_TOKEN takes precedence.
Creating a Slack App
Go to api.slack.com/apps and create a new app
Under "OAuth & Permissions", add the required scopes:
chat:write- Post messageschannels:read- List channelschannels:history- Read channel historyusers:read- List usersusers:read.email- Read user emailssearch:read- Search messages (user token only)reactions:write- Add/remove reactionsusergroups:read- List user groupsusergroups:write- Create/update user groups
Install the app to your workspace
Copy the "Bot User OAuth Token" or "User OAuth Token"
CLI Usage
cyber-slack # show auth status
cyber-slack mcp # start MCP server
# Channels
cyber-slack channels list # list public channels
cyber-slack channels list -t public_channel,private_channel
# Conversations
cyber-slack conversations history <channel>
cyber-slack conversations replies <channel> <thread_ts>
cyber-slack conversations post <channel> "message"
cyber-slack conversations search "query" # requires user token
# Users
cyber-slack users list
cyber-slack users info <user_id>
cyber-slack users search "query"
# Reactions
cyber-slack reactions add <channel> <timestamp> thumbsup
cyber-slack reactions remove <channel> <timestamp> thumbsup
# User Groups
cyber-slack usergroups list
cyber-slack usergroups create "Team Name" --handle team
cyber-slack usergroups update <group_id> --name "New Name"
cyber-slack usergroups set-users <group_id> U123,U456MCP Server
Tools
Tool | Description | Token |
| List channels (public, private, DM, group) | Bot/User |
| Get message history from a channel | Bot/User |
| Get thread replies | Bot/User |
| Post a message | Bot/User |
| Search messages with modifiers | User |
| List workspace users | Bot/User |
| Get user details | Bot/User |
| Search users by name/email | Bot/User |
| Add emoji reaction | Bot/User |
| Remove emoji reaction | Bot/User |
| List user groups | Bot/User |
| Create user group | User |
| Update user group | User |
| Set group members | User |
Configuration
Claude Desktop / Cursor
Add to your MCP configuration:
{
"mcpServers": {
"cyber-slack": {
"command": "npx",
"args": ["cyber-slack", "mcp"],
"env": {
"SLACK_TOKEN": "${SLACK_TOKEN}"
}
}
}
}Or if installed globally:
{
"mcpServers": {
"cyber-slack": {
"command": "cyber-slack",
"args": ["mcp"],
"env": {
"SLACK_TOKEN": "${SLACK_TOKEN}"
}
}
}
}License
MIT