Skip to content

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

Merged
saddlepaddle merged 1 commit into
mainfrom
mcp-rework/0g-slack-v1-retire
Jul 31, 2026
Merged

saddlepaddle merged 1 commit into
mainfrom
mcp-rework/0g-slack-v1-retire

Conversation

@saddlepaddle

@saddlepaddle saddlepaddle commented Jul 31, 2026 •

Copy link
Copy Markdown
Collaborator

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.

Written for commit f163922. Summary will update on new commits.

Review in cubic

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.

All Slack agent traffic has been on the v2 in-memory client; the flag
fork, the v1 client factory, and the dual-shape context parsing were
dead weight blocking v1 MCP removal.

Claude-Session: https://claude.ai/code/session_01Kub4p3Eim9pc1qaRRmGea2
@ghost

ghost commented Jul 31, 2026

Copy link
Copy Markdown

Ready to review this PR? Stage has broken it down into 4 individual chapters for you:

Title
1 Remove SLACK_MCP_V2 feature flag constant
2 Consolidate MCP client factory to v2
3 Clean up Slack agent implementation
4 Update API gitignore
Open in Stage

Chapters generated by Stage for commit f163922 on Jul 31, 2026 9:07pm UTC.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d96a4641-cd32-42f6-963f-266c8fbc6977

📥 Commits

Reviewing files that changed from the base of the PR and between 9c3cf93 and f163922.

📒 Files selected for processing (4)
  • apps/api/.gitignore
  • apps/api/src/app/api/integrations/slack/events/utils/run-agent/mcp-clients.ts
  • apps/api/src/app/api/integrations/slack/events/utils/run-agent/run-agent.ts
  • packages/shared/src/constants.ts
💤 Files with no reviewable changes (1)
  • packages/shared/src/constants.ts

📝 Walkthrough

Walkthrough

The Slack agent now uses MCP v2 directly. Feature-flag selection, legacy client setup, v1 tool handling, and the SLACK_MCP_V2 constant were removed. The API app also ignores .vercel.

Changes

Slack MCP v2 standardization

Layer / File(s) Summary
MCP v2 client contract
apps/api/src/app/api/integrations/slack/events/utils/run-agent/mcp-clients.ts, packages/shared/src/constants.ts
The standard client now creates the MCP v2 in-memory client. The legacy v2 wrapper and SLACK_MCP_V2 feature flag were removed.
Unified Slack agent flow
apps/api/src/app/api/integrations/slack/events/utils/run-agent/run-agent.ts
The agent always uses v2 tools and response handling. It uses one denied-tool set and no longer selects clients through a feature flag.

API app repository hygiene

Layer / File(s) Summary
Local deployment artifact ignore rule
apps/api/.gitignore
Added .vercel to the ignore list.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SlackAgent
  participant SupersetMcpClient
  participant SupersetTools
  SlackAgent->>SupersetMcpClient: Create standard MCP v2 client
  SupersetMcpClient->>SupersetTools: Request organization members, task statuses, and hosts
  SupersetTools-->>SlackAgent: Return v2 context responses
  SlackAgent->>SlackAgent: Parse hosts_list result and filter denied tools
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes retiring the feature flag and the legacy Slack MCP path.
Description check ✅ Passed The description clearly explains the changes and rationale, but it does not document how the changes were tested.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mcp-rework/0g-slack-v1-retire

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch

Thank you for your contribution! 🎉

@saddlepaddle
saddlepaddle merged commit b07c738 into main Jul 31, 2026
19 checks passed

This branch was previously deployed

1 inactive deployment
preview — f163922c Deployed Jul 31, 2026 by saddlepaddle via Deploy Web #6949
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant