SL

slack

Open Source CommunicationProductivity

Slack integration plugin for OpenCode - search channels, read messages, and post to Slack

slack messaging collaboration channels

Quick Install

npm install @openpets/slack
pnpm add @openpets/slack

Required Environment Variables

  • SLACK_TOKEN

    Slack 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. 1 list slack channels
  2. 2 search for public channels
  3. 3 find DMs and private channels

message search

  1. 1 search messages in #general
  2. 2 find messages containing 'meeting'
  3. 3 search messages from last week

message reading

  1. 1 get recent messages from #engineering
  2. 2 read thread replies
  3. 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.

Works with ChatGPT Works with Claude Works with Perplexity MCP Compatible