Slack MCP Server Give Claude the same Slack access you have. DMs, threads, history—no admin approval. I built this because I was working with someone to help me manage a complex workload, and we kept hitting walls. They needed context from my messages—"what did X say about Y?"—but Slack's API blocks access to DMs without admin approval. Screenshotting messages is not a workflow. This server bridge
Add this skill
npx mdskills install jtalk22/slack-mcp-serverFeature-rich Slack integration with 9 well-documented tools covering messages, threads, search, reactions, and user management
1<p align="center">2 <a href="https://jtalk22.github.io/slack-mcp-server/public/demo.html"><img src="docs/assets/icon-512.png" alt="Slack MCP Server" width="80"></a>3</p>45<h1 align="center">Slack MCP Server</h1>67<p align="center">8 <em>Give Claude the same Slack access you have.<br>9 DMs, threads, history—no admin approval.</em>10</p>1112<p align="center">13 <a href="https://jtalk22.github.io/slack-mcp-server/public/demo-video.html">14 <img src="docs/images/demo-readme.gif" alt="Slack MCP tools in action" width="640">15 </a>16</p>1718<p align="center">19 <a href="https://www.npmjs.com/package/@jtalk22/slack-mcp"><img src="https://img.shields.io/badge/npm-Install-blue?style=for-the-badge&logo=npm&logoColor=white" alt="npm"></a>20 <a href="https://github.com/jtalk22/slack-mcp-server/pkgs/container/slack-mcp-server"><img src="https://img.shields.io/badge/Docker-Pull-2496ED?style=for-the-badge&logo=docker&logoColor=white" alt="Docker"></a>21</p>2223<p align="center">24 <a href="https://jtalk22.github.io/slack-mcp-server/public/demo.html"><img src="https://img.shields.io/badge/LIVE%20DEMO-Try%20It%20Now-00C853?style=for-the-badge&logo=slack&logoColor=white" alt="Live Demo"></a>25 <a href="https://jtalk22.github.io/slack-mcp-server/public/demo-claude.html"><img src="https://img.shields.io/badge/CLAUDE%20DEMO-See%20MCP%20Tools-da7756?style=for-the-badge" alt="Claude Demo"></a>26</p>2728<br>2930<p align="center">31 <a href="https://www.npmjs.com/package/@jtalk22/slack-mcp"><img src="https://img.shields.io/npm/dm/@jtalk22/slack-mcp?label=downloads&color=CB3837" alt="npm downloads"></a>32 <a href="https://github.com/jtalk22/slack-mcp-server/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/jtalk22/slack-mcp-server/ci.yml?label=build" alt="Build Status"></a>33 <a href="https://smithery.ai/server/jtalk22/slack-mcp-server"><img src="https://img.shields.io/badge/Smithery-Registry-4A154B" alt="Smithery"></a>34 <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>35 <a href="https://github.com/sponsors/jtalk22"><img src="https://img.shields.io/badge/Sponsor-♡-ea4aaa?logo=github" alt="Sponsor"></a>36</p>3738---3940### Why This Exists4142I built this because I was working with someone to help me manage a complex workload, and we kept hitting walls. They needed context from my messages—"what did X say about Y?"—but Slack's API blocks access to DMs without admin approval.4344Screenshotting messages is not a workflow.4546This server bridges the gap. It creates a secure, local bridge between Claude and your Slack web session. It gives your AI the same access **you** already have in the browser—search history, summarize threads, find that thing someone sent you three weeks ago—without fighting the platform.47484950---5152## Architecture: Local Session Mirroring5354Instead of authenticating as a bot, this server leverages your existing Chrome session credentials (macOS) or manual token injection (Linux/Windows). It mirrors your user access exactly—if you can see it in Slack, Claude can see it too.55565758### Why Not OAuth?59606162**Trade-off:** Session tokens expire every 1-2 weeks. Auto-refresh (macOS) or manual update keeps things running.6364---6566## Features6768### Core Capabilities69- **Read Any Message** - DMs, private channels, public channels70- **Full Export** - Conversations with threads and resolved usernames71- **Search** - Query across your entire workspace72- **Send Messages** - DMs or channels, with thread support73- **User Directory** - List and search 500+ users with pagination7475### Stability76- **Auto Token Refresh** - Extracts fresh tokens from Chrome automatically *(macOS only)*77- **Atomic Writes** - File operations use temp-file-then-rename to prevent corruption78- **Zombie Protection** - Background timers use `unref()` for clean process exit79- **Race Condition Safety** - Mutex locks prevent concurrent token extraction80- **Rate Limit Handling** - Exponential backoff with jitter8182### Tools83| Tool | Description |84|------|-------------|85| `slack_health_check` | Verify token validity and workspace info |86| `slack_token_status` | **New:** Detailed token age, health, and cache stats |87| `slack_refresh_tokens` | Auto-extract fresh tokens from Chrome |88| `slack_list_conversations` | List DMs/channels (with lazy discovery cache) |89| `slack_conversations_history` | Get messages from a channel or DM |90| `slack_get_full_conversation` | Export full history with threads |91| `slack_search_messages` | Search across workspace |92| `slack_send_message` | Send a message to any conversation |93| `slack_get_thread` | Get thread replies |94| `slack_users_info` | Get user details |95| `slack_list_users` | List workspace users (paginated, 500+ supported) |9697---9899## Quick Start100101**Runtime:** Node.js 20+102103### Option A: npm (Recommended)104105```bash106npm install -g @jtalk22/slack-mcp107```108109### Option B: Clone Repository110111```bash112git clone https://github.com/jtalk22/slack-mcp-server.git113cd slack-mcp-server114npm install115```116117### Option C: Docker118119```bash120docker pull ghcr.io/jtalk22/slack-mcp-server:latest121```122123---124125## Configuration126127### Step 1: Get Your Tokens128129#### Setup Wizard (Recommended)130131The interactive setup wizard handles token extraction and validation automatically:132133```bash134npx @jtalk22/slack-mcp --setup135```136137- **macOS**: Auto-extracts tokens from Chrome (have Slack open in a tab)138- **Linux/Windows**: Guides you through manual extraction step-by-step139- Validates tokens against Slack API before saving140- Stores tokens securely at `~/.slack-mcp-tokens.json`141142#### Check Token Status143144```bash145npx @jtalk22/slack-mcp --status146```147148#### Alternative: Manual Token Scripts149150```bash151# macOS auto-extraction152npm run tokens:auto153154# Manual entry (all platforms)155npm run tokens:refresh156157# Check health158npm run tokens:status159```160161### Step 2: Configure Claude162163#### Claude Desktop (macOS)164165Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:166167```json168{169 "mcpServers": {170 "slack": {171 "command": "npx",172 "args": ["-y", "@jtalk22/slack-mcp"]173 }174 }175}176```177178#### Claude Desktop (Windows)179180Edit `%APPDATA%\Claude\claude_desktop_config.json`:181182```json183{184 "mcpServers": {185 "slack": {186 "command": "npx",187 "args": ["-y", "@jtalk22/slack-mcp"],188 "env": {189 "SLACK_TOKEN": "xoxc-your-token",190 "SLACK_COOKIE": "xoxd-your-cookie"191 }192 }193 }194}195```196197> **Note:** Windows/Linux users must provide tokens via `env` since auto-refresh is macOS-only.198199#### Claude Code (CLI)200201Add to `~/.claude.json`:202203```json204{205 "mcpServers": {206 "slack": {207 "type": "stdio",208 "command": "npx",209 "args": ["-y", "@jtalk22/slack-mcp"]210 }211 }212}213```214215Claude Code reads tokens from `~/.slack-mcp-tokens.json` automatically.216217#### Docker Configuration218219```json220{221 "mcpServers": {222 "slack": {223 "command": "docker",224 "args": ["run", "-i", "--rm",225 "-v", "~/.slack-mcp-tokens.json:/root/.slack-mcp-tokens.json",226 "ghcr.io/jtalk22/slack-mcp-server"]227 }228 }229}230```231232### Step 3: Restart Claude233234Fully quit and reopen Claude. The Slack tools will appear.235236---237238## Architecture239240### Token Persistence (4 Layers)241242```243Priority 1: Environment Variables (SLACK_TOKEN, SLACK_COOKIE)244 ↓ fallback245Priority 2: Token File (~/.slack-mcp-tokens.json)246 ↓ fallback247Priority 3: macOS Keychain (encrypted)248 ↓ fallback249Priority 4: Chrome Auto-Extraction (macOS only)250```251252### Stability Features253254#### Atomic Writes255All file operations (tokens, DM cache) use atomic writes:256```257Write to temp file → chmod 600 → rename to target258```259This prevents JSON corruption if the process is killed mid-write.260261#### Zombie Process Protection262Background refresh timers use `unref()`:263```javascript264const timer = setInterval(refreshTokens, 4 * 60 * 60 * 1000);265timer.unref(); // Process can exit even if timer is pending266```267When Claude closes the MCP connection, the server exits cleanly.268269#### Race Condition Prevention270A mutex lock prevents concurrent Chrome extractions:271```javascript272if (refreshInProgress) return null; // Skip if already refreshing273refreshInProgress = true;274try { return extractFromChromeInternal(); }275finally { refreshInProgress = false; }276```277278---279280## Web UI (for claude.ai — no MCP support)281282If you're using claude.ai in a browser (which doesn't support MCP), you can use the REST server instead:283284```bash285npm run web286# Or: npx @jtalk22/slack-mcp web287```288289**Magic Link:** The console prints a one-click URL with the API key embedded:290291```292════════════════════════════════════════════════════════════293 Slack Web API Server v1.2.1294════════════════════════════════════════════════════════════295296 Dashboard: http://localhost:3000/?key=smcp_xxxxxxxxxxxx297```298299Just click the link - no copy-paste needed. The key is saved to your browser and stripped from the URL for security.300301<details>302<summary><strong>Screenshots</strong></summary>303304| DMs View | Channels View |305|----------|---------------|306|  |  |307308</details>309310---311312## Troubleshooting313314### Tokens Expired315```bash316# macOS: Auto-refresh from Chrome317slack_refresh_tokens # In Claude318# Or: npm run tokens:auto319320# Linux/Windows: Manual update321# Edit ~/.slack-mcp-tokens.json with fresh values322```323324### DMs Not Showing325Use `discover_dms: true` to force discovery:326```327slack_list_conversations with discover_dms=true328```329This caches DM channel IDs for 24 hours.330331### Chrome Extraction Fails332- Chrome must be **running** (not minimized to Dock)333- Slack tab must be open at `app.slack.com`334- You must be logged in335336### Claude Desktop Not Seeing Tools3371. Verify JSON syntax in config file3382. Check logs: `~/Library/Logs/Claude/mcp*.log`3393. Fully restart Claude (Cmd+Q, then reopen)340341---342343## Project Structure344345```346slack-mcp-server/347├── src/348│ ├── server.js # MCP server (stdio transport)349│ └── web-server.js # REST API + Web UI350├── lib/351│ ├── token-store.js # 4-layer persistence + atomic writes352│ ├── slack-client.js # API client, LRU cache, retry logic353│ ├── tools.js # MCP tool definitions354│ └── handlers.js # Tool implementations355├── public/356│ ├── index.html # Web UI357│ └── demo.html # Interactive demo358└── scripts/359 └── token-cli.js # Token management CLI360```361362---363364## Security365366- Token files stored with `chmod 600` (owner-only)367- macOS Keychain provides encrypted backup368- Web server binds to localhost only369- Never commit tokens to version control370- API keys are cryptographically random (`crypto.randomBytes`)371372---373374## Platform Support375376| Feature | macOS | Linux | Windows |377|---------|-------|-------|---------|378| MCP Server | Yes | Yes | Yes |379| Token File | Yes | Yes | Yes |380| Auto-Refresh from Chrome | Yes | No | No |381| Keychain Storage | Yes | No | No |382| Web UI | Yes | Yes | Yes |383384---385386## Contributing387388PRs welcome. Run `node --check` on modified files before submitting.389390If you find this project useful, consider [sponsoring](https://github.com/sponsors/jtalk22) or starring the repo.391392---393394## License395396MIT - See [LICENSE](LICENSE)397398---399400## Disclaimer401402This project uses unofficial Slack APIs. Use at your own risk. Not affiliated with or endorsed by Slack Technologies.403
Full transparency — inspect the skill content before installing.