From 4454d67ff6a6d3be75a22b8ce5ac29d49723943e Mon Sep 17 00:00:00 2001 From: Aron Gates Date: Wed, 28 Jan 2026 00:03:28 -0300 Subject: [PATCH 1/5] feat: govslack compatibility --- pkg/provider/api.go | 8 +++++--- pkg/provider/edge/edge.go | 15 ++++++++++++--- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/pkg/provider/api.go b/pkg/provider/api.go index f67f1b9e..b85c824e 100644 --- a/pkg/provider/api.go +++ b/pkg/provider/api.go @@ -123,9 +123,11 @@ type ApiProvider struct { func NewMCPSlackClient(authProvider auth.Provider, logger *zap.Logger) (*MCPSlackClient, error) { httpClient := transport.ProvideHTTPClient(authProvider.Cookies(), logger) - slackClient := slack.New(authProvider.SlackToken(), - slack.OptionHTTPClient(httpClient), - ) + slackOpts := []slack.Option{slack.OptionHTTPClient(httpClient)} + if os.Getenv("SLACK_MCP_GOVSLACK") == "true" { + slackOpts = append(slackOpts, slack.OptionAPIURL("https://slack-gov.com/api/")) + } + slackClient := slack.New(authProvider.SlackToken(), slackOpts...) authResp, err := slackClient.AuthTest() if err != nil { diff --git a/pkg/provider/edge/edge.go b/pkg/provider/edge/edge.go index cf1e3bac..ff938dcd 100644 --- a/pkg/provider/edge/edge.go +++ b/pkg/provider/edge/edge.go @@ -64,6 +64,15 @@ var ( ErrNoToken = errors.New("token is empty") ) +// getSlackBaseDomain returns the base domain for Slack API endpoints. +// Returns "slack-gov.com" if SLACK_MCP_GOVSLACK=true, otherwise "slack.com". +func getSlackBaseDomain() string { + if os.Getenv("SLACK_MCP_GOVSLACK") == "true" { + return "slack-gov.com" + } + return "slack.com" +} + func NewWithClient(workspaceName string, teamID string, token string, cl *http.Client, opt ...Option) (*Client, error) { if teamID == "" { return nil, ErrNoTeamID @@ -79,8 +88,8 @@ func NewWithClient(workspaceName string, teamID string, token string, cl *http.C cl: cl, token: token, teamID: teamID, - webclientAPI: fmt.Sprintf("https://%s.slack.com/api/", workspaceName), - edgeAPI: fmt.Sprintf("https://edgeapi.slack.com/cache/%s/", teamID), + webclientAPI: fmt.Sprintf("https://%s.%s/api/", workspaceName, getSlackBaseDomain()), + edgeAPI: fmt.Sprintf("https://edgeapi.%s/cache/%s/", getSlackBaseDomain(), teamID), tape: tape, }, nil } @@ -118,7 +127,7 @@ func NewWithInfo(info *slack.AuthTestResponse, prov auth.Provider, opt ...Option token: prov.SlackToken(), teamID: info.TeamID, webclientAPI: info.URL + "api/", - edgeAPI: fmt.Sprintf("https://edgeapi.slack.com/cache/%s/", info.TeamID), + edgeAPI: fmt.Sprintf("https://edgeapi.%s/cache/%s/", getSlackBaseDomain(), info.TeamID), tape: nopTape{}, } From 10463f3d50f9843d650ee53281ea4517f4cfcb81 Mon Sep 17 00:00:00 2001 From: Aron Gates Date: Wed, 28 Jan 2026 00:06:55 -0300 Subject: [PATCH 2/5] docs: updated with option --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6debb1f3..d9bfdd52 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,7 @@ Fetches a CSV directory of all users in the workspace. | `SLACK_MCP_USERS_CACHE` | No | `~/Library/Caches/slack-mcp-server/users_cache.json` (macOS)
`~/.cache/slack-mcp-server/users_cache.json` (Linux)
`%LocalAppData%/slack-mcp-server/users_cache.json` (Windows) | Path to the users cache file. Used to cache Slack user information to avoid repeated API calls on startup. | | `SLACK_MCP_CHANNELS_CACHE` | No | `~/Library/Caches/slack-mcp-server/channels_cache_v2.json` (macOS)
`~/.cache/slack-mcp-server/channels_cache_v2.json` (Linux)
`%LocalAppData%/slack-mcp-server/channels_cache_v2.json` (Windows) | Path to the channels cache file. Used to cache Slack channel information to avoid repeated API calls on startup. | | `SLACK_MCP_LOG_LEVEL` | No | `info` | Log-level for stdout or stderr. Valid values are: `debug`, `info`, `warn`, `error`, `panic` and `fatal` | +| `SLACK_MCP_GOVSLACK` | No | `nil` | Set to `true` to enable [GovSlack](https://slack.com/solutions/govslack) mode. Routes API calls to `slack-gov.com` endpoints instead of `slack.com` for FedRAMP-compliant government workspaces. | *You need one of: `xoxp` (user), `xoxb` (bot), or both `xoxc`/`xoxd` tokens for authentication. From 893f15816bf5af459f21b088fbda9ccf22f03432 Mon Sep 17 00:00:00 2001 From: Aron Gates Date: Wed, 28 Jan 2026 00:49:46 -0300 Subject: [PATCH 3/5] ci: triggering build From 58218638ff7b2297d855d81e6ec72518c099a63a Mon Sep 17 00:00:00 2001 From: Aron Gates Date: Wed, 28 Jan 2026 00:51:07 -0300 Subject: [PATCH 4/5] fix: using built package of my fork --- .github/workflows/release-image.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-image.yaml b/.github/workflows/release-image.yaml index 3d8acd48..4c805151 100644 --- a/.github/workflows/release-image.yaml +++ b/.github/workflows/release-image.yaml @@ -6,8 +6,8 @@ on: - '*' env: - DOCKERHUB_IMAGE_NAME: korotovsky/slack-mcp-server - DOCKERHUB_USERNAME: korotovsky + DOCKERHUB_IMAGE_NAME: aron-muon/slack-mcp-server + DOCKERHUB_USERNAME: aron-muon TAG: ${{ github.ref_name == 'main' && 'latest' || github.ref_type == 'tag' && github.ref_name && startsWith(github.ref_name, 'v') && github.ref_name || 'unknown' }} jobs: From 73d5c96bae3e5da29c7ac696afc6ac645a3685b6 Mon Sep 17 00:00:00 2001 From: Aron Date: Wed, 28 Jan 2026 02:01:38 -0300 Subject: [PATCH 5/5] Update Docker Hub credentials in release workflow --- .github/workflows/release-image.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-image.yaml b/.github/workflows/release-image.yaml index 4c805151..3d8acd48 100644 --- a/.github/workflows/release-image.yaml +++ b/.github/workflows/release-image.yaml @@ -6,8 +6,8 @@ on: - '*' env: - DOCKERHUB_IMAGE_NAME: aron-muon/slack-mcp-server - DOCKERHUB_USERNAME: aron-muon + DOCKERHUB_IMAGE_NAME: korotovsky/slack-mcp-server + DOCKERHUB_USERNAME: korotovsky TAG: ${{ github.ref_name == 'main' && 'latest' || github.ref_type == 'tag' && github.ref_name && startsWith(github.ref_name, 'v') && github.ref_name || 'unknown' }} jobs: