Skip to content

Commit 7a31877

Browse files
authored
Merge pull request #33 from korotovsky/channels-list-slack-enterprise
Add logic to improve fetching channels list on slack workspaces with enterprise setting
2 parents 831e0fe + e884b21 commit 7a31877

File tree

25 files changed

+2844
-206
lines changed

25 files changed

+2844
-206
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.23 AS build
1+
FROM golang:1.24 AS build
22

33
ENV CGO_ENABLED=0
44
ENV GOTOOLCHAIN=local
@@ -21,7 +21,7 @@ RUN --mount=type=cache,target=/go/pkg/mod \
2121
FROM build AS dev
2222

2323
RUN --mount=type=cache,target=/go/pkg/mod \
24-
go install github.com/go-delve/delve/cmd/dlv@v1.23.1 && cp /go/bin/dlv /dlv
24+
go install github.com/go-delve/delve/cmd/dlv@v1.25.0 && cp /go/bin/dlv /dlv
2525

2626
WORKDIR /app/mcp-server
2727

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This feature-rich Slack MCP Server has:
2828
1. `conversations_history`
2929
- Get messages from the channel by channelID
3030
- Required inputs:
31-
- `channel_id` (string): ID of the channel in format Cxxxxxxxxxx or its name starting with #... aka #general.
31+
- `channel_id` (string): ID of the channel in format Cxxxxxxxxxx or its name starting with #... or @... aka #general or @username_dm.
3232
- `include_activity_messages` (bool, default: false): If true, the response will include activity messages such as 'channel_join' or 'channel_leave'. Default is boolean false.
3333
- `cursor` (string, default: ""): Cursor for pagination. Use the value of the last row and column in the response as next_cursor field returned from the previous request.
3434
- `limit` (string, default: 28): Limit of messages to fetch.
@@ -37,7 +37,7 @@ This feature-rich Slack MCP Server has:
3737
2. `conversations_replies`
3838
- Get a thread of messages posted to a conversation by channelID and thread_ts
3939
- Required inputs:
40-
- `channel_id` (string): ID of the channel in format Cxxxxxxxxxx or its name starting with #... aka #general.
40+
- `channel_id` (string): ID of the channel in format Cxxxxxxxxxx or its name starting with #... or @... aka #general or @username_dm.
4141
- `thread_ts` (string): Unique identifier of either a thread’s parent message or a message in the thread. ts must be the timestamp in format 1234567890.123456 of an existing message with 0 or more replies.
4242
- `include_activity_messages` (bool, default: false): If true, the response will include activity messages such as 'channel_join' or 'channel_leave'. Default is boolean false.
4343
- `cursor` (string, default: ""): Cursor for pagination. Use the value of the last row and column in the response as next_cursor field returned from the previous request.

cmd/slack-mcp-server/main.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ func main() {
2626
p,
2727
)
2828

29-
go newUsersWatcher(p)()
30-
go newChannelsWatcher(p)()
29+
go func() {
30+
newUsersWatcher(p)()
31+
newChannelsWatcher(p)()
32+
}()
3133

3234
switch transport {
3335
case "stdio":

docker-compose.dev.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44
context: .
55
target: dev
66
dockerfile: Dockerfile
7-
# command: /dlv debug /app/cmd/slack-mcp-server/main.go --headless --listen=:40000 --api-version=2 --log -- --transport sse
7+
command: /dlv debug /app/cmd/slack-mcp-server/main.go --accept-multiclient --headless --listen=:40000 --api-version=2 --log -- --transport sse
88
restart: unless-stopped
99
networks:
1010
- app-tier
@@ -14,8 +14,8 @@ services:
1414
# Optional: Uncomment to mount the CA certificate if you need to trust a custom CA
1515
# Don't forget to set SLACK_MCP_SERVER_CA=/usr/local/share/ca-certificates/ca.crt
1616
#
17-
# volumes:
18-
# - ./ca-cert.crt:/usr/local/share/ca-certificates/ca.crt
17+
volumes:
18+
- ./ca-cert.crt:/usr/local/share/ca-certificates/ca.crt
1919
# - ./.users_cache.json:/app/mcp-server/.users_cache.json
2020
env_file:
2121
- .env
@@ -24,8 +24,8 @@ services:
2424
SLACK_MCP_PORT: "3001"
2525
# Uncomment if you use HTTP Toolkit with proxy on 127.0.0.1:8000
2626
# on your host, otherwise leave it commented.
27-
# extra_hosts:
28-
# - "host.docker.internal:host-gateway"
27+
extra_hosts:
28+
- "host.docker.internal:host-gateway"
2929

3030
networks:
3131
app-tier:

go.mod

Lines changed: 56 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,70 @@
11
module github.com/korotovsky/slack-mcp-server
22

3-
go 1.23.0
3+
go 1.24.0
44

5-
toolchain go1.23.5
5+
toolchain go1.24.4
66

77
require (
8-
github.com/bbalet/stopwords v1.0.0
98
github.com/gocarina/gocsv v0.0.0-20240520201108-78e41c74b4b1
9+
github.com/google/uuid v1.6.0
1010
github.com/mark3labs/mcp-go v0.31.0
11+
github.com/rusq/slack v0.9.6-0.20250408103104-dd80d1b6337f
12+
github.com/rusq/slackauth v0.6.1
13+
github.com/rusq/slackdump/v3 v3.1.6
14+
github.com/rusq/tagops v0.1.1
1115
github.com/slack-go/slack v0.16.0
16+
golang.org/x/sync v0.14.0
17+
golang.org/x/time v0.12.0
1218
)
1319

1420
require (
15-
github.com/google/uuid v1.6.0 // indirect
16-
github.com/gorilla/websocket v1.4.2 // indirect
21+
github.com/MercuryEngineering/CookieMonster v0.0.0-20180304172713-1584578b3403 // indirect
22+
github.com/atotto/clipboard v0.1.4 // indirect
23+
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
24+
github.com/catppuccin/go v0.3.0 // indirect
25+
github.com/charmbracelet/bubbles v0.21.0 // indirect
26+
github.com/charmbracelet/bubbletea v1.3.5 // indirect
27+
github.com/charmbracelet/colorprofile v0.3.1 // indirect
28+
github.com/charmbracelet/huh v0.7.0 // indirect
29+
github.com/charmbracelet/huh/spinner v0.0.0-20250519092748-d6f1597485e0 // indirect
30+
github.com/charmbracelet/lipgloss v1.1.0 // indirect
31+
github.com/charmbracelet/x/ansi v0.9.2 // indirect
32+
github.com/charmbracelet/x/cellbuf v0.0.13 // indirect
33+
github.com/charmbracelet/x/exp/strings v0.0.0-20250520193441-8304e91a28cb // indirect
34+
github.com/charmbracelet/x/term v0.2.1 // indirect
35+
github.com/deckarep/golang-set/v2 v2.8.0 // indirect
36+
github.com/dustin/go-humanize v1.0.1 // indirect
37+
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
38+
github.com/fatih/color v1.18.0 // indirect
39+
github.com/go-jose/go-jose/v3 v3.0.4 // indirect
40+
github.com/go-rod/rod v0.116.2 // indirect
41+
github.com/go-stack/stack v1.8.1 // indirect
42+
github.com/gorilla/websocket v1.5.3 // indirect
43+
github.com/joho/godotenv v1.5.1 // indirect
44+
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
45+
github.com/mattn/go-colorable v0.1.14 // indirect
46+
github.com/mattn/go-isatty v0.0.20 // indirect
47+
github.com/mattn/go-localereader v0.0.1 // indirect
48+
github.com/mattn/go-runewidth v0.0.16 // indirect
49+
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
50+
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
51+
github.com/muesli/cancelreader v0.2.2 // indirect
52+
github.com/muesli/termenv v0.16.0 // indirect
53+
github.com/playwright-community/playwright-go v0.5200.0 // indirect
54+
github.com/rivo/uniseg v0.4.7 // indirect
55+
github.com/rogpeppe/go-internal v1.14.1 // indirect
56+
github.com/rusq/chttp v1.1.0 // indirect
57+
github.com/rusq/fsadapter v1.1.0 // indirect
1758
github.com/spf13/cast v1.7.1 // indirect
59+
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
1860
github.com/yosida95/uritemplate/v3 v3.0.2 // indirect
19-
golang.org/x/text v0.24.0 // indirect
61+
github.com/ysmood/fetchup v0.3.0 // indirect
62+
github.com/ysmood/goob v0.4.0 // indirect
63+
github.com/ysmood/got v0.40.0 // indirect
64+
github.com/ysmood/gson v0.7.3 // indirect
65+
github.com/ysmood/leakless v0.9.0 // indirect
66+
golang.org/x/net v0.40.0 // indirect
67+
golang.org/x/sys v0.33.0 // indirect
68+
golang.org/x/term v0.32.0 // indirect
69+
golang.org/x/text v0.25.0 // indirect
2070
)

0 commit comments

Comments
 (0)