Skip to main content
Glama
yentsun

yt-slack-mcp

by yentsun

yt-slack-mcp

Slack 用の MCP サーバー — パーマリンク、スレッド、チャンネル履歴の読み取り、スレッドへの返信、リアクションの追加が可能です。

Model Context Protocol 仕様を実装しています。stdio トランスポート上で動作し、JSON-RPC 2.0 で通信し、initialize でプロトコルバージョンをネゴシエーションし、tools 機能をアドバタイズし、各ツールを JSON Schema で記述します。プロトコルバージョンのネゴシエーションは @modelcontextprotocol/sdkServer クラスが処理し、デフォルトで最新のサポートバージョンを使用します。

ツール

ツール

説明

slack_read_permalink

パーマリンクからメッセージまたはスレッドを読み取る(PDF/画像を含む)

slack_get_replies

チャンネル ID + タイムスタンプでスレッドの返信を読み取る

slack_get_history

最近のチャンネル履歴を読み取る

slack_reply_to_thread

スレッドに返信する(許可されたチャンネルのみ)

slack_add_reaction

リアクションを追加する(許可されたチャンネルのみ)

読み取りツールはプライベートな Slack ブラウザセッション API(xoxc / xoxd トークン経由)を使用するため、プライベートファイルの内容も取得できます — PDF はダウンロードしてテキスト抽出され(最大 50 ページ / 100k 文字)、画像はインラインで返されます。

Related MCP server: Slack MCP Server

セットアップ

1. ブラウザセッショントークンを取得する

  • xoxc: Slack Web の localStorage トークン(ログイン済みのブラウザセッションから取得)。

  • xoxd: d という名前の Slack クッキー。

Slack がセッションをローテーションまたは無効化した場合は、これらの更新が必要になる場合があります。

2. シークレットを配置する

各トークンを 1 行のファイルとして保存します:

~/.config/opencode/secrets/slack-xoxc.txt
~/.config/opencode/secrets/slack-xoxd.txt

または、設定ファイルや環境変数でパスを上書きします。

3. (任意)書き込み可能なチャンネルとパスを設定する

すべての設定は ~/.config/yt-slack-mcp/config.json の JSON 設定ファイルに記述できます(SLACK_MCP_CONFIG で上書き可能):

{
  "secretsDir": "~/.config/opencode/secrets",
  "xoxcPath": "~/.config/opencode/secrets/slack-xoxc.txt",
  "xoxdPath": "~/.config/opencode/secrets/slack-xoxd.txt",
  "allowedWriteChannels": ["C0123456789", "C0987654321"],
  "userAgent": "Mozilla/5.0"
}

デフォルトでは、書き込みツール(slack_reply_to_threadslack_add_reaction)はロックダウンされています — 書き込み可能なチャンネルはありません。すべてのフィールドは任意です。ファイルがない場合はデフォルト値が使用されます。環境変数は常に設定ファイルより優先されます。

設定

設定の解決順序: 組み込みデフォルト → 設定ファイル → 環境変数。

設定ファイルキー

環境変数

デフォルト

説明

secretsDir

SLACK_MCP_SECRETS_DIR

~/.config/opencode/secrets

トークンファイルを保持するディレクトリ

xoxcPath

SLACK_MCP_XOXC_PATH

$SECRETS_DIR/slack-xoxc.txt

xoxc トークンへのパス

xoxdPath

SLACK_MCP_XOXD_PATH

$SECRETS_DIR/slack-xoxd.txt

xoxd トークンへのパス

allowedWriteChannels

SLACK_MCP_ALLOWED_WRITE_CHANNELS

(なし)

書き込みツールが許可されるチャンネル ID(環境変数ではカンマ区切り)

userAgent

SLACK_MCP_USER_AGENT

Mozilla/5.0

HTTP User-Agent ヘッダー

(設定ファイルパス)

SLACK_MCP_CONFIG

~/.config/yt-slack-mcp/config.json

JSON 設定ファイルへのパス

MCP ホスト設定

opencode

{
  "mcp": {
    "slack": {
      "type": "local",
      "command": ["npx", "yt-slack-mcp"]
    }
  }
}

Claude Desktop

{
  "mcpServers": {
    "slack": {
      "command": "npx",
      "args": ["yt-slack-mcp"]
    }
  }
}

ライセンス

MIT

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    A production-ready MCP server for the Slack API that enables searching, listing channels, reading history, inspecting users, fetching threads, and sending messages through controlled Slack tools.
    16,956
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    MCP server for interacting with Slack using a user token. It allows reading channels, DMs, threads, search, and posting messages as the authenticated user.
    25
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    MCP server that reads Slack through your own browser session, authenticating as you rather than a bot. Provides tools to search messages, retrieve channel/DM/thread history, resolve users, and post messages (write disabled by default).
    10
    MIT

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yentsun/slack-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server