A Slack MCP (Model Context Protocol) server that also works as a standalone CLI. Connect AI agents like Claude to your Slack workspace, or use it directly from the terminal.
- MCP Server — expose Slack operations as MCP tools for AI agents (Claude Code, Claude Desktop, etc.)
- CLI — use the same operations directly from the terminal
- Channels — list channels, retrieve message history
- Messages — post messages, reply to threads
- Users — list workspace members, view profiles
- Reactions — add emoji reactions to messages
- Search — search messages across channels with Slack query syntax
- Multiple output formats — human-readable text, JSON, and TSV
git clone https://github.com/tackeyy/slamy.git
cd slamy
go build -o slamy .- Go to Slack API and click Create New App
- Choose From scratch, name your app (e.g.,
slamy) - Select the workspace to install to
In OAuth & Permissions > Scopes > Bot Token Scopes, add:
channels:history— view messages in public channelschannels:read— view basic channel infochat:write— send messagesgroups:history— view messages in private channelsgroups:read— view basic private channel inforeactions:write— add emoji reactionsusers:read— view users and their basic infousers:read.email— view email addressesusers.profile:read— view user profiles
For message search, also add a User Token Scope:
search:read— search messages
Install the app to your workspace, then set your tokens:
export SLACK_BOT_TOKEN=xoxb-your-bot-token
export SLACK_USER_TOKEN=xoxp-your-user-token # optional, for search./slamy channels listslamy channels list [--limit <number>] [--include-archived] [--json] [--plain]| Flag | Required | Description |
|---|---|---|
--limit <number> |
No | Maximum number of channels to return |
--include-archived |
No | Include archived channels |
--json |
No | Output as JSON |
--plain |
No | Output as TSV |
slamy channels history <channel_id> [--limit <number>] [--json] [--plain]| Flag | Required | Description |
|---|---|---|
<channel_id> |
Yes | Channel ID |
--limit <number> |
No | Number of messages (default: 20) |
slamy messages post <channel_id> --text <message> [--json] [--plain]| Flag | Required | Description |
|---|---|---|
<channel_id> |
Yes | Channel ID |
--text <message> |
Yes | Message text |
slamy messages reply <channel_id> <thread_ts> --text <message> [--json] [--plain]| Flag | Required | Description |
|---|---|---|
<channel_id> |
Yes | Channel ID |
<thread_ts> |
Yes | Thread timestamp |
--text <message> |
Yes | Reply text |
slamy users list [--include-deactivated] [--include-bots] [--json] [--plain]| Flag | Required | Description |
|---|---|---|
--include-deactivated |
No | Include deactivated users |
--include-bots |
No | Include bot users |
slamy users profile <user_id> [--json] [--plain]| Flag | Required | Description |
|---|---|---|
<user_id> |
Yes | User ID |
slamy reactions add <channel_id> <timestamp> --name <emoji> [--json] [--plain]| Flag | Required | Description |
|---|---|---|
<channel_id> |
Yes | Channel ID |
<timestamp> |
Yes | Message timestamp |
--name <emoji> |
Yes | Emoji name (without colons) |
slamy search messages <query> [--count <number>] [--page <number>] [--sort <field>] [--sort-dir <direction>] [--json] [--plain]| Flag | Required | Description |
|---|---|---|
<query> |
Yes | Search query (supports Slack modifiers like in:#channel, from:@user) |
--count <number> |
No | Results per page |
--page <number> |
No | Page number |
--sort <field> |
No | Sort field |
--sort-dir <direction> |
No | Sort direction |
Requires SLACK_USER_TOKEN environment variable.
slamy auth test [--json] [--plain]slamy mcpStarts an MCP server over stdio, exposing all operations as tools for AI agents (e.g., Claude Code).
| Variable | Required | Description |
|---|---|---|
SLACK_BOT_TOKEN |
Yes | Slack Bot User OAuth Token |
SLACK_USER_TOKEN |
No | Slack User OAuth Token (for search) |
#general C01234ABCDE [42 members]
#random C01234FGHIJ (private) [15 members]
[
{
"id": "C01234ABCDE",
"name": "general",
"num_members": 42,
"is_private": false
}
]C01234ABCDE general 42 public
C01234FGHIJ random 15 private
claude mcp add slamy /path/to/slamy mcpAdd to your claude_desktop_config.json:
{
"mcpServers": {
"slamy": {
"command": "/path/to/slamy",
"args": ["mcp"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-bot-token",
"SLACK_USER_TOKEN": "xoxp-your-user-token"
}
}
}
}| Tool | Description |
|---|---|
slack_list_channels |
List all channels |
slack_get_channel_history |
Get channel message history |
slack_get_thread_replies |
Get thread replies |
slack_post_message |
Post a message to a channel |
slack_reply_to_thread |
Reply to a thread |
slack_add_reaction |
Add emoji reaction |
slack_get_users |
List workspace users |
slack_get_user_profile |
Get user profile |
slack_search_messages |
Search messages |
go build -o slamy .
go test ./...MIT