Slack MCP
Hubungkan Slack ke AI agent pakai akun Slack sendiri — baca, kirim, dan cari pesan langsung dari Claude atau agent lain yang support MCP.
Overview
Slack MCP memungkinkan AI agent membaca, mengirim, dan mencari pesan Slack atas nama kamu — menggunakan akun Slack kamu sendiri (user token xoxp-), bukan bot. Dengan ini, kamu bisa minta Claude meringkas channel, kirim pesan ke tim, atau reply thread langsung dari chat Claude tanpa buka Slack.
Kompatibel dengan semua AI agent yang mendukung Model Context Protocol (MCP), termasuk Claude Desktop, Cursor, dan Windsurf.
Capabilities
| Capability | Description |
|---|---|
| Read Messages | Baca pesan dari channel, DM, atau thread tertentu |
| Send Message | Kirim pesan ke channel atau DM atas nama kamu |
| Reply to Thread | Reply ke thread yang ada di Slack |
| Search Messages | Cari pesan berdasarkan keyword di seluruh workspace |
| List Channels | Lihat daftar channel yang kamu ikuti |
| Get User Info | Ambil profil user Slack berdasarkan username atau ID |
Install Steps
1. Yang Dibutuhkan
- Claude Desktop (akun Pro/Max/Team/Enterprise) — download
- Node.js LTS — download
- Akun Slack dengan akses ke workspace yang mau dihubungkan
2. Authorize ke Slack
Buka link berikut di browser, login Slack → pilih workspace → klik Allow:
👉 Authorize Slack untuk Claude MCP
3. Copy config snippet
Setelah berhasil authorize, kamu akan diarahkan ke halaman yang menampilkan config snippet. Klik Copy Token untuk copy seluruh snippet:
{ "mcpServers": { "slack": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-slack"], "env": { "SLACK_BOT_TOKEN": "xoxp-598...", "SLACK_TEAM_ID": "THLPKPYKD..." } } }}Peringatan: Token ini memberi akses penuh ke akun Slack kamu. Jangan share, jangan commit ke Git, jangan paste ke chat publik.
4. Buka file konfigurasi Claude Desktop
Claude Desktop → Settings → Developers → Edit Config
5. Paste konfigurasi
Kalau file masih kosong, langsung paste hasil copy. Kalau sudah ada server lain, gabungkan ke dalam mcpServers yang sama:
{ "mcpServers": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/budi/Documents"] }, "slack": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-slack"], "env": { "SLACK_BOT_TOKEN": "xoxp-598...", "SLACK_TEAM_ID": "THLPKPYKD..." } } }}Windows: ganti
"command": "npx"jadi"command": "npx.cmd".
6. Save & Restart
- Save file (
Cmd+S/Ctrl+S) - Quit Claude Desktop sepenuhnya:
- Mac:
Cmd+Q - Windows: klik kanan ikon di system tray → Quit
- Mac:
- Buka lagi Claude Desktop
7. Verifikasi
- Buka tab Cowork
- Klik + di chat → Connectors
slackmuncul di daftar ✅- Test prompt: “Cek pesan terbaru di channel #general”
Contoh Prompt
Ringkas semua pesan di #engineering hari iniKirim pesan ke #team-marketing: 'meeting weekly jam 3 di Zoom'Cari pesan yang mention saya minggu ini, ringkas yang pentingList semua channel yang aktif minggu iniReply ke pesan terakhir di DM dengan Andi: 'siap, saya cek dulu'Troubleshooting
| Masalah | Solusi |
|---|---|
| OAuth link error / redirect gagal | Pastikan login Slack pakai workspace yang benar, bukan personal |
| Halaman config tidak muncul setelah authorize | Cek pop-up blocker, coba browser lain (Chrome/Firefox) |
slack tidak muncul di Connectors | Validasi JSON di jsonlint.com |
| JSON valid tapi tetap tidak muncul | Quit Claude Desktop sepenuhnya (bukan close window), buka lagi |
Mac: command not found | Cek which npx di Terminal, pakai full path: "command": "/usr/local/bin/npx" |
Windows: command not found | Ganti "npx" jadi "npx.cmd" |
| Error 401 / token invalid | Token expired atau di-revoke. Ulangi step 2 untuk authorize ulang |
| Bot tidak bisa kirim ke channel tertentu | User token (xoxp-) butuh kamu sudah join channel tersebut di Slack |
| Tetap gagal | Cek log: Mac ~/Library/Logs/Claude/mcp-server-slack.log, Windows %APPDATA%\Claude\logs\mcp-server-slack.log |
Update & Revoke Token
Re-authorize (token expired atau ganti workspace):
- Ulangi step 2 di tutorial ini
- Replace
SLACK_BOT_TOKENdanSLACK_TEAM_IDdi config - Restart Claude Desktop
Revoke (token bocor atau tidak dipakai lagi):
- Buka Slack Account Settings → Connected Apps
- Cari “Claude MCP” → klik Revoke
- Hapus bagian
slackdariclaude_desktop_config.json
Catatan Penting
- Token bertipe user token (
xoxp-) — Claude bertindak atas nama kamu di Slack, bukan sebagai bot. - Scope yang di-grant termasuk read/write canvas, kirim pesan, baca DM, search — review semua aksi Claude sebelum approve.
- Token disimpan plain text di
claude_desktop_config.json. Jangan share file ini. - Stdio MCP tidak jalan di mobile/Dispatch — hanya di Claude Desktop.
Lokasi File Config
| Platform | Path |
|---|---|
| Mac | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
| Windows MSIX/Store | %LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude_desktop_config.json |