slack-max-api-mcp 1.0.8 → 1.0.10

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/.env.example CHANGED
@@ -11,46 +11,23 @@ SLACK_CLIENT_SECRET=
11
11
  # SLACK_OAUTH_CALLBACK_PATH=/slack/oauth/callback
12
12
  # SLACK_OAUTH_TIMEOUT_MS=300000
13
13
 
14
- # Runtime profile selection from token store (~/.slack-max-api-mcp/tokens.json)
14
+ # Central onboarding server (optional)
15
+ # Server-side only:
16
+ # SLACK_ONBOARD_SERVER_HOST=0.0.0.0
17
+ # SLACK_ONBOARD_SERVER_PORT=8790
18
+ # SLACK_ONBOARD_PUBLIC_BASE_URL=https://onboard.example.com
19
+ # SLACK_ONBOARD_SERVER_CALLBACK_PATH=/slack/oauth/callback
20
+ # SLACK_ONBOARD_CLAIM_TTL_MS=600000
21
+ #
22
+ # Client-side only:
23
+ # SLACK_ONBOARD_SERVER_URL=https://onboard.example.com # optional override (default: https://43.202.54.65.sslip.io)
24
+ # SLACK_ONBOARD_POLL_INTERVAL_MS=2000
25
+ # SLACK_ONBOARD_TIMEOUT_MS=300000
26
+
27
+ # Runtime profile/token store
15
28
  # SLACK_PROFILE=
16
29
  # SLACK_DEFAULT_TOKEN_TYPE=bot
17
30
  # SLACK_TOKEN_STORE_PATH=
18
- # SLACK_CLIENT_CONFIG_PATH=
19
-
20
- # Central gateway mode (recommended for team/shared workspace operations)
21
- # Server-side (only on the gateway host):
22
- # SLACK_GATEWAY_HOST=127.0.0.1
23
- # SLACK_GATEWAY_PORT=8790
24
- # SLACK_GATEWAY_PUBLIC_BASE_URL=https://mcp-gateway.example.com
25
- # SLACK_GATEWAY_SHARED_SECRET=change-this-to-long-random-secret
26
- # SLACK_GATEWAY_CLIENT_API_KEY=change-this-to-random-client-key
27
- # SLACK_GATEWAY_ALLOW_PUBLIC=false
28
- # SLACK_GATEWAY_PUBLIC_ONBOARD=true
29
- # SLACK_GATEWAY_PUBLIC_ONBOARD_API_KEY=change-this-to-random-client-key
30
- # SLACK_GATEWAY_PUBLIC_ONBOARD_EXPOSE_API_KEY=false
31
- # SLACK_GATEWAY_PUBLIC_ONBOARD_PROFILE_PREFIX=auto
32
- # SLACK_INVITE_TOKEN_DEFAULT_DAYS=7
33
- #
34
- # Client-side (each local Codex/Claude machine):
35
- # SLACK_GATEWAY_URL=https://mcp-gateway.example.com
36
- # SLACK_GATEWAY_API_KEY=change-this-to-random-client-key
37
- # SLACK_GATEWAY_PROFILE=
38
-
39
- # Optional auto-onboarding trigger for interactive `slack-max-api-mcp` runs
40
- # SLACK_AUTO_ONBOARD=true
41
- # Built-in default team gateway used when no auto-onboard gateway is set:
42
- # SLACK_DEFAULT_TEAM_GATEWAY_URL=https://43.202.54.65.sslip.io
43
- # SLACK_DEFAULT_TEAM_GATEWAY_INSECURE_TLS=true
44
- # SLACK_GATEWAY_INSECURE_TLS=true
45
- # SLACK_AUTO_ONBOARD_URL=https://mcp-gateway.example.com/onboard.ps1?token=...
46
- # or
47
- # SLACK_AUTO_ONBOARD_GATEWAY=https://mcp-gateway.example.com
48
- # SLACK_AUTO_ONBOARD_TOKEN=invite-token-issued-by-gateway
49
- # Optional tokenless variant:
50
- # SLACK_AUTO_ONBOARD_GATEWAY=https://mcp-gateway.example.com
51
- # SLACK_AUTO_ONBOARD_PROFILE_PREFIX=auto
52
- # SLACK_AUTO_ONBOARD_PROFILE=
53
- # SLACK_ONBOARD_SKIP_TLS_VERIFY=false
54
31
 
55
32
  # Legacy/manual token mode (optional)
56
33
  # SLACK_BOT_TOKEN=xoxb-your-bot-token
@@ -63,8 +40,20 @@ SLACK_CLIENT_SECRET=
63
40
  # Optional base URL override
64
41
  # SLACK_API_BASE_URL=https://slack.com/api
65
42
 
66
- # Catalog-driven method tool settings
67
- # SLACK_CATALOG_PATH=C:\code_test\test22\data\slack-catalog.json
68
- # SLACK_ENABLE_METHOD_TOOLS=true
43
+ # Tool exposure settings
44
+ # SLACK_TOOL_EXPOSURE_MODE=operations
45
+ # SLACK_SMART_COMPAT_CORE_TOOLS=true # developer mode only; keep raw core tools visible
46
+ # SLACK_ENABLE_METHOD_TOOLS=false
69
47
  # SLACK_METHOD_TOOL_PREFIX=slack_method
70
- # SLACK_MAX_METHOD_TOOLS=0
48
+ # SLACK_MAX_METHOD_TOOLS=50
49
+ # SLACK_CATALOG_PATH=C:\code_test\test22\data\slack-catalog.json
50
+
51
+ # Governance / operations settings
52
+ # SLACK_OPERATIONS_CONFIG_PATH=C:\code_test\test22\config\operations.json
53
+ # SLACK_OPERATIONS_STATE_PATH=C:\Users\<you>\.slack-max-api-mcp\operations-state.json
54
+ # SLACK_ENABLE_AUDIT_LOG=true
55
+ # SLACK_AUDIT_LOG_PATH=C:\Users\<you>\.slack-max-api-mcp\audit.log
56
+ # SLACK_METHOD_ALLOWLIST=chat.postMessage,conversations.history
57
+ # SLACK_METHOD_DENYLIST=users.deletePhoto
58
+ # SLACK_METHOD_ALLOW_PREFIXES=chat.,conversations.
59
+ # SLACK_METHOD_DENY_PREFIXES=admin.
package/README.md CHANGED
@@ -1,261 +1,177 @@
1
- # Slack Max API MCP
2
-
3
- Slack Web API를 Codex/Claude Code에서 바로 사용할 수 있게 만든 `stdio` MCP 서버입니다.
4
-
5
- - 패키지: `slack-max-api-mcp`
6
- - 실행 방식: MCP 클라이언트(Codex/Claude)에서 도구 호출
7
- - 목적: Slack 조회/검색/전송/캔버스/API 직접 호출 자동화
8
-
9
- ## 이 MCP가 무엇을 하는가
10
-
11
- 1. Slack API를 MCP 도구로 감싸서 AI가 호출할 수 있게 합니다.
12
- 2. 고정 도구 13개 + 카탈로그 기반 동적 메서드 도구(현재 304개)를 제공합니다.
13
- 3. 토큰/권한 범위 안에서 Slack 작업을 대화로 실행할 수 있습니다.
14
-
15
- ## Slack API로 만들 수 있는 것 vs 이 MCP에서 구현한 것
16
-
17
- | 구분 | Slack API로 가능한 범위 | 이 MCP에서 구현한 방식 |
18
- |---|---|---|
19
- | 표준 Web API | 대부분 메서드 호출 가능 | `slack_api_call` + `slack_method_*` 자동 도구 |
20
- | 비표준/특수 API (SCIM/Audit/Legal Holds 등) | 엔드포인트별 가능(권한 필요) | `slack_http_api_call` |
21
- | 메시지/파일 검색 | `search.*` 계열 | `search_messages_files` |
22
- | 유저/채널 탐색 | `users.*`, `conversations.*` | `search_users`, `search_channels`, `read_user_profile` |
23
- | 메시지 전송/읽기 | `chat.postMessage`, `conversations.*` | `send_message`, `read_channel`, `read_thread` |
24
- | 캔버스 | `canvases.*` | `create_canvas`, `update_canvas`, `read_canvas` |
25
-
26
- 참고:
27
- - 고정 도구: 13개
28
- - 카탈로그 메서드 수: 304개
29
- - 카탈로그 스코프 수: 121개 (`data/slack-catalog.json` 기준)
30
-
31
- ## 제공 도구 목록
32
-
33
- ### 고정 도구 (13)
34
-
35
- 1. `slack_api_call`
36
- 2. `slack_http_api_call`
37
- 3. `search_messages_files`
38
- 4. `search_users`
39
- 5. `search_channels`
40
- 6. `send_message`
41
- 7. `read_channel`
42
- 8. `read_thread`
43
- 9. `create_canvas`
44
- 10. `update_canvas`
45
- 11. `read_canvas`
46
- 12. `read_user_profile`
47
- 13. `slack_method_tools_info`
48
-
49
- ### 동적 도구
50
-
51
- 1. `slack_method_<family_method>` 형식으로 자동 생성
52
- 2. 예: `slack_method_chat_postMessage`
53
- 3. 수량은 카탈로그/설정값에 따라 달라짐 (`SLACK_ENABLE_METHOD_TOOLS`, `SLACK_MAX_METHOD_TOOLS`)
54
-
55
- ## 현재 이 MCP가 할 수 있는 일
56
-
57
- 실시간 점검 결과 문서:
58
- - [MCP_CURRENT_CAPABILITIES_NOW.md](./MCP_CURRENT_CAPABILITIES_NOW.md)
59
-
60
- 요약:
61
- 1. 기본(BOT)으로 유저/채널 조회, 프로필 조회, 캔버스 생성, 일반 API 호출 가능
62
- 2. USER 토큰 사용 시 메시지/파일 검색, 채널 읽기, 메시지 전송 가능
63
- 3. BOT으로 검색은 토큰 타입 제한(`not_allowed_token_type`)이 있어 USER 토큰 사용 권장
64
-
65
- ## 설치 및 실행
1
+ # Slack Max API MCP
66
2
 
67
- ```powershell
68
- npm install -g slack-max-api-mcp@latest
69
- slack-max-api-mcp
70
- ```
3
+ Operations-first Slack MCP server for Codex/Claude Code over `stdio`.
71
4
 
72
- 팀원 기본 온보딩(현재 패키지 기본값):
73
- 1. 추가 환경변수 없이 `slack-max-api-mcp` 실행 시 자동 온보딩 시도
74
- 2. 기본 게이트웨이: `https://43.202.54.65.sslip.io`
75
- 3. 승인 Codex 등록 1회:
5
+ - Package: `slack-max-api-mcp`
6
+ - Runtime: pure CLI MCP over stdio
7
+ - HTTP Slack API gateway/proxy: removed
8
+ - Local HTTP callback is still used only for OAuth code return
76
9
 
77
- ```powershell
78
- codex mcp add slack-max -- npx -y slack-max-api-mcp
79
- ```
10
+ ## Tool exposure
80
11
 
81
- 또는:
12
+ - `operations` (default): 14 operations-first tools only
13
+ - `developer`: operations tools + `gateway_*` + core Slack API tools
14
+ - `legacy`: fixed core tools + optional catalog method tools
82
15
 
83
- ```powershell
84
- npx -y slack-max-api-mcp
85
- ```
86
-
87
- ## Codex / Claude Code 연결
88
-
89
- ### Codex
90
-
91
- ```powershell
92
- codex mcp add slack-max -- npx -y slack-max-api-mcp
93
- codex mcp list
94
- ```
95
-
96
- ### Claude Code
97
-
98
- ```powershell
99
- claude mcp add slack-max -- npx -y slack-max-api-mcp
100
- claude mcp list
101
- ```
102
-
103
- ## 인증 설정
104
-
105
- ## 1) 팀 운영 권장: 중앙 Gateway 모드
106
-
107
- 핵심:
108
- 1. `SLACK_CLIENT_SECRET`은 중앙 서버에만 둡니다.
109
- 2. 각 사용자 로컬에는 Slack 토큰을 두지 않습니다.
110
- 3. OAuth 승인으로 중앙 저장소(`~/.slack-max-api-mcp/tokens.json`)에 사용자별 토큰이 저장됩니다.
111
-
112
- ### 중앙 서버(1대) 설정
16
+ Environment:
113
17
 
114
- ```powershell
115
- setx SLACK_CLIENT_ID "YOUR_CLIENT_ID"
116
- setx SLACK_CLIENT_SECRET "YOUR_CLIENT_SECRET"
117
- setx SLACK_GATEWAY_HOST "0.0.0.0"
118
- setx SLACK_GATEWAY_PORT "8790"
119
- setx SLACK_GATEWAY_PUBLIC_BASE_URL "https://your-gateway.example.com"
120
- setx SLACK_GATEWAY_SHARED_SECRET "long-random-shared-secret"
121
- setx SLACK_GATEWAY_CLIENT_API_KEY "long-random-client-api-key"
122
- setx SLACK_GATEWAY_PUBLIC_ONBOARD "true"
123
- setx SLACK_GATEWAY_PUBLIC_ONBOARD_API_KEY "long-random-client-api-key"
124
- npx -y slack-max-api-mcp gateway start
18
+ - `SLACK_TOOL_EXPOSURE_MODE=operations|developer|legacy`
19
+ - `SLACK_SMART_COMPAT_CORE_TOOLS=true|false`
20
+ - `SLACK_ENABLE_METHOD_TOOLS=true|false`
21
+ - `SLACK_MAX_METHOD_TOOLS=<number>`
22
+
23
+ `smart` is still accepted as an alias for `developer`.
24
+
25
+ ## Operations-first tools
26
+
27
+ The default surface is now operations-first and keeps raw API wrappers out of the main tool list:
28
+
29
+ - `ops_policy_info`: runtime policy/audit guardrails
30
+ - `ops_playbook_list`: built-in operations playbooks
31
+ - `ops_state_overview`: inspect local operations state (`incidents`, `digests`, `broadcasts`, `followups`)
32
+ - `ops_incident_create`: create + optionally announce a tracked incident
33
+ - `ops_incident_update`: persist a status change and optionally post a thread update
34
+ - `ops_incident_close`: close a tracked incident with stored resolution
35
+ - `ops_broadcast_prepare`: prepare and store a broadcast draft before sending
36
+ - `ops_playbook_run`: run standardized workflows (`incident_open`, `support_digest`, `release_broadcast`)
37
+ - `ops_channel_snapshot`: activity/participant/thread snapshot for a channel
38
+ - `ops_unanswered_threads`: find stale or unanswered question-like threads
39
+ - `ops_sla_breach_scan`: detect SLA breach threads across multiple channels
40
+ - `ops_sla_followup`: auto follow-up replies for SLA breaches with duplicate-suppression state
41
+ - `ops_broadcast_message`: send a prepared draft or direct operational announcement
42
+ - `ops_audit_log_read`: inspect local JSONL audit logs
43
+
44
+ These tools let teams run repeatable Slack operations without rebuilding multi-step API call chains, and they persist local operational state to make incidents/broadcasts/followups first-class records.
45
+
46
+ ## Config and state
47
+
48
+ - Operations config file: `config/operations.json`
49
+ - Override path: `SLACK_OPERATIONS_CONFIG_PATH=<path>`
50
+ - Local state path: `~/.slack-max-api-mcp/operations-state.json`
51
+ - Override path: `SLACK_OPERATIONS_STATE_PATH=<path>`
52
+
53
+ The operations config controls incident templates, digest defaults, broadcast templates, and follow-up suppression windows.
54
+
55
+ ### Playbook examples
56
+
57
+ ```text
58
+ Codex, run ops_playbook_run with playbook=incident_open on #incident-war-room.
59
+ title is "DB Latency Spike", severity is "sev2", owner is "@oncall-db", dry_run=true.
125
60
  ```
126
61
 
127
- 주의:
128
- 1. `SLACK_GATEWAY_PUBLIC_ONBOARD=true`는 토큰 없는 온보딩을 허용합니다.
129
- 2. 게이트웨이가 비공개(`SLACK_GATEWAY_ALLOW_PUBLIC=false`)라면 `SLACK_GATEWAY_PUBLIC_ONBOARD_API_KEY`를 함께 설정해야 팀원 로컬 클라이언트가 API 호출할 수 있습니다.
62
+ ```text
63
+ Codex, run ops_playbook_run with playbook=support_digest for channels #support-kor and #support-global.
64
+ lookback_hours=24, sla_minutes=60, report_channel=#support-ops, dry_run=true.
65
+ ```
130
66
 
131
- ### 팀원 경험 (토큰 전달 없이 권장)
67
+ ```text
68
+ Codex, run ops_sla_followup for channels #support-kor and #support-global.
69
+ sla_minutes=90, lookback_hours=24, max_messages=20, dry_run=true.
70
+ ```
132
71
 
133
- ```powershell
134
- npx -y slack-max-api-mcp onboard run
72
+ ```text
73
+ Codex, run ops_incident_create on #incident-war-room.
74
+ title is "API Error Spike", summary is "5xx rate above threshold", owner is "@oncall-api", dry_run=true.
135
75
  ```
136
76
 
137
- 자동 동작:
138
- 1. 로컬 클라이언트 설정 파일(`~/.slack-max-api-mcp/client.json`) 작성
139
- 2. 브라우저 OAuth 승인 페이지 자동 오픈
140
- 3. Slack Allow 승인
141
- 4. 완료 후 Codex에서 바로 사용
77
+ ```text
78
+ Codex, run ops_state_overview with collection=incidents and limit=10.
79
+ ```
80
+
81
+ ## Governance settings
82
+
83
+ - `SLACK_ENABLE_AUDIT_LOG=true|false` (default: `true`)
84
+ - `SLACK_AUDIT_LOG_PATH=<path>` (default: `~/.slack-max-api-mcp/audit.log`)
85
+ - `SLACK_METHOD_ALLOWLIST=chat.postMessage,conversations.history`
86
+ - `SLACK_METHOD_DENYLIST=users.deletePhoto`
87
+ - `SLACK_METHOD_ALLOW_PREFIXES=chat.,conversations.`
88
+ - `SLACK_METHOD_DENY_PREFIXES=admin.`
142
89
 
143
- 승인 Codex 연결(최초 1회):
90
+ If allowlist/allow-prefix is set, methods outside that policy are blocked.
91
+
92
+ ## Install
144
93
 
145
94
  ```powershell
146
- codex mcp add slack-max -- npx -y slack-max-api-mcp
95
+ npm install -g slack-max-api-mcp@latest
147
96
  ```
148
97
 
149
- ### 팀원 경험 (초대토큰 기반, 기존 방식)
98
+ ## Register MCP
150
99
 
151
- 운영자가 팀원용 원클릭 초대 커맨드 생성:
100
+ Codex:
152
101
 
153
102
  ```powershell
154
- npx -y slack-max-api-mcp gateway invite --profile woobin --team T0AHNJ8QN0N
103
+ codex mcp add slack-max -- npx -y slack-max-api-mcp
104
+ codex mcp list
155
105
  ```
156
106
 
157
- 명령이 팀원에게 전달할 "원클릭 설치 커맨드"를 출력합니다.
107
+ Claude Code:
158
108
 
159
109
  ```powershell
160
- powershell -ExecutionPolicy Bypass -Command "irm 'https://your-gateway.example.com/onboard.ps1?token=...' | iex"
110
+ claude mcp add slack-max -- npx -y slack-max-api-mcp
111
+ claude mcp list
161
112
  ```
162
113
 
163
- ### 팀원 경험 (설치 후 `slack-max-api-mcp`만 실행)
114
+ ## Auth options
164
115
 
165
- 현재 패키지 기본 게이트웨이(`https://43.202.54.65.sslip.io`) 계속 사용할 경우 팀원은 다음만 수행하면 됩니다.
116
+ ### 1) Local OAuth (single machine)
166
117
 
167
118
  ```powershell
168
- npm install -g slack-max-api-mcp@latest
169
- slack-max-api-mcp
119
+ setx SLACK_CLIENT_ID "YOUR_CLIENT_ID"
120
+ setx SLACK_CLIENT_SECRET "YOUR_CLIENT_SECRET"
121
+ npx -y slack-max-api-mcp oauth login --profile my-workspace --team T1234567890
170
122
  ```
171
123
 
172
- 자동 동작:
173
- 1. 대화형 터미널에서 인증 설정이 비어 있으면 자동 온보딩 트리거
174
- 2. 브라우저 자동 오픈
175
- 3. Slack Allow 승인
176
- 4. 완료 후 Codex에서 바로 사용
124
+ Helper commands:
177
125
 
178
- 게이트웨이 주소를 바꿔야 할 때만(운영자):
179
- 1. `SLACK_DEFAULT_TEAM_GATEWAY_URL`
180
- 2. `SLACK_DEFAULT_TEAM_GATEWAY_INSECURE_TLS` (`true/false`)
181
- 3. 또는 기존 방식대로 `SLACK_AUTO_ONBOARD_URL`, `SLACK_AUTO_ONBOARD_GATEWAY` 사용 가능
126
+ ```powershell
127
+ npx -y slack-max-api-mcp oauth list
128
+ npx -y slack-max-api-mcp oauth use <profile_key_or_name>
129
+ npx -y slack-max-api-mcp oauth current
130
+ ```
131
+
132
+ ### 2) Central onboarding server (team onboarding, no client secret on team PCs)
182
133
 
183
- ## 2) 단독/개인 운영: 로컬 OAuth 모드
134
+ Run on central server:
184
135
 
185
136
  ```powershell
186
137
  setx SLACK_CLIENT_ID "YOUR_CLIENT_ID"
187
138
  setx SLACK_CLIENT_SECRET "YOUR_CLIENT_SECRET"
188
- npx -y slack-max-api-mcp oauth login --profile my-workspace --team T1234567890
139
+ setx SLACK_ONBOARD_SERVER_HOST "0.0.0.0"
140
+ setx SLACK_ONBOARD_SERVER_PORT "8790"
141
+ setx SLACK_ONBOARD_PUBLIC_BASE_URL "https://onboard.example.com"
142
+ npx -y slack-max-api-mcp onboard-server start
189
143
  ```
190
144
 
191
- 토큰은 기본적으로 `~/.slack-max-api-mcp/tokens.json`에 저장됩니다.
145
+ Run on team member PC:
192
146
 
193
- ## 3) 수동 토큰 모드 (대안)
147
+ ```powershell
148
+ npx -y slack-max-api-mcp onboard run
149
+ ```
150
+
151
+ This flow opens browser OAuth via central server and saves tokens to local token store.
152
+ Default onboard server URL is `https://43.202.54.65.sslip.io`.
153
+ Use `--server` (or `SLACK_ONBOARD_SERVER_URL`) only when overriding it.
154
+
155
+ ### 3) Manual token mode
194
156
 
195
157
  ```powershell
196
158
  setx SLACK_BOT_TOKEN "xoxb-..."
197
159
  setx SLACK_USER_TOKEN "xoxp-..."
198
160
  ```
199
161
 
200
- ### 토큰 선택 우선순위
201
-
202
- 1. 도구 입력의 `token_override`
203
- 2. Gateway 모드가 켜진 경우: 로컬 `client.json` 또는 env의 Gateway 설정으로 중앙 호출
204
- 3. Gateway 미사용 시: 로컬 환경변수 (`SLACK_BOT_TOKEN` / `SLACK_USER_TOKEN` / `SLACK_TOKEN`)
205
- 4. OAuth 토큰 저장소의 활성 프로필 (`SLACK_PROFILE` 또는 기본 프로필)
206
- 5. `.env.example` fallback (`SLACK_ALLOW_ENV_EXAMPLE_FALLBACK=true`일 때만)
207
-
208
- 참고:
209
- 1. 기본 토큰 타입 우선순위는 `SLACK_DEFAULT_TOKEN_TYPE`으로 조정할 수 있음 (`bot` 기본값, `user`, `generic`, `auto` 지원)
210
- 2. `not_allowed_token_type`, `missing_scope` 오류 시 서버가 자동으로 다른 후보 토큰을 재시도함
211
-
212
- ## 실제 요청 예시 (Codex/Claude에 자연어로)
213
-
214
- 1. `채널 목록 조회해서 이름과 ID를 표로 정리해줘.`
215
- 2. `USER 토큰으로 C0AHJ8GF09H 채널 최근 30개 메시지 읽어 요약해줘.`
216
- 3. `USER 토큰으로 C0AHJ8GF09H 채널에 "테스트 메시지" 전송해줘.`
217
- 4. `회의록 캔버스 하나 만들고 제목을 "MCP 점검"으로 생성해줘.`
218
-
219
- 정확도 팁:
220
- 1. 검색/읽기/전송은 USER 토큰 사용을 명시
221
- 2. 실패 시 `error/needed/provided`를 같이 출력하도록 요청
222
-
223
- ## 제약 사항과 운영 주의
224
-
225
- 1. 중앙 Gateway 모드에서는 `SLACK_GATEWAY_SHARED_SECRET` 유출 시 즉시 교체해야 함
226
- 2. OAuth든 수동 토큰이든, 토큰 관리 책임은 운영자에게 있음 (노출 시 즉시 회수/재발급)
227
- 3. scope 변경 후에는 Slack 앱 재설치(재승인)가 필요할 수 있음
228
- 4. 채널 읽기/전송은 봇/사용자 멤버십이 없으면 실패 가능 (`not_in_channel`)
229
- 5. 일부 API는 Enterprise 또는 Admin 권한 전용
230
- 6. Slack rate limit에 걸릴 수 있음
231
- 7. OAuth 저장소(`~/.slack-max-api-mcp/tokens.json`)를 공유 드라이브에 두면 보안 위험이 커짐
232
-
233
- ## 보안 주의
234
-
235
- 1. 실제 토큰을 README/코드/패키지/커밋에 넣지 마세요.
236
- 2. 토큰 노출 시 즉시 폐기 후 재발급하세요.
237
- 3. 필요하면 시크릿 매니저(1Password/Vault/AWS Secrets Manager) 사용을 권장합니다.
238
-
239
- ## 트러블슈팅 빠른 체크
240
-
241
- 1. 토큰 유효성: `auth.test`
242
- 2. 권한 부족: 응답의 `needed`/`provided` 확인
243
- 3. 메시지 전송 실패: 채널 멤버십(`not_in_channel`) 여부 확인
244
- 4. 검색 실패: BOT 토큰 사용 여부 확인 (`not_allowed_token_type`)
245
-
246
- ## 개발 정보
247
-
162
+ ## Token precedence
163
+
164
+ 1. `token_override` in tool input
165
+ 2. env tokens: `SLACK_BOT_TOKEN` / `SLACK_USER_TOKEN` / `SLACK_TOKEN`
166
+ 3. active OAuth profile from token store (`SLACK_PROFILE` or default profile)
167
+ 4. `.env.example` fallback if `SLACK_ALLOW_ENV_EXAMPLE_FALLBACK=true`
168
+
169
+ ## Development
170
+
248
171
  ```powershell
249
172
  npm install
250
173
  npm run check
251
174
  npm run build:catalog
252
175
  npm run start
253
- node src/slack-mcp-server.js oauth help
254
- node src/slack-mcp-server.js gateway help
255
- node src/slack-mcp-server.js onboard help
176
+ node src/slack-mcp-server.js help
256
177
  ```
257
-
258
- 관련 파일:
259
- - 서버: `src/slack-mcp-server.js`
260
- - 카탈로그: `data/slack-catalog.json`
261
- - 현재 기능 점검 결과: `MCP_CURRENT_CAPABILITIES_NOW.md`
@@ -0,0 +1,75 @@
1
+ {
2
+ "playbooks": {
3
+ "incident_open": {
4
+ "summary": "Post an incident opening message with a standard operations template.",
5
+ "required_inputs": ["channel", "title"],
6
+ "supports_dry_run": true
7
+ },
8
+ "support_digest": {
9
+ "summary": "Build and optionally publish a support digest from channel activity.",
10
+ "required_inputs": ["channels"],
11
+ "supports_dry_run": true
12
+ },
13
+ "release_broadcast": {
14
+ "summary": "Broadcast a release announcement to multiple channels.",
15
+ "required_inputs": ["channels", "title", "summary"],
16
+ "supports_dry_run": true
17
+ }
18
+ },
19
+ "incidents": {
20
+ "default_channel": "",
21
+ "default_owner": "TBD",
22
+ "default_severity": "sev2",
23
+ "update_interval_minutes": 15,
24
+ "open_template": [
25
+ ":rotating_light: Incident Open - {{title}}",
26
+ "Severity: {{severity_upper}}",
27
+ "Owner: {{owner}}",
28
+ "Summary: {{summary}}",
29
+ "{{details_line}}",
30
+ "Next update: {{next_update_text}}"
31
+ ],
32
+ "update_template": [
33
+ ":information_source: Incident Update - {{title}}",
34
+ "Status: {{status_upper}}",
35
+ "Severity: {{severity_upper}}",
36
+ "Owner: {{owner}}",
37
+ "Summary: {{summary}}",
38
+ "{{details_line}}",
39
+ "Next update: {{next_update_text}}"
40
+ ],
41
+ "close_template": [
42
+ ":white_check_mark: Incident Resolved - {{title}}",
43
+ "Severity: {{severity_upper}}",
44
+ "Owner: {{owner}}",
45
+ "Resolution: {{resolution}}",
46
+ "{{details_line}}"
47
+ ]
48
+ },
49
+ "support_digest": {
50
+ "default_lookback_hours": 24,
51
+ "default_sla_minutes": 60,
52
+ "default_max_threads": 10,
53
+ "header_template": "Support Digest ({{lookback_hours}}h)",
54
+ "sla_template": "SLA threshold: {{sla_minutes}}m"
55
+ },
56
+ "broadcasts": {
57
+ "default_template": "release_default",
58
+ "default_mrkdwn": true,
59
+ "templates": {
60
+ "release_default": [
61
+ ":rocket: Release - {{title}}",
62
+ "{{summary}}",
63
+ "{{details}}"
64
+ ]
65
+ }
66
+ },
67
+ "followups": {
68
+ "default_sla_minutes": 60,
69
+ "default_lookback_hours": 24,
70
+ "default_max_threads_per_channel": 20,
71
+ "default_max_messages": 30,
72
+ "suppress_hours": 6,
73
+ "reminder_template": "Friendly reminder: this thread appears to be pending for more than {{sla_minutes}} minutes. Please provide an update."
74
+ }
75
+ }
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "slack-max-api-mcp",
3
- "version": "1.0.8",
4
- "description": "Slack MCP server (stdio) for Codex and Claude Code",
3
+ "version": "1.0.10",
4
+ "description": "Operations-first Slack MCP server (stdio) for Codex and Claude Code",
5
5
  "main": "src/slack-mcp-server.js",
6
6
  "bin": {
7
7
  "slack-max-api-mcp": "src/slack-mcp-server.js"
8
8
  },
9
9
  "files": [
10
10
  "src",
11
+ "config",
11
12
  "data/slack-catalog.json",
12
13
  "README.md",
13
14
  ".env.example"
@@ -15,9 +16,8 @@
15
16
  "scripts": {
16
17
  "build:catalog": "node scripts/generate-slack-catalog.js",
17
18
  "start": "node src/slack-mcp-server.js",
18
- "gateway:start": "node src/slack-mcp-server.js gateway start",
19
- "gateway:invite": "node src/slack-mcp-server.js gateway invite --profile demo --team T1234567890",
20
19
  "onboard:help": "node src/slack-mcp-server.js onboard help",
20
+ "onboard-server:start": "node src/slack-mcp-server.js onboard-server start",
21
21
  "oauth:help": "node src/slack-mcp-server.js oauth help",
22
22
  "check": "node --check src/slack-mcp-server.js"
23
23
  },