@jtalk22/slack-mcp 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +265 -194
- package/lib/handlers.js +182 -30
- package/lib/slack-client.js +168 -21
- package/lib/token-store.js +84 -10
- package/lib/tools.js +14 -2
- package/package.json +1 -1
- package/scripts/verify-v106.js +159 -0
- package/src/server.js +35 -2
- package/src/web-server.js +43 -4
package/README.md
CHANGED
|
@@ -1,88 +1,188 @@
|
|
|
1
1
|
# Slack MCP Server
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@jtalk22/slack-mcp)
|
|
4
|
+
[](https://github.com/jtalk22/slack-mcp-server/pkgs/container/slack-mcp-server)
|
|
4
5
|
[](https://opensource.org/licenses/MIT)
|
|
5
6
|
[](https://nodejs.org/)
|
|
6
7
|
[](https://github.com/jtalk22/slack-mcp-server/pulls)
|
|
7
|
-
[](https://github.com/sponsors/jtalk22)
|
|
8
8
|
|
|
9
|
-
A [Model Context Protocol](https://modelcontextprotocol.io/) server that gives Claude
|
|
9
|
+
A [Model Context Protocol](https://modelcontextprotocol.io/) server that gives Claude **unrestricted access** to your Slack workspace - including DMs, private channels, and full message history. No OAuth. No app approval. No per-conversation authorization.
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
12
|
<img src="docs/images/demo-main.png" alt="Slack MCP Server Web UI" width="800">
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
|
-
> **[Try the Interactive Demo](https://jtalk22.github.io/slack-mcp-server/public/demo.html)** - See the Web UI in action
|
|
15
|
+
> **[Try the Interactive Demo](https://jtalk22.github.io/slack-mcp-server/public/demo.html)** - See the Web UI in action
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
---
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
## How It Works: The Cookie Heist
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
This server bypasses Slack's OAuth entirely by extracting your browser session tokens. You already have access to everything in Slack's web interface - we just give that same access to Claude.
|
|
22
|
+
|
|
23
|
+
```mermaid
|
|
24
|
+
sequenceDiagram
|
|
25
|
+
participant Chrome as Chrome Browser
|
|
26
|
+
participant Script as AppleScript
|
|
27
|
+
participant Store as Token Store
|
|
28
|
+
participant MCP as MCP Server
|
|
29
|
+
participant Slack as Slack API
|
|
30
|
+
|
|
31
|
+
Note over Chrome: You're logged into Slack
|
|
32
|
+
Script->>Chrome: Execute JavaScript in Slack tab
|
|
33
|
+
Chrome-->>Script: xoxc- token + xoxd- cookie
|
|
34
|
+
Script->>Store: Save to ~/.slack-mcp-tokens.json
|
|
35
|
+
Store->>Store: Encrypt in macOS Keychain
|
|
36
|
+
|
|
37
|
+
Note over MCP: Claude asks for DMs
|
|
38
|
+
MCP->>Store: Load credentials
|
|
39
|
+
Store-->>MCP: Token + Cookie
|
|
40
|
+
MCP->>Slack: GET conversations.history
|
|
41
|
+
Slack-->>MCP: Full message history
|
|
42
|
+
MCP-->>MCP: Return to Claude
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Why Not OAuth?
|
|
46
|
+
|
|
47
|
+
```mermaid
|
|
48
|
+
flowchart LR
|
|
49
|
+
subgraph Traditional["Traditional Slack App (OAuth)"]
|
|
50
|
+
A[Create App] --> B[Request Scopes]
|
|
51
|
+
B --> C[Admin Approval]
|
|
52
|
+
C --> D[User Authorization]
|
|
53
|
+
D --> E[Limited Access]
|
|
54
|
+
E --> F["No DMs without<br/>per-conversation consent"]
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
subgraph ThisServer["This Server (Browser Tokens)"]
|
|
58
|
+
G[Open Slack in Chrome] --> H[Extract Session]
|
|
59
|
+
H --> I[Full Access]
|
|
60
|
+
I --> J["All DMs, Channels,<br/>Search, Everything"]
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
style Traditional fill:#ffcccc
|
|
64
|
+
style ThisServer fill:#ccffcc
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**The trade-off:** Tokens expire every 1-2 weeks, but auto-refresh keeps things running seamlessly.
|
|
68
|
+
|
|
69
|
+
---
|
|
25
70
|
|
|
26
71
|
## Features
|
|
27
72
|
|
|
28
|
-
|
|
29
|
-
- **
|
|
30
|
-
- **
|
|
31
|
-
- **
|
|
32
|
-
- **
|
|
33
|
-
- **
|
|
34
|
-
|
|
73
|
+
### Core Capabilities
|
|
74
|
+
- **Read Any Message** - DMs, private channels, public channels
|
|
75
|
+
- **Full Export** - Conversations with threads and resolved usernames
|
|
76
|
+
- **Search** - Query across your entire workspace
|
|
77
|
+
- **Send Messages** - DMs or channels, with thread support
|
|
78
|
+
- **User Directory** - List and search 500+ users with pagination
|
|
79
|
+
|
|
80
|
+
### Stability (v1.0.6+)
|
|
81
|
+
- **Auto Token Refresh** - Extracts fresh tokens from Chrome automatically *(macOS only)*
|
|
82
|
+
- **Atomic Writes** - File operations use temp-file-then-rename to prevent corruption
|
|
83
|
+
- **Zombie Protection** - Background timers use `unref()` for clean process exit
|
|
84
|
+
- **Race Condition Safety** - Mutex locks prevent concurrent token extraction
|
|
85
|
+
- **Rate Limit Handling** - Exponential backoff with jitter
|
|
86
|
+
|
|
87
|
+
### Tools
|
|
88
|
+
| Tool | Description |
|
|
89
|
+
|------|-------------|
|
|
90
|
+
| `slack_health_check` | Verify token validity and workspace info |
|
|
91
|
+
| `slack_token_status` | **New:** Detailed token age, health, and cache stats |
|
|
92
|
+
| `slack_refresh_tokens` | Auto-extract fresh tokens from Chrome |
|
|
93
|
+
| `slack_list_conversations` | List DMs/channels (with lazy discovery cache) |
|
|
94
|
+
| `slack_conversations_history` | Get messages from a channel or DM |
|
|
95
|
+
| `slack_get_full_conversation` | Export full history with threads |
|
|
96
|
+
| `slack_search_messages` | Search across workspace |
|
|
97
|
+
| `slack_send_message` | Send a message to any conversation |
|
|
98
|
+
| `slack_get_thread` | Get thread replies |
|
|
99
|
+
| `slack_users_info` | Get user details |
|
|
100
|
+
| `slack_list_users` | List workspace users (paginated, 500+ supported) |
|
|
101
|
+
|
|
102
|
+
---
|
|
35
103
|
|
|
36
104
|
## Quick Start
|
|
37
105
|
|
|
38
|
-
###
|
|
106
|
+
### Option A: npm (Recommended)
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
npm install -g @jtalk22/slack-mcp
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Option B: Clone Repository
|
|
39
113
|
|
|
40
114
|
```bash
|
|
41
|
-
# Clone the repository
|
|
42
115
|
git clone https://github.com/jtalk22/slack-mcp-server.git
|
|
43
116
|
cd slack-mcp-server
|
|
44
|
-
|
|
45
|
-
# Install dependencies
|
|
46
117
|
npm install
|
|
47
118
|
```
|
|
48
119
|
|
|
120
|
+
### Option C: Docker
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
docker pull ghcr.io/jtalk22/slack-mcp-server:latest
|
|
49
124
|
```
|
|
50
125
|
|
|
51
|
-
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Configuration
|
|
52
129
|
|
|
53
|
-
|
|
130
|
+
### Step 1: Get Your Tokens
|
|
54
131
|
|
|
55
|
-
|
|
132
|
+
#### macOS (Automatic)
|
|
56
133
|
```bash
|
|
57
|
-
#
|
|
58
|
-
|
|
134
|
+
# Have Chrome open with Slack (app.slack.com) logged in
|
|
135
|
+
npx @jtalk22/slack-mcp tokens:auto
|
|
136
|
+
# Or if cloned: npm run tokens:auto
|
|
59
137
|
```
|
|
60
138
|
|
|
61
|
-
|
|
139
|
+
#### Linux/Windows (Manual)
|
|
62
140
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
141
|
+
Auto-refresh requires macOS + Chrome. On other platforms, extract tokens manually:
|
|
142
|
+
|
|
143
|
+
1. Open https://app.slack.com in your browser
|
|
144
|
+
2. Press F12 → Console → Run:
|
|
66
145
|
```javascript
|
|
146
|
+
// Get token
|
|
67
147
|
JSON.parse(localStorage.localConfig_v2).teams[Object.keys(JSON.parse(localStorage.localConfig_v2).teams)[0]].token
|
|
68
148
|
```
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
149
|
+
3. Press F12 → Application → Cookies → Copy the `d` cookie value (starts with `xoxd-`)
|
|
150
|
+
4. Create `~/.slack-mcp-tokens.json`:
|
|
151
|
+
```json
|
|
152
|
+
{
|
|
153
|
+
"SLACK_TOKEN": "xoxc-your-token-here",
|
|
154
|
+
"SLACK_COOKIE": "xoxd-your-cookie-here",
|
|
155
|
+
"updated_at": "2024-01-01T00:00:00.000Z"
|
|
156
|
+
}
|
|
72
157
|
```
|
|
73
158
|
|
|
74
|
-
###
|
|
159
|
+
### Step 2: Configure Claude
|
|
75
160
|
|
|
76
|
-
####
|
|
161
|
+
#### Claude Desktop (macOS)
|
|
77
162
|
|
|
78
|
-
Edit `~/Library/Application Support/Claude/claude_desktop_config.json
|
|
163
|
+
Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
79
164
|
|
|
80
165
|
```json
|
|
81
166
|
{
|
|
82
167
|
"mcpServers": {
|
|
83
168
|
"slack": {
|
|
84
|
-
"command": "
|
|
85
|
-
"args": ["/
|
|
169
|
+
"command": "npx",
|
|
170
|
+
"args": ["-y", "@jtalk22/slack-mcp"]
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
#### Claude Desktop (Windows)
|
|
177
|
+
|
|
178
|
+
Edit `%APPDATA%\Claude\claude_desktop_config.json`:
|
|
179
|
+
|
|
180
|
+
```json
|
|
181
|
+
{
|
|
182
|
+
"mcpServers": {
|
|
183
|
+
"slack": {
|
|
184
|
+
"command": "npx",
|
|
185
|
+
"args": ["-y", "@jtalk22/slack-mcp"],
|
|
86
186
|
"env": {
|
|
87
187
|
"SLACK_TOKEN": "xoxc-your-token",
|
|
88
188
|
"SLACK_COOKIE": "xoxd-your-cookie"
|
|
@@ -92,7 +192,9 @@ Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) o
|
|
|
92
192
|
}
|
|
93
193
|
```
|
|
94
194
|
|
|
95
|
-
|
|
195
|
+
> **Note:** Windows/Linux users must provide tokens via `env` since auto-refresh is macOS-only.
|
|
196
|
+
|
|
197
|
+
#### Claude Code (CLI)
|
|
96
198
|
|
|
97
199
|
Add to `~/.claude.json`:
|
|
98
200
|
|
|
@@ -101,8 +203,8 @@ Add to `~/.claude.json`:
|
|
|
101
203
|
"mcpServers": {
|
|
102
204
|
"slack": {
|
|
103
205
|
"type": "stdio",
|
|
104
|
-
"command": "
|
|
105
|
-
"args": ["/
|
|
206
|
+
"command": "npx",
|
|
207
|
+
"args": ["-y", "@jtalk22/slack-mcp"]
|
|
106
208
|
}
|
|
107
209
|
}
|
|
108
210
|
}
|
|
@@ -110,221 +212,190 @@ Add to `~/.claude.json`:
|
|
|
110
212
|
|
|
111
213
|
Claude Code reads tokens from `~/.slack-mcp-tokens.json` automatically.
|
|
112
214
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
The Slack tools will now be available.
|
|
116
|
-
|
|
117
|
-
## Available Tools
|
|
118
|
-
|
|
119
|
-
| Tool | Description |
|
|
120
|
-
|------|-------------|
|
|
121
|
-
| `slack_health_check` | Verify token validity and show workspace info |
|
|
122
|
-
| `slack_refresh_tokens` | Auto-extract fresh tokens from Chrome |
|
|
123
|
-
| `slack_list_conversations` | List DMs and channels with resolved names |
|
|
124
|
-
| `slack_conversations_history` | Get messages from a channel or DM |
|
|
125
|
-
| `slack_get_full_conversation` | Export full history with threads |
|
|
126
|
-
| `slack_search_messages` | Search across workspace |
|
|
127
|
-
| `slack_send_message` | Send a message |
|
|
128
|
-
| `slack_get_thread` | Get thread replies |
|
|
129
|
-
| `slack_users_info` | Get user details |
|
|
130
|
-
| `slack_list_users` | List workspace users |
|
|
131
|
-
|
|
132
|
-
## Web UI (for claude.ai)
|
|
133
|
-
|
|
134
|
-
Since claude.ai doesn't support MCP, you can use the web server:
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
npm run web
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
Open http://localhost:3000 in your browser. It auto-connects with the default API key (`slack-mcp-local`).
|
|
141
|
-
|
|
142
|
-
<details>
|
|
143
|
-
<summary><strong>View Web UI Screenshots</strong></summary>
|
|
144
|
-
|
|
145
|
-
| DMs View | Channels View |
|
|
146
|
-
|----------|---------------|
|
|
147
|
-
|  |  |
|
|
148
|
-
|
|
149
|
-
</details>
|
|
150
|
-
|
|
151
|
-
### Auto-Start on Login (macOS)
|
|
152
|
-
|
|
153
|
-
```bash
|
|
154
|
-
# Create LaunchAgent
|
|
155
|
-
cat > ~/Library/LaunchAgents/com.slack-mcp-server.plist << 'EOF'
|
|
156
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
157
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
158
|
-
<plist version="1.0">
|
|
159
|
-
<dict>
|
|
160
|
-
<key>Label</key>
|
|
161
|
-
<string>com.slack-mcp-server</string>
|
|
162
|
-
<key>ProgramArguments</key>
|
|
163
|
-
<array>
|
|
164
|
-
<string>/usr/local/bin/node</string>
|
|
165
|
-
<string>/path/to/slack-mcp-server/src/web-server.js</string>
|
|
166
|
-
</array>
|
|
167
|
-
<key>WorkingDirectory</key>
|
|
168
|
-
<string>/path/to/slack-mcp-server</string>
|
|
169
|
-
<key>RunAtLoad</key>
|
|
170
|
-
<true/>
|
|
171
|
-
<key>KeepAlive</key>
|
|
172
|
-
<true/>
|
|
173
|
-
</dict>
|
|
174
|
-
</plist>
|
|
175
|
-
EOF
|
|
176
|
-
|
|
177
|
-
launchctl load ~/Library/LaunchAgents/com.slack-mcp-server.plist
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
## Docker
|
|
181
|
-
|
|
182
|
-
Run the server in a container:
|
|
183
|
-
|
|
184
|
-
```bash
|
|
185
|
-
# Pull pre-built image
|
|
186
|
-
docker pull ghcr.io/jtalk22/slack-mcp-server:latest
|
|
187
|
-
|
|
188
|
-
# Or build locally
|
|
189
|
-
docker build -t slack-mcp-server .
|
|
190
|
-
|
|
191
|
-
# Run with environment variables
|
|
192
|
-
docker run -e SLACK_TOKEN=xoxc-your-token -e SLACK_COOKIE=xoxd-your-cookie ghcr.io/jtalk22/slack-mcp-server
|
|
193
|
-
|
|
194
|
-
# Or mount existing token file
|
|
195
|
-
docker run -v ~/.slack-mcp-tokens.json:/root/.slack-mcp-tokens.json ghcr.io/jtalk22/slack-mcp-server
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
For MCP configuration with Docker:
|
|
215
|
+
#### Docker Configuration
|
|
199
216
|
|
|
200
217
|
```json
|
|
201
218
|
{
|
|
202
219
|
"mcpServers": {
|
|
203
220
|
"slack": {
|
|
204
221
|
"command": "docker",
|
|
205
|
-
"args": ["run", "-i", "--rm",
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
"SLACK_COOKIE": "xoxd-your-cookie"
|
|
209
|
-
}
|
|
222
|
+
"args": ["run", "-i", "--rm",
|
|
223
|
+
"-v", "~/.slack-mcp-tokens.json:/root/.slack-mcp-tokens.json",
|
|
224
|
+
"ghcr.io/jtalk22/slack-mcp-server"]
|
|
210
225
|
}
|
|
211
226
|
}
|
|
212
227
|
}
|
|
213
228
|
```
|
|
214
229
|
|
|
215
|
-
|
|
230
|
+
### Step 3: Restart Claude
|
|
216
231
|
|
|
217
|
-
|
|
232
|
+
Fully quit and reopen Claude. The Slack tools will appear.
|
|
218
233
|
|
|
219
|
-
|
|
220
|
-
2. **Token file** - `~/.slack-mcp-tokens.json` (chmod 600)
|
|
221
|
-
3. **macOS Keychain** - Encrypted persistent storage
|
|
222
|
-
4. **Chrome auto-extraction** - Fallback when tokens expire
|
|
234
|
+
---
|
|
223
235
|
|
|
224
|
-
|
|
236
|
+
## Architecture
|
|
225
237
|
|
|
226
|
-
|
|
238
|
+
### Token Persistence (4 Layers)
|
|
227
239
|
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
|
|
240
|
+
```
|
|
241
|
+
Priority 1: Environment Variables (SLACK_TOKEN, SLACK_COOKIE)
|
|
242
|
+
↓ fallback
|
|
243
|
+
Priority 2: Token File (~/.slack-mcp-tokens.json)
|
|
244
|
+
↓ fallback
|
|
245
|
+
Priority 3: macOS Keychain (encrypted)
|
|
246
|
+
↓ fallback
|
|
247
|
+
Priority 4: Chrome Auto-Extraction (macOS only)
|
|
248
|
+
```
|
|
231
249
|
|
|
232
|
-
|
|
233
|
-
|
|
250
|
+
### Stability Features
|
|
251
|
+
|
|
252
|
+
#### Atomic Writes
|
|
253
|
+
All file operations (tokens, DM cache) use atomic writes:
|
|
254
|
+
```
|
|
255
|
+
Write to temp file → chmod 600 → rename to target
|
|
234
256
|
```
|
|
257
|
+
This prevents JSON corruption if the process is killed mid-write.
|
|
235
258
|
|
|
236
|
-
|
|
259
|
+
#### Zombie Process Protection
|
|
260
|
+
Background refresh timers use `unref()`:
|
|
261
|
+
```javascript
|
|
262
|
+
const timer = setInterval(refreshTokens, 4 * 60 * 60 * 1000);
|
|
263
|
+
timer.unref(); // Process can exit even if timer is pending
|
|
264
|
+
```
|
|
265
|
+
When Claude closes the MCP connection, the server exits cleanly.
|
|
266
|
+
|
|
267
|
+
#### Race Condition Prevention
|
|
268
|
+
A mutex lock prevents concurrent Chrome extractions:
|
|
269
|
+
```javascript
|
|
270
|
+
if (refreshInProgress) return null; // Skip if already refreshing
|
|
271
|
+
refreshInProgress = true;
|
|
272
|
+
try { return extractFromChromeInternal(); }
|
|
273
|
+
finally { refreshInProgress = false; }
|
|
274
|
+
```
|
|
237
275
|
|
|
238
|
-
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Web UI (for claude.ai)
|
|
239
279
|
|
|
240
|
-
|
|
280
|
+
Since claude.ai doesn't support MCP, use the REST server:
|
|
241
281
|
|
|
242
|
-
|
|
282
|
+
```bash
|
|
283
|
+
npm run web
|
|
284
|
+
# Or: npx @jtalk22/slack-mcp web
|
|
285
|
+
```
|
|
243
286
|
|
|
244
|
-
|
|
287
|
+
Open http://localhost:3000. API key is auto-generated and displayed in the console.
|
|
245
288
|
|
|
246
|
-
|
|
289
|
+
<details>
|
|
290
|
+
<summary><strong>Screenshots</strong></summary>
|
|
247
291
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
292
|
+
| DMs View | Channels View |
|
|
293
|
+
|----------|---------------|
|
|
294
|
+
|  |  |
|
|
251
295
|
|
|
252
|
-
|
|
296
|
+
</details>
|
|
253
297
|
|
|
254
|
-
|
|
255
|
-
- Have a Slack tab open at `app.slack.com`
|
|
256
|
-
- Be logged into Slack
|
|
298
|
+
---
|
|
257
299
|
|
|
258
|
-
##
|
|
300
|
+
## Troubleshooting
|
|
259
301
|
|
|
260
|
-
|
|
302
|
+
### Tokens Expired
|
|
303
|
+
```bash
|
|
304
|
+
# macOS: Auto-refresh from Chrome
|
|
305
|
+
slack_refresh_tokens # In Claude
|
|
306
|
+
# Or: npm run tokens:auto
|
|
261
307
|
|
|
262
|
-
|
|
308
|
+
# Linux/Windows: Manual update
|
|
309
|
+
# Edit ~/.slack-mcp-tokens.json with fresh values
|
|
310
|
+
```
|
|
263
311
|
|
|
264
|
-
|
|
312
|
+
### DMs Not Showing
|
|
313
|
+
Use `discover_dms: true` to force discovery:
|
|
314
|
+
```
|
|
315
|
+
slack_list_conversations with discover_dms=true
|
|
316
|
+
```
|
|
317
|
+
This caches DM channel IDs for 24 hours.
|
|
265
318
|
|
|
266
|
-
|
|
267
|
-
-
|
|
268
|
-
-
|
|
269
|
-
-
|
|
270
|
-
- ❌ Requires Chrome for token extraction
|
|
271
|
-
- ❌ Not officially supported by Slack
|
|
319
|
+
### Chrome Extraction Fails
|
|
320
|
+
- Chrome must be **running** (not minimized to Dock)
|
|
321
|
+
- Slack tab must be open at `app.slack.com`
|
|
322
|
+
- You must be logged in
|
|
272
323
|
|
|
273
|
-
|
|
324
|
+
### Claude Desktop Not Seeing Tools
|
|
325
|
+
1. Verify JSON syntax in config file
|
|
326
|
+
2. Check logs: `~/Library/Logs/Claude/mcp*.log`
|
|
327
|
+
3. Fully restart Claude (Cmd+Q, then reopen)
|
|
274
328
|
|
|
275
|
-
|
|
276
|
-
- macOS Keychain provides encrypted storage
|
|
277
|
-
- Never commit tokens to version control
|
|
278
|
-
- Web server only accessible on localhost by default
|
|
329
|
+
---
|
|
279
330
|
|
|
280
331
|
## Project Structure
|
|
281
332
|
|
|
282
333
|
```
|
|
283
334
|
slack-mcp-server/
|
|
284
335
|
├── src/
|
|
285
|
-
│ ├── server.js # MCP server
|
|
336
|
+
│ ├── server.js # MCP server (stdio transport)
|
|
286
337
|
│ └── web-server.js # REST API + Web UI
|
|
287
338
|
├── lib/
|
|
288
|
-
│ ├── token-store.js # 4-layer
|
|
289
|
-
│ ├── slack-client.js # API client
|
|
339
|
+
│ ├── token-store.js # 4-layer persistence + atomic writes
|
|
340
|
+
│ ├── slack-client.js # API client, LRU cache, retry logic
|
|
290
341
|
│ ├── tools.js # MCP tool definitions
|
|
291
342
|
│ └── handlers.js # Tool implementations
|
|
292
343
|
├── public/
|
|
293
344
|
│ ├── index.html # Web UI
|
|
294
|
-
│ └── demo.html # Interactive demo
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
└── docs/
|
|
298
|
-
├── images/ # Screenshots
|
|
299
|
-
├── SETUP.md # Detailed setup guide
|
|
300
|
-
├── API.md # Tool reference
|
|
301
|
-
├── WEB-API.md # REST API reference
|
|
302
|
-
└── TROUBLESHOOTING.md
|
|
345
|
+
│ └── demo.html # Interactive demo
|
|
346
|
+
└── scripts/
|
|
347
|
+
└── token-cli.js # Token management CLI
|
|
303
348
|
```
|
|
304
349
|
|
|
305
|
-
|
|
350
|
+
---
|
|
351
|
+
|
|
352
|
+
## Security
|
|
353
|
+
|
|
354
|
+
- Token files stored with `chmod 600` (owner-only)
|
|
355
|
+
- macOS Keychain provides encrypted backup
|
|
356
|
+
- Web server binds to localhost only
|
|
357
|
+
- Never commit tokens to version control
|
|
358
|
+
- API keys are cryptographically random (`crypto.randomBytes`)
|
|
306
359
|
|
|
307
|
-
|
|
360
|
+
---
|
|
361
|
+
|
|
362
|
+
## Platform Support
|
|
363
|
+
|
|
364
|
+
| Feature | macOS | Linux | Windows |
|
|
365
|
+
|---------|-------|-------|---------|
|
|
366
|
+
| MCP Server | Yes | Yes | Yes |
|
|
367
|
+
| Token File | Yes | Yes | Yes |
|
|
368
|
+
| Auto-Refresh from Chrome | Yes | No | No |
|
|
369
|
+
| Keychain Storage | Yes | No | No |
|
|
370
|
+
| Web UI | Yes | Yes | Yes |
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
374
|
+
## Contributing
|
|
308
375
|
|
|
309
376
|
1. Fork the repository
|
|
310
377
|
2. Create a feature branch
|
|
311
378
|
3. Make your changes
|
|
312
|
-
4.
|
|
379
|
+
4. Run `node --check` on modified files
|
|
380
|
+
5. Submit a pull request
|
|
381
|
+
|
|
382
|
+
---
|
|
313
383
|
|
|
314
384
|
## Support
|
|
315
385
|
|
|
316
|
-
If you
|
|
386
|
+
If this saved you from OAuth hell, consider:
|
|
317
387
|
|
|
318
388
|
- [GitHub Sponsors](https://github.com/sponsors/jtalk22)
|
|
319
|
-
-
|
|
320
|
-
- [Buy Me a Coffee](https://www.buymeacoffee.com/jtalk22)
|
|
389
|
+
- Star the repo
|
|
321
390
|
|
|
322
|
-
|
|
391
|
+
---
|
|
323
392
|
|
|
324
393
|
## License
|
|
325
394
|
|
|
326
|
-
MIT - See [LICENSE](LICENSE)
|
|
395
|
+
MIT - See [LICENSE](LICENSE)
|
|
396
|
+
|
|
397
|
+
---
|
|
327
398
|
|
|
328
399
|
## Disclaimer
|
|
329
400
|
|
|
330
|
-
This project uses unofficial Slack APIs. Use at your own risk.
|
|
401
|
+
This project uses unofficial Slack APIs. Use at your own risk. Not affiliated with or endorsed by Slack Technologies.
|