Skip to content

README: 起動時に必要なスコープを追記 - #4

Draft
itaketayutaki wants to merge 1 commit into
masterfrom
fix/required-scopes-for-channels-cache
Draft

README: 起動時に必要なスコープを追記#4
itaketayutaki wants to merge 1 commit into
masterfrom
fix/required-scopes-for-channels-cache

Conversation

@itaketayutaki

Copy link
Copy Markdown

背景

README.md の manifest に記載されているユーザースコープが、現行 (v1.3.0) のサーバー起動要件を満たしていないため、空のキャッシュから起動した際に必ず fatal 終了する。

何が起きていたか

channels:read / channels:history / users:read / search:read のみを付与したトークンで slack-mcp-server を起動すると、以下のログを残してプロセスが落ちる:

{"level":"error","message":"Failed to fetch channels","error":"missing_scope",
 "stacktrace":"...provider.(*ApiProvider).getChannelsMultiType..."}
{"level":"fatal","message":"Error booting provider",
 "error":"API returned zero channels and no existing cache is available"}

原因はサーバー起動時の getChannelsMultiType が public / private / IM / MPIM の 全タイプを一括取得 しようとするため。groups:read / im:read / mpim:read のいずれかが欠けると conversations.listmissing_scope を返し、結果としてキャッシュが書き込まれずに起動失敗する。

変更内容

  • manifest の user スコープに以下を追加:
    • groups:read, im:read, mpim:read (起動時のキャッシュ生成に必須)
    • chat:writeSLACK_MCP_ADD_MESSAGE_TOOL=true で必要)
    • reactions:writeSLACK_MCP_REACTION_TOOL=true で必要)
  • 各スコープの用途を箇条書きで補足

確認方法

修正後の manifest からトークンを作り直し、空のキャッシュディレクトリ (~/Library/Caches/slack-mcp-server/) から起動して以下が出ることを確認済み:

"Slack MCP Server is fully ready."
"Starting STDIO server"

その後 channels_list ツールが正常にチャンネルを返却することも確認。

v1.3.0 はサーバー起動時に全チャンネルタイプ(public/private/IM/MPIM)を
一括取得してキャッシュを生成するため、`groups:read` / `im:read` / `mpim:read`
が無いと `missing_scope` で fatal 終了する。
また `chat:write` / `reactions:write` も対応 MCP オプションを有効化する
場合に必須となるため manifest と内訳説明に追加。
@coderabbitai

coderabbitai Bot commented May 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8feacdea-f349-4106-a76b-6b8fcbf847f6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/required-scopes-for-channels-cache

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@itaketayutaki itaketayutaki self-assigned this May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant