chore(api): retire SLACK_MCP_V2 flag and v1 Slack MCP path

Merged
SA
3mo ago
+22-111

Part of the MCP v2 rework (Phase 0g) — prerequisite for v1 MCP server removal (the Slack v1 path was the last importer of @superset/mcp outside the v1 route itself).

  • Slack agent always uses the v2 in-memory MCP client; the slack-mcp-v2 flag read, the v1 client factory, DENIED_SUPERSET_TOOLS_V1, and every useV2 fork (tool names, hosts/devices response parsing) are deleted. createSupersetMcpV2Client is renamed to createSupersetMcpClient now that it's the only one.
  • SLACK_MCP_V2 removed from shared feature-flag constants. The PostHog flag (id 668461) is now unread; it can be archived in PostHog as housekeeping — no flag flip needed since the code no longer consults it.

All observed Slack MCP traffic (60d PostHog) was already v2.

https://claude.ai/code/session_01Kub4p3Eim9pc1qaRRmGea2


Open in Stage

Summary by cubic

Retires Slack MCP v1 and the SLACK_MCP_V2 flag. The Slack agent now always uses the v2 in-memory MCP client to simplify the code and unblock v1 server removal.

  • Refactors
    • Use @superset/mcp-v2/in-memory only; delete v1 client and all v1/v2 branches.
    • Rename createSupersetMcpV2Client to createSupersetMcpClient.
    • Remove SLACK_MCP_V2 from @superset/shared and stop reading the PostHog flag (safe to archive).
    • Consolidate denied tools into one set; drop v1 tool names.
    • Simplify context gathering to v2 tools: organization_members_list, tasks_statuses_list, hosts_list (and v2 hosts_list result shape).
    • Add .vercel to apps/api/.gitignore.

Summary by CodeRabbit

  • New Features

    • Updated Slack-based agent interactions to use the latest MCP experience by default.
    • Improved tool-call analytics and relay configuration for Slack integrations.
  • Bug Fixes

    • Simplified context loading and tool access handling for more consistent agent responses.
  • Chores

    • Added Vercel deployment files to API ignore rules.
    • Removed the retired Slack MCP rollout flag.