convez.ai
MCP Server
tackeyy

slamy

tackeyy/slamy

Ver no GitHub
BomPluginScore · de 0 a 100

Slack MCP server & CLI

Instalação

$npx convez-ai tackeyy/slamy

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
85%
Último commit
há 4 dias
Versão
v0.1.0
Issues abertas
7
Contribuidores
2

README

A tradução para o português deste README ainda está na fila.

slamy — Slack MCP server & CLI

English | 日本語

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.

Features

  • 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

Installation

Homebrew

brew install tackeyy/tap/slamy

Go

go install github.com/tackeyy/slamy@latest

Build from source

git clone https://github.com/tackeyy/slamy.git
cd slamy
go build -o slamy .

Quick Start

1. Create a Slack App

  1. Go to Slack API and click Create New App
  2. Choose From scratch, name your app (e.g., slamy)
  3. Select the workspace to install to

2. Configure User Token Scopes

In OAuth & Permissions > Scopes > User Token Scopes, add:

ScopePurpose
channels:historyView messages in public channels
channels:readView basic channel info
chat:writeSend messages (as yourself)
files:readDownload files shared in channels
groups:historyView messages in private channels
groups:readView basic private channel info
reactions:writeAdd emoji reactions
search:readSearch messages
users:readView users and their basic info
users:read.emailView email addresses
users.profile:readView user profiles
team:readView workspace (team) info

3. Install and Set Environment Variables

Install the app to your workspace, then set your token:

export SLACK_USER_TOKEN=xoxp-your-user-token

4. Run

./slamy channels list

User Token vs Bot Token

Slack Apps can issue two types of tokens. Which one to use depends on your use case.

Bot Token (xoxb-)User Token (xoxp-)
Message search (search:read)Not availableAvailable
Token managementNeed 2 tokens if search is required1 token for everything
Message postingPosts as "app" (bot name)Posts as the user
Private channel accessMust be invited to channelAccess same channels as the user

Use User Token when: acting on behalf of a user

slamy was built as part of an AI secretary / personal assistant (Claude Code + MCP) that reads, searches, and posts to Slack on behalf of a specific user. In this use case, User Token is the natural choice:

  1. Search requires it — search:read is a User Token-only scope. Bot Tokens simply cannot search messages
  2. Single token — no need to manage two tokens and worry about which operation uses which
  3. User context — messages posted by the agent appear as the user, making it clear who is responsible
  4. Channel access — the agent can access the same channels as the user without manual invitation

Use Bot Token when: building a bot

Bot Token is the right choice if you are building a Slack bot (not a personal assistant):

  • The bot has its own identity and posts as "app name", not as a specific user
  • Multiple users interact with the bot — it shouldn't act as any single user
  • You want to control access by inviting the bot only to specific channels
  • You don't need message search, or can accept the limitation

Commands

channels list — List channels

slamy channels list [--limit <number>] [--include-archived] [--json] [--plain]
FlagRequiredDescription
--limit <number>NoMaximum number of channels to return
--include-archivedNoInclude archived channels
--jsonNoOutput as JSON
--plainNoOutput as TSV

Global options

These flags work with any command:

FlagDescription
--jsonOutput as JSON
--plainOutput as TSV
--utcDisplay timestamps in UTC (default: local TZ)
--tz <iana>Display timestamps in the specified IANA timezone (e.g. Asia/Tokyo)

channels history — Get channel message history

slamy channels history <channel_or_url> [--limit <n>] [--oldest <ts>] [--latest <ts>] [--resolve-names]
FlagRequiredDescription
<channel_or_url>YesChannel ID or Slack permalink URL
--limit <n>NoNumber of messages (default: 20)
--oldest <ts>NoOnly messages after this Unix timestamp
--latest <ts>NoOnly messages before this Unix timestamp
--resolve-namesNoResolve user_id / bot_id to display names

messages post — Post a message

slamy messages post <channel_id> --text <message>

messages reply — Reply to a thread

slamy messages reply <channel_or_url> [thread_ts] --text <message> [--broadcast]

<channel_or_url> accepts either a channel ID + thread_ts, or a single Slack permalink URL.

messages update / messages delete — Edit messages

slamy messages update <channel_or_url> [ts] --text <new_text>
slamy messages delete <channel_or_url> [ts]

messages schedule — Schedule a message for later

slamy messages schedule <channel_id> --text <message> --at <datetime>

<datetime> is a Unix timestamp or ISO 8601 (e.g. 2026-02-24T09:00+09:00).

threads replies — Get thread replies

slamy threads replies <channel_or_url> [thread_ts] [--limit <n>] [--resolve-names]

<channel_or_url> accepts a channel ID + thread_ts, or a single Slack permalink URL.

channels members — List channel members

slamy channels members <channel_or_url> [--resolve-names]

<channel_or_url> accepts a channel ID or a Slack permalink URL. --resolve-names resolves user_id to display names.

users list / users profile

slamy users list [--include-deactivated] [--include-bots]
slamy users profile <user_id>

assistant set-status — Set AI Assistant thread status

slamy assistant set-status --channel <id> --thread <ts> --status <text> [--loading-message <text...>]

Sets the typing indicator status on an AI Assistant thread. Use --plain for machine-readable TSV output (ok\t<channel>\t<thread>), suitable for CI / shell scripting.

reactions get — Get reactions on a specific message

slamy reactions get <channel_or_url> [timestamp] [--resolve-names]

Returns the emoji reactions and the users who added them. Useful before calling reactions add to check existing reactions.

reactions list — List reactions made by a user

slamy reactions list [--user <user_id>] [--limit <n>] [--count] [--resolve-names]

--resolve-names resolves channel_id to channel names (#general instead of #C0123ABCDE).

Note: reactions list (lists reactions by a user) and reactions get (gets reactions on a message) are different APIs.

reactions add / reactions remove — Add/remove emoji reaction

slamy reactions add <channel_or_url> [timestamp] --name <emoji>
slamy reactions remove <channel_or_url> [timestamp] --name <emoji>

search messages — Search messages

slamy search messages <query> [--count <n>] [--page <n>] [--sort <field>] [--sort-dir <dir>] [--resolve-names]
FlagRequiredDescription
<query>YesSearch query (supports Slack modifiers like in:#channel, from:@user)
--count <n>NoResults per page (default: 20)
--page <n>NoPage number (default: 1)
--sort <field>NoSort by timestamp or score (default: timestamp)
--sort-dir <dir>Noasc or desc (default: desc)
--resolve-namesNoResolve user_id to display names

auth test — Test authentication

slamy auth test [--json] [--plain]

team info — Get workspace info

slamy team info [--json] [--plain]

Returns the workspace domain, email_domain, and Enterprise info. The email_domain is useful for diagnosing SSO domain mismatches. Requires the team:read scope. Note: SSO enforcement settings are not exposed by the Slack API.

mcp — Start MCP server

slamy mcp

Starts an MCP server over stdio, exposing all operations as tools for AI agents (e.g., Claude Code).

Configuration

Environment Variables

VariableRequiredDescription
SLACK_USER_TOKENYes (either)Slack User OAuth Token (xoxp-...) — required for search messages and most read operations
SLACK_BOT_TOKENYes (either)Slack Bot OAuth Token (xoxb-...) — used for write operations and reactions get
SLAMY_TZNoIANA timezone used by engagement commands (default: Asia/Tokyo)
SLACK_TEAM_IDNoSlack Team ID (for workspace-specific operations)

At least one of SLACK_USER_TOKEN / SLACK_BOT_TOKEN must be set. When both are set, slamy uses each token for the operations it best fits.

Output Formats

Text (default)

#general                       C01234ABCDE  [42 members]
#random                        C01234FGHIJ (private)  [15 members]

JSON (--json)

[
  {
    "id": "C01234ABCDE",
    "name": "general",
    "num_members": 42,
    "is_private": false
  }
]

TSV (--plain)

C01234ABCDE	general	42	public
C01234FGHIJ	random	15	private

MCP Server

Usage with Claude Code

claude mcp add slamy /path/to/slamy mcp

Usage with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "slamy": {
      "command": "/path/to/slamy",
      "args": ["mcp"],
      "env": {
        "SLACK_USER_TOKEN": "xoxp-your-user-token"
      }
    }
  }
}

Available Tools

ToolDescription
slack_list_channelsList all channels
slack_get_channel_historyGet channel message history
slack_get_thread_repliesGet thread replies
slack_post_messagePost a message to a channel
slack_reply_to_threadReply to a thread
slack_add_reactionAdd emoji reaction
slack_get_usersList workspace users
slack_get_user_profileGet user profile
slack_search_messagesSearch messages

Development

# Build
go build -o slamy .

# Run all tests with race detector
go test -race ./...

# Run tests with coverage
go test -cover ./...

See CONTRIBUTING.md for development setup and coding standards. See docs/TESTING.md for the comprehensive testing guide.

Contributing

Contributions are welcome! Please read our Contributing Guide before submitting a Pull Request.

All contributors are expected to follow our Code of Conduct.

License

MIT

Links

Ver o original no GitHub

Relacionados