Slack MCP server rate-limited on startup in large Enterprise Grid workspace after v1.2.3
After upgrading slack-mcp-server to v1.2.3, my server consistently hits Slack rate limits during startup on a large Enterprise Grid workspace (~6,700 users, ~2,500 channels) using xoxc/xoxd browser session tokens over stdio in Claude Code. The error is: "Failed to fetch channels" error="slack rate limit exceeded, retry after 30s". Cold starts write a partial channel cache (145 of 2,500+ channels) and the slow startup makes the MCP client time out and retry, causing a loop. Is there a fix or workaround?
Originally asked on GitHub: https://github.com/korotovsky/slack-mcp-server/issues/231
5 answers
Status: still open — the issue remains open, but maintainer-merged PR #225 (stale-while-revalidate) significantly reduces cold-start failures; the underlying retry-on-transient-failure work is tracked in #238.
Root cause: PR #218 changed
MCPSlackClient.GetConversationsContext()so that on Enterprise Grid workspaces with non-OAuth (xoxc/xoxd) tokens it always supplements edge API results with a full paginatedconversations.listpass. That supplement loop has norateLimiter.Wait()between pages, so a cold cache refresh on a ~2,500-channel workspace fires ~22+ rapid API calls (the edge path also runs 3 concurrent goroutines) and trips Slack's rate limit. On stdio, the slow startup makes Claude Code time out and retry, triggering another cold start and a retry loop. Two things make it worse:refreshUsersInternalis also unthrottled (and per comment 1, only fetches the first 1,000 users on large workspaces), and PR #183 renamed cache files with a team-ID prefix, orphaning the old warm cache and forcing a one-time full cold fetch after upgrade.Immediate workaround (confirmed in the thread):
export SLACK_MCP_CACHE_TTL=12h(or 24h) — the default is 1h — to reduce cold-refresh frequency. Tradeoff: new channels/users won't appear until the cache expires.Suggested patch from the thread: add
rateLimiter.Wait()inside theconversations.listsupplement loop inpkg/provider/api.go(a 4-line change), and consider skipping the standard-API supplement when the edge API returned a reasonable channel count.General advice: xoxc/xoxd are browser session tokens with broad workspace access — keep them out of shared config files and logs.
Did this work for you?What @korotovsky tried on GitHub (Worked)
Maintainer merged PR #225, which adds stale-while-revalidate so startup no longer blocks on a full cache refresh; rate-limit cascades during cold start are largely avoided.
Did this work for you?What a GitHub user tried on GitHub (Partly worked)
Reporter set SLACK_MCP_CACHE_TTL=24h to reduce cold-refresh frequency; it helps but doesn't fix the underlying unthrottled pagination.
Source: https://github.com/korotovsky/slack-mcp-server/issues/231 (opens external site)
Did this work for you?What @darrel-lewis-delinea tried on GitHub (Partly worked)
Commenter suggested the same workaround with SLACK_MCP_CACHE_TTL=12h, noting the tradeoff of stale channel/user data until cache expiry.
Did this work for you?What @darrel-lewis-delinea tried on GitHub (Outcome unclear)
Commenter proposed a 4-line patch adding rateLimiter.Wait() inside the standard API supplement loop in pkg/provider/api.go; proposed only, not verified in the thread.
Did this work for you?
Related questions
- slack-mcp-server slow/hangs on large Slack workspaces (e.g. Kubernetes Slack)
- Why does slack-mcp-server with XOXC/XOXD tokens fail with invalid_auth while caching users?
- Why does slack-mcp-server channels_list return only CSV headers while message search works?
- When will slack-mcp-server ship the merged Slack bot token support (v1.1.27)?
- Slack MCP channels_list returns only 6 channels despite token having 15+ channel access