Skip to main content
Glama
zio3
by zio3

slack-read-mcp

Slack を読むだけの MCP サーバー。

Bot が招待されたチャンネルのメッセージを読みます。招待されていないチャンネルは、 チャンネル ID を正確に指定しても読めません。書き込みは一切できません。

サーバーもデータベースも使いません。利用者の PC 上で動き、Slack Web API を直接呼びます。 このサーバー自体は状態を持たず、メッセージを保存しません(取得のたびに Slack へ 問い合わせます)。

読んだ内容からタスク台帳や要約を手元に作るのは利用側の想定された使い方ですが、 全文アーカイブは作らない・転記物は元と同じ機密度で扱う、という線引きがあります。 詳細は GUIDE.md を参照してください。

設計

権限の実体は「Bot がどのチャンネルに招待されているか」だけです。

  • インストールしただけでは一件も読めない

  • 招待を外すと、トークンを変更せずに即座に読めなくなる

  • パブリック/プライベートの別は関係ない。効いているのは招待の有無だけ

  • 書き込みは Slack が API レベルで拒否する(スコープを付与していないため)

チャンネル一覧を取得する権限(channels:read)も付与しません。したがって、 Bot は自分が招待されていないチャンネルの存在を知ることができません。 読み取り対象は設定ファイルで指定します。

設定ファイルはアクセス制御ではありません。 そこに何を書いても、 招待されていないチャンネルは読めません。編集しても危険はありません。

Related MCP server: Slack MCP Server

セットアップ

導入作業を AI に任せる場合は、INSTALL.md を読ませてください。 環境(Node のバージョン、Slack アプリの有無)を確認したうえで、利用者にしかできない操作だけを 依頼するよう書かれています。以下は人間が自分で作業する場合の手順です。

1. Slack アプリを作る

api.slack.com/apps → Create New App → From a manifest を選び、 slack-app-manifest.json の内容を貼り付けます。

付与されるスコープは次のとおりです。すべて読み取り専用です。

channels:history   参加しているパブリックチャンネルのメッセージ
groups:history     参加しているプライベートチャンネルのメッセージ
users:read         ユーザー ID から表示名への解決
reactions:read     メッセージに付いたリアクション
files:read         添付ファイル(画像・Excel・PDF)の取得。download_file にだけ必要

reactions:read と files:read は無くても動きます(該当の情報が省略される/missing_scope が返る)。 本文だけで足りるなら Manifest から外して構いません。逆に後から足す場合は、Manifest を更新して 再インストールしないと既存トークンには反映されません。

作成後、ワークスペースへインストールして Bot User OAuth Token(xoxb- で始まる)を取得します。

2. Bot をチャンネルへ招待する

読みたいチャンネルで次を実行します。招待していないチャンネルは読めません。

/invite @slack-read-mcp

3. トークンと読み取り対象を配置する

設定はホームディレクトリの ~/.config/slack-read-mcp/ に置きます。MCP の設定ファイルや 環境変数にトークンを書く必要はありません。

~/.config/slack-read-mcp/
├── token           Bot User OAuth Token(xoxb-…)を1行だけ
└── channels.json   読み取り対象のチャンネル一覧

トークンは、クリップボード経由にすると画面やコマンド履歴に出さずに配置できます。 順序に注意してください: ①下のコマンドを先にターミナルへ貼る(実行はまだ)→ ②Slack のページでトークンを Copy → ③ターミナルに戻って Enter。 トークンをコピーした後にコマンドをコピーすると、クリップボードが上書きされて消えます。

# Windows
New-Item -ItemType Directory -Force "$env:USERPROFILE\.config\slack-read-mcp" | Out-Null
Set-Content "$env:USERPROFILE\.config\slack-read-mcp\token" (Get-Clipboard).Trim() -NoNewline
Set-Clipboard "done"   # 本物のトークンをクリップボードに残さない
# macOS / Linux
mkdir -p ~/.config/slack-read-mcp && pbpaste > ~/.config/slack-read-mcp/token && echo done | pbcopy

AI に導入を任せる場合は、この配置は AI がクリップボードから直接行います (INSTALL.md 参照。利用者はコピーだけ)。

channels.json は channels.example.json を参考に作ります。チャンネル ID は、 Slack でチャンネル名を右クリック →「リンクをコピー」で取得できます。

[
  { "id": "C0123456789", "name": "team-general" }
]

4. MCP クライアントに登録する

Claude Code の場合:

claude mcp add slack-read --scope local -- npx -y github:zio3/slack-read-mcp

推奨はローカルスコープ(この Slack に関わる作業フォルダにだけ登録)です。ユーザー スコープは全プロジェクトに常駐するため、複数の顧客・業務を扱う PC では情報の混線経路に なります。プロジェクトスコープはリポジトリ内に .mcp.json を作って共有してしまうため 不適切です。

設定の探索順

設定

優先1(環境変数)

優先2(ファイル)

トークン

SLACK_BOT_TOKEN

SLACK_TOKEN_FILE のパス → ~/.config/slack-read-mcp/token

読み取り対象

SLACK_CHANNELS_FILE のパス

~/.config/slack-read-mcp/channels.json

通常はファイルだけで動きます。環境変数は CI などで上書きしたい場合に使ってください。 なお環境変数を使う場合、変更は起動中のプロセスへ伝播しないため、ターミナルごと 再起動が必要になります。ファイル方式ならこの問題はありません(MCP クライアントの 再起動・再接続だけで反映されます)。

ツール

ツール

内容

list_channels

設定ファイルに書かれた対象の一覧。Slack へは問い合わせない

get_channel_history

チャンネルのメッセージ取得。oldest で差分のみ取得可。スレッドの親には latest_reply が付く

list_active_threads

巡回用。since 以降の新規投稿と、since 以降に返信が付いたスレッドだけを短く返す。判定はサーバー側で行うので、動きのないスレッドを読まされない

get_thread_replies

スレッド返信の取得。oldest で増分のみ取得可

download_file

添付ファイルを Bot トークンで取得してローカルに保存し、パスを返す。files:read が必要。メッセージの files[].id を渡す

resolve_user

ユーザー ID を表示名・実名に解決

添付ファイルのメタデータ(files: id / 名前 / 種類 / サイズ)はメッセージに含まれます。中身は download_file で明示的に取ります。

使う AI に読ませるもの

GUIDE.md を最初に読み込ませてください。

Slack のデータ構造には、知らないと取りこぼしに気づけない箇所があります。 特に get_channel_history はスレッド返信を返しません。これを知らずに使うと、 返信のやり取りを丸ごと見落とし、しかも見落としたことに気づけません。

開発

npm install
npm run build
pwsh ./test-mcp.ps1 -Tool list_channels

test-mcp.ps1 は MCP サーバーを素の JSON-RPC で叩く確認用スクリプトです。

ビルドを挟まず TypeScript のまま実行することもできます(Node 22.6 以降)。

npm run start:ts        # Node 22.6〜23.5(--experimental-strip-types 付き)
node src/index.ts       # Node 23.6 以降(フラグ不要)

配布時にビルド方式を既定にしているのは、実行環境の Node バージョンに依存させないためです。 型ストリッピングはまだ experimental で、stderr に警告が出ます。

ライセンス

MIT

Available Tools

5 tools
get_channel_historyA

チャンネルのメッセージを新しい順に取得する。oldest に前回の ts を渡すと差分だけ取れる。スレッド返信は含まれない(reply_count > 0 のメッセージには get_thread_replies が必要)。各メッセージの reactions も返す(Bot に reactions:read スコープが無い場合は省略される)。Bot が参加していない場合は not_in_channel または channel_not_found になる。

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo取得件数
oldestNoこの ts より新しいメッセージのみ取得する
channelIdYesチャンネル ID(C から始まる)

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden — and it delivers. It discloses ordering semantics, the partial-inclusion of messages (thread replies excluded), the conditional return of reactions depending on bot scope, and failure modes the agent will encounter. This is exactly the behavioral context an agent needs beyond a bare 'get messages' statement.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four compact sentences that are front-loaded with the core purpose, followed by progressively specific usage details (diff fetching, thread exclusion, reactions scope, error conditions). There is minimal waste — every sentence earns its place. Slightly long compared to the simplest tools, but the richness matches the complexity of the behavior being disclosed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and no annotations, the description does an excellent job covering what an agent needs: retrieval semantics, incremental fetching, thread exclusion, reaction scope dependency, and error behavior. The only minor gap is that the exact response message structure isn't spelled out, though that's a conventional Slack message shape and the description notes reactions are included. Fully adequate for correct tool invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description raises it by adding real usage semantics for `oldest` — explaining that passing the previous ts yields only the diff. The ordering semantics ('新しい順') also clarifies how `limit` and `oldest` interact. `channelId` and `limit` are already well documented in the schema, so the description's marginal addition is meaningful but not extensive.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb-resource pair (get channel messages) with explicit ordering ('新しい順' = newest first). It clearly distinguishes itself from siblings by stating that thread replies are NOT included and routing messages with reply_count > 0 to get_thread_replies. An agent can reliably discriminate this from list_channels, list_active_threads, and get_thread_replies.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidance: it explains the incremental-fetch pattern ('oldest に前回の ts を渡すと差分だけ取れる'), states when NOT to use it (thread replies require get_thread_replies), calls out the scope prerequisite (reactions:read for reactions), and discloses error conditions (not_in_channel / channel_not_found when bot not participating). This is model-grade routing and preconditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_thread_repliesA

スレッドの返信を取得する。親メッセージの ts を渡す。oldest を渡すと、それより新しい返信だけ返す(親も含めない)。oldest を渡さない場合は親メッセージを含めて全件返す(ページ送りで最大 2000 件)。

ParametersJSON Schema
NameRequiredDescriptionDefault
oldestNoこの ts より新しい返信だけ返す(前回見た latest_reply を渡す)
threadTsYes親メッセージの ts
channelIdYesチャンネル ID

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the burden of behavioral disclosure. It explains the pagination behavior (max 2000 replies, inclusion/exclusion of parent message) which is useful, but doesn't disclose rate limits, error conditions, or what happens with empty threads. The behavior described is consistent with the tool's purpose.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded with the core purpose, then explains the two modes of operation. Every sentence adds value, though the pagination details could be slightly more structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only retrieval tool with 100% schema coverage, the description covers the essential behavior. However, it doesn't mention return format, sorting order, or error handling, which an agent might need to know for correct invocation. The lack of an output schema increases the burden on the description to explain what the caller receives.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters. The description adds context about the oldest parameter's role in pagination and the parent message inclusion behavior, but doesn't add significant meaning beyond the schema's parameter descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves thread replies and requires the parent message's ts. It distinguishes itself from siblings by focusing on thread replies rather than channel history or active threads, though it doesn't explicitly name a sibling alternative.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains when to use the oldest parameter and the default behavior when it's omitted, giving clear context for pagination. It doesn't explicitly state when not to use this tool versus alternatives, but the thread-specific focus makes the usage context clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_active_threadsA

since 以降に動きのあったものだけを返す巡回用ツール。チャンネル履歴を oldest まで遡って親メッセージを集め、(1) since より新しい投稿、(2) since より新しい返信が付いたスレッド(latest_reply で判定)を抽出する。返信本文は含まない(動いたスレッドは get_thread_replies を oldest 付きで読む)。本文は先頭 1 行のみに切り詰めるので、更新のないスレッドを読まされることがない。since には前回巡回した時刻(ts か ISO 8601)を渡す。

ParametersJSON Schema
NameRequiredDescriptionDefault
sinceYesこの時刻より後の動きだけ返す。ts か ISO 8601 の日時(前回の巡回時刻)
oldestNo履歴を遡る下限(親メッセージの ts)。監視したい最古のスレッドの親を指定する。省略時はチャンネルの先頭まで(MAX 10 ページ = 2000 件)
channelIdYesチャンネル ID(C から始まる)

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does well: it discloses that the tool traverses channel history to oldest, judges activity using latest_reply, excludes reply bodies, and truncates message text to the first line. It does not discuss error conditions or rate limits, but the core behavioral quirks are transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is one dense, front-loaded paragraph: purpose first, then selection algorithm, exclusions, truncation behavior, and how to set 'since'. No sentence is filler; the parenthesis about get_thread_replies earns its place by routing to a sibling.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a moderately complex polling tool with no output schema and no annotations, it covers inputs, selection logic, return limitations, and the polling usage model. It would be slightly stronger if it specified the exact fields returned (e.g., the thread identifier to pass to get_thread_replies), but an agent can invoke it correctly from the information given.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, giving a baseline of 3, and the description adds real value: it tells the caller to pass the previous polling time to 'since' and explains 'oldest' as the lower bound for traversing parent messages. This is practical guidance beyond the schema's field labels.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and scoped resource: a polling tool that returns only items with activity since 'since'. It clearly distinguishes itself from get_thread_replies by stating reply bodies are not included, and it names the extraction criteria (new posts or threads with new replies), so an agent can tell what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear usage context: it is for periodic polling and since should be the previous polling time. It also points to get_thread_replies with oldest as the alternative for reading reply bodies. However, it does not explicitly state when not to use this tool versus the other siblings like get_channel_history or resolve_user, though their purposes differ.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_channelsA

読み取り対象として設定されているチャンネルの一覧を返す。Slack へは問い合わせない。ここに載っていても Bot が招待されていなければ読めない。

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses that the tool does not query Slack (implying potential staleness or cached data) and that even listed channels may be unreadable if the bot isn't invited. These are meaningful behavioral traits beyond the basic purpose, adding transparency without annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences with no redundancy. The purpose is front-loaded in the first sentence, and the second adds a critical caveat. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter tool with no output schema and no annotations, the description covers the core purpose, data source (not live Slack), and a key access limitation. It doesn't specify the return fields or format, but that is acceptable given the absence of an output schema. The description is complete enough for an agent to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters and schema coverage is 100% (no properties). Per the baseline rule for 0 params, a score of 4 applies. The description adds no parameter information, but none is needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Returns a list of channels that are set as read targets.' It also differentiates itself by noting it does not query Slack, distinguishing it from sibling tools that fetch live data. The purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context: this tool retrieves a locally configured list of channels rather than querying Slack live. It doesn't explicitly name alternatives or when-not-to-use, but the 'does not query Slack' hint provides clear contextual guidance that this is for configuration-based reads, not live Slack queries.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

resolve_userA

ユーザー ID を表示名・実名に解決する。本文中の <@U…> を人名に直すのに使う。

ParametersJSON Schema
NameRequiredDescriptionDefault
userIdYesユーザー ID(U から始まる)

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It implies a read-only lookup but never explicitly states that there are no side effects, nor does it disclose failure behavior (e.g., unknown IDs) or the exact return value. For a simple lookup tool this is acceptable but not thorough.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two short sentences with no filler. The primary purpose is front-loaded, and the usage note is relevant and concise. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter tool with no output schema, the description covers purpose, usage, and parameter format adequately. The only gap is that it does not specify what the tool returns (e.g., a string, object, or whether both display name and real name are returned). This is minor for the tool's apparent simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already describes userId as 'U から始まる' (starting with U) at 100% coverage. The description adds no new parameter-level detail; it only gives contextual usage (mentions). Baseline of 3 is appropriate since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb (resolve) and a resource (user ID to display name/real name), and provides a concrete use case (converting <@U…> mentions). It clearly distinguishes itself from the sibling tools, which are about channels and threads, not user resolution.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit scenario for use ('used to convert <@U…> in text to person names'), which tells an agent when to apply it. It does not mention when not to use it or alternatives, but no sibling tool performs this role, so the guidance is adequate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updatesv0.3.0
    • First observedget_channel_history
    • First observedget_thread_replies
    • First observedlist_active_threads
    • First observedlist_channels
    • First observedresolve_user

TDQS

A4.2/5.0

Scored across 5 tools

Disambiguation5/5

get_channel_history and get_thread_replies are explicitly separated by thread inclusion, while list_active_threads is a polling summary tool that points to where to read next. list_channels and resolve_user operate on clearly different resources, so no two tools are likely to be confused.

Naming Consistency5/5

All tool names follow a consistent snake_case verb_noun pattern: get for direct reads, list for enumeration, and resolve for user lookup. The naming is uniform and predictable across the entire set.

Tool Count5/5

Five tools is a compact and appropriate surface for a read-only Slack integration. Each tool provides a distinct read operation with no unnecessary duplication or bloat.

Completeness4/5

The core read workflows are covered: channel enumeration, message history, thread replies, active-thread polling, and user ID resolution. Minor gaps such as listing all users or fetching a single message by ID prevent a perfect score but do not block typical use.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that provides read-only access to Slack data including messages, channels, and users through secure API endpoints.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A read-only MCP server that enables AI assistants to access Slack workspace data, including channels, messages, threads, and user information.
    30,329 npm
    3
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Read-only MCP server for Slack with OAuth 2.1 authentication, enabling message retrieval, thread replies, search, user and channel listing.
    9
    Apache 2.0
  • A
    license
    A
    quality
    D
    maintenance
    A self-hosted, read-only Slack MCP server that runs locally and provides read-only access to Slack channels, messages, and users via the Slack Web API, with no third-party intermediary.
    7
    MIT