slack
Slack integration plugin for OpenCode - search channels, read messages, and post to Slack
Quick Install
npm install @openpets/slack pnpm add @openpets/slack Required Environment Variables
-
SLACK_TOKENSlack OAuth token (xoxp-...) OR use SLACK_XOXC_TOKEN + SLACK_XOXD_TOKEN for stealth mode
Example Queries
list slack channels search messages in #general get recent messages from #engineering find messages from @username Usage Scenarios
channel management
- 1
list slack channels - 2
search for public channels - 3
find DMs and private channels
message search
- 1
search messages in #general - 2
find messages containing 'meeting' - 3
search messages from last week
message reading
- 1
get recent messages from #engineering - 2
read thread replies - 3
get channel history
Optional Configuration
| Variable | Description |
|---|---|
SLACK_XOXC_TOKEN | Slack browser token (xoxc-...) for stealth mode authentication |
SLACK_XOXD_TOKEN | Slack browser cookie (xoxd-...) for stealth mode authentication |
DEFAULT_MESSAGE_LIMIT | Default number of messages to retrieve (default: 20) |
DEFAULT_CHANNEL_LIMIT | Default number of channels to list (default: 100) |
SLACK_ENABLE_POSTING | Enable message posting: 'true' for all channels or comma-separated channel IDs |
LOG_LEVEL | Logging level: debug, info, warn, error (default: info) |
Use slack with Your AI Assistant
This open source plugin works with OpenCode-compatible AI assistants including ChatGPT, Claude, Perplexity, and other LLM-powered coding tools. Install the plugin and start using natural language to interact with slack.
Related Plugins
polar
Polar API integration for OpenCode - manage products, customers, and orders
discord
Search and read messages from Discord servers, list channels, send messages using a Discord bot, and connect personal Discord accounts via mautrix-discord Matrix bridge
flights
Flight search plugin for OpenCode - search for flights, compare prices, and find the best travel options