Slack MCP
Slack MCP サーバー
Slackワークスペース用のモデルコンテキストプロトコル(MCP)サーバー。この統合は、StdioとSSEの両方のトランスポートとプロキシ設定をサポートし、ワークスペース管理者による権限やボットの作成・承認は必要ありません😏。
機能デモ
ツール
conversations_history
チャネルIDでチャネルからメッセージを取得する
必要な入力:
channel_id(文字列): チャネルの ID (形式は Cxxxxxxxxxx)。cursor(文字列): ページ区切りのカーソル。レスポンスの最後の行と列の値を、前回のリクエストから返された next_cursor フィールドとして使用します。limit(数値、デフォルト: 28): 取得するメッセージの制限。
戻り値: タイムスタンプ、ユーザーID、テキストコンテンツを含むメッセージのリスト
channels_list
チャンネルのリストを取得する
必要な入力:
channel_types(配列): 可能なチャネルタイプ。許可される値: 'mpim'、'im'、'public_channel'、'private_channel'。sort(文字列): 並べ替えの種類。使用できる値: 'popularity' - 各チャンネルのメンバー/参加者数で並べ替えます。
戻り値: チャンネルのリスト
Related MCP server: Slack MCP Server
セットアップガイド
1. 認証の設定
ブラウザで Slack を開いてログインします。
SLACK_MCP_XOXC_TOKEN検索
ブラウザの開発者コンソールを開きます。
Firefoxでは、メニューバーの
Tools -> Browser Tools -> Web Developer toolsChromeでは、URLバーの右側にある「3つの点」ボタンをクリックし、
More Tools -> Developer Toolsを選択します。コンソールタブに切り替えます。
「貼り付けを許可する」と入力して、Enter キーを押します。
次のスニペットを貼り付けて、ENTER キーを押して実行します:
JSON.parse(localStorage.localConfig_v2).teams[document.location.pathname.match(/^\/client\/([A-Z0-9]+)/)[1]].token
トークンの値は実行されたコマンドの直後に印刷されます ( xoxc-で始まります)。とりあえずどこかに保存してください。
SLACK_MCP_XOXD_TOKEN検索
「アプリケーション」タブに切り替えて、左側のナビゲーション ペインで「Cookie」を選択します。
dという名前のクッキーを見つけてください。そうです、文字dだけです。この Cookie の値をダブルクリックします。
Ctrl+C または Cmd+C を押して、その値をクリップボードにコピーします。
後で使用するために保存します。
2. インストール
次のいずれかのインストール方法を選択します。
3. 設定と使用方法
コマンドライン引数と環境変数を使用して MCP サーバーを構成できます。
npxの使用
npm がインストールされている場合は、これが Claude Desktop でslack-mcp-serverを使い始める最も早い方法です。
claude_desktop_config.jsonを開き、mcp サーバーをmcpServersのリストに追加します。
{
"mcpServers": {
"slack": {
"command": "npx",
"args": [
"-y",
"slack-mcp-server@latest",
"--transport",
"stdio"
],
"env": {
"SLACK_MCP_XOXC_TOKEN": "xoxc-...",
"SLACK_MCP_XOXD_TOKEN": "xoxd-..."
}
}
}
}{
"mcpServers": {
"slack": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SLACK_MCP_XOXC_TOKEN=$SLACK_MCP_XOXC_TOKEN",
"-e",
"SLACK_MCP_XOXD_TOKEN=$SLACK_MCP_XOXD_TOKEN",
"ghcr.io/korotovsky/slack-mcp-server",
"mcp-server",
"--transport",
"stdio"
],
"env": {
"SLACK_MCP_XOXC_TOKEN": "xoxc-...",
"SLACK_MCP_XOXD_TOKEN": "xoxd-..."
}
}
}
}詳細については、 Docker を参照してください。
sseトランスポートで npx を使用する:
sseモードで実行したい場合は、Claude Desktop のmcp-remoteラッパーを使用し、 ngrokやdocker-composeなどを使用して MCP サーバーをどこかにデプロイ/公開する必要があります。
{
"mcpServers": {
"slack": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://x.y.z.q:3001/sse",
"--header",
"Authorization: Bearer ${SLACK_MCP_SSE_API_KEY}"
],
"env": {
"SLACK_MCP_SSE_API_KEY": "my-$$e-$ecret"
}
}
}
}{
"mcpServers": {
"slack": {
"command": "C:\\Progra~1\\nodejs\\npx.cmd",
"args": [
"-y",
"mcp-remote",
"https://x.y.z.q:3001/sse",
"--header",
"Authorization: Bearer ${SLACK_MCP_SSE_API_KEY}"
],
"env": {
"SLACK_MCP_SSE_API_KEY": "my-$$e-$ecret"
}
}
}
}TLSとインターネットへの公開
SSE に HTTPS を設定する必要がある理由はいくつかあります。
mcp-remotehttps スキームのみを処理できます。一般的に、インターネットに公開されるすべてのサービスに TLS を使用することをお勧めします。
ngrokを使うこともできます:
ngrok http 3001次に、 mcp-remote引数にエンドポイントhttps://903d-xxx-xxxx-xxxx-10b4.ngrok-free.appを使用します。
Dockerの使用
すべての環境変数の詳細については、 「環境変数」を参照してください。
export SLACK_MCP_XOXC_TOKEN=xoxc-...
export SLACK_MCP_XOXD_TOKEN=xoxd-...
docker pull ghcr.io/korotovsky/slack-mcp-server:latest
docker run -i --rm \
-e SLACK_MCP_XOXC_TOKEN \
-e SLACK_MCP_XOXD_TOKEN \
slack-mcp-server --transport stdioまたは、docker-compose の方法:
wget -O docker-compose.yml https://github.com/korotovsky/slack-mcp-server/releases/latest/download/docker-compose.yml
wget -O .env https://github.com/korotovsky/slack-mcp-server/releases/latest/download/default.env.dist
nano .env # Edit .env file with your tokens from step 1 of the setup guide
docker-compose up -dコンソール引数
口論 | 必須 ? | 説明 |
| はい | MCP サーバーのトランスポートを選択します。可能な値は、 |
環境変数
変数 | 必須 ? | デフォルト | 説明 |
| はい |
| 認証データ トークン フィールド、POST データ フィールド セットからの |
| はい |
| クッキー |
| いいえ |
| MCP サーバーが listen するポート |
| いいえ |
| MCP サーバーが listen するホスト |
| いいえ |
|
|
| いいえ |
| MCP サーバーが使用するプロキシ URL |
| いいえ |
| 信頼ストアの CA 証明書へのパス |
| いいえ |
| 安全でないリクエストはすべて信頼する(非推奨) |
デバッグツール
# Run the inspector with stdio transport
npx @modelcontextprotocol/inspector go run mcp/mcp-server.go --transport stdio
# View logs
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log安全
APIトークンを共有しないでください
.env ファイルを安全かつプライベートに保つ
ライセンス
MITライセンス( LICENSEファイル参照)です。これはSlackの公式製品ではありません。
Available Tools
2 toolschannels_listC
Get list of channels
Inputs: channel_types (required), sort.
conversations_historyB
Get messages from the channel by channel_id, the last row/column in the response is used as 'cursor' parameter for pagination if not empty
Inputs: channel_id (required), cursor, limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: channels_list retrieves a list of channels, while conversations_history fetches messages from a specific channel. There is no overlap in functionality, making it easy for an agent to select the correct tool based on the task.
Both tools follow a consistent snake_case naming convention, but the patterns differ slightly: channels_list uses a noun_verb format, while conversations_history uses a noun_noun format. This minor deviation prevents a perfect score, but the naming is still readable and mostly consistent.
With only 2 tools, this server feels too thin for a Slack integration, as it lacks essential operations like sending messages, managing users, or updating channel settings. The scope is severely limited, making it difficult for agents to perform comprehensive Slack-related tasks.
The tool surface is significantly incomplete for a Slack domain. While it covers listing channels and retrieving message history, it misses critical operations such as posting messages, creating channels, or handling reactions, which are core to Slack workflows and will likely cause agent failures.
Maintenance
Related MCP Connectors
Hosted Slack MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
The official MCP Server for the Mux API
One MCP server for all your work accounts: Slack, Teams, Google Chat, Jira, ClickUp, digest, tasks.
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for posting messages to Slack channels via webhooks or bot API. Supports configurable usernames, emojis, and both webhook and bot token authentication modes.11 npmMIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server for Slack workspace integration. This server allows AI assistants to interact directly with your Slack workspace, providing tools to manage channels, send messages, list users, and upload files.1MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server that connects to Slack via Socket Mode (WebSocket) and surfaces real-time message notifications through MCP tools. No public URL or ngrok needed.-
- AlicenseNot gradedqualityCmaintenanceA 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.MIT